:root {
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, .64);
  --surface-strong: rgba(255, 255, 255, .82);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(29, 29, 31, .10);
  --shadow: 0 24px 80px rgba(0, 0, 0, .08);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --shell: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.shell { width: min(calc(100% - 40px), var(--shell)); margin-inline: auto; }

.ambient { position: fixed; width: 520px; height: 520px; border-radius: 50%; filter: blur(100px); opacity: .22; pointer-events: none; z-index: -1; }
.ambient-one { background: #a8c7ff; top: -180px; right: -100px; }
.ambient-two { background: #d7b8ff; left: -180px; top: 36%; }

.site-header { position: sticky; top: 0; z-index: 20; transition: .35s ease; border-bottom: 1px solid transparent; }
.site-header.scrolled { backdrop-filter: saturate(180%) blur(22px); background: rgba(245,245,247,.72); border-color: var(--line); }
.nav-wrap { height: 72px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.03em; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: #1d1d1f; color: white; font-size: 12px; letter-spacing: -.04em; }
.nav { margin-left: auto; display: flex; gap: 26px; color: var(--muted); font-size: 14px; }
.nav a, .nav-cta { transition: color .2s ease, opacity .2s ease; }
.nav a:hover { color: var(--text); }
.nav-cta { font-size: 14px; font-weight: 600; }

.hero { min-height: 760px; padding: 150px 0 90px; display: flex; flex-direction: column; justify-content: center; }
.eyebrow { display: inline-block; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
.hero h1, .project-hero h1 { max-width: 980px; margin: 24px 0 28px; font-size: clamp(58px, 8.2vw, 118px); line-height: .92; letter-spacing: -.075em; font-weight: 700; }
.hero-copy { max-width: 760px; color: var(--muted); font-size: clamp(20px, 2.2vw, 28px); line-height: 1.42; letter-spacing: -.025em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { min-height: 50px; padding: 0 20px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; transition: transform .25s ease, box-shadow .25s ease, background .25s ease; }
.button:hover { transform: translateY(-2px); }
.button-dark { background: var(--text); color: white; box-shadow: 0 12px 30px rgba(0,0,0,.16); }
.button-light { background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.9); backdrop-filter: blur(18px); }
.hero-metrics { margin-top: 100px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; border-top: 1px solid var(--line); padding-top: 26px; }
.hero-metrics div { display: flex; flex-direction: column; gap: 6px; }
.hero-metrics strong { font-size: 28px; letter-spacing: -.04em; }
.hero-metrics span { color: var(--muted); font-size: 13px; }

.section { padding: 120px 0; }
.section-head { margin-bottom: 48px; }
.section-head h2 { max-width: 900px; margin: 18px 0 0; font-size: clamp(42px, 6vw, 78px); line-height: .98; letter-spacing: -.06em; }
.glass-card { background: var(--surface); border: 1px solid rgba(255,255,255,.88); box-shadow: var(--shadow); backdrop-filter: blur(24px) saturate(140%); }
.about-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 18px; }
.about-copy, .focus-card { border-radius: var(--radius-xl); padding: clamp(28px, 5vw, 56px); }
.about-copy p { color: #424245; font-size: clamp(19px, 2vw, 25px); line-height: 1.55; letter-spacing: -.025em; }
.about-copy p:last-child { margin-bottom: 0; }
.card-label { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.pill-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.pill { padding: 11px 14px; border-radius: 999px; background: rgba(255,255,255,.72); border: 1px solid rgba(29,29,31,.06); font-size: 13px; }

.projects-head { display: flex; align-items: end; justify-content: space-between; gap: 32px; }
.filter-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.filter { border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; background: rgba(255,255,255,.45); color: var(--muted); cursor: pointer; transition: .2s ease; }
.filter:hover, .filter.active { background: var(--text); color: white; border-color: var(--text); }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.project-card { min-height: 510px; border-radius: var(--radius-xl); padding: 28px; display: flex; flex-direction: column; justify-content: space-between; transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, opacity .25s ease; }
.project-card:hover { transform: translateY(-8px); box-shadow: 0 36px 100px rgba(0,0,0,.12); }
.project-card.hidden { display: none; }
.project-topline { display: flex; justify-content: space-between; align-items: center; margin-bottom: 70px; }
.project-index { color: #a1a1a6; font-size: 13px; font-variant-numeric: tabular-nums; }
.status { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.7); border: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 600; }
.project-card h3 { margin: 12px 0 6px; font-size: clamp(30px, 3.2vw, 46px); letter-spacing: -.05em; }
.project-subtitle { margin-bottom: 18px; font-size: 17px; color: #424245; }
.project-description { color: var(--muted); line-height: 1.65; }
.stack-line { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0 18px; }
.stack-line span { font-size: 11px; color: var(--muted); }
.text-link { font-weight: 650; font-size: 14px; }
.text-link span { display: inline-block; transition: transform .2s ease; }
.text-link:hover span { transform: translateX(4px); }

.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.skill-card { border-radius: var(--radius-lg); padding: 30px; }
.skill-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.skill-list span { font-size: 15px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.58); }

.timeline { border-top: 1px solid var(--line); }
.timeline-item { display: grid; grid-template-columns: .42fr 1fr; gap: 40px; padding: 42px 0; border-bottom: 1px solid var(--line); }
.timeline-period { color: var(--muted); font-size: 14px; }
.timeline-content h3 { margin: 9px 0 10px; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.045em; }
.timeline-content p { max-width: 780px; color: var(--muted); line-height: 1.7; }

.contact-card { border-radius: 44px; padding: clamp(34px, 7vw, 80px); }
.contact-card h2 { max-width: 900px; margin: 18px 0 24px; font-size: clamp(46px, 7vw, 92px); line-height: .94; letter-spacing: -.065em; }
.contact-card > p { max-width: 720px; color: var(--muted); font-size: 19px; line-height: 1.6; }

.project-hero { padding: 130px 0 70px; }
.back-link { display: inline-block; margin-bottom: 90px; color: var(--muted); font-size: 14px; }
.project-meta-row { display: flex; align-items: center; gap: 14px; }
.case-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; padding-bottom: 40px; }
.case-card { border-radius: var(--radius-xl); padding: clamp(28px, 4vw, 52px); min-height: 320px; }
.case-card h2 { margin: 28px 0 0; font-size: clamp(28px, 3.2vw, 44px); line-height: 1.12; letter-spacing: -.045em; }
.case-wide { grid-column: 1 / -1; min-height: 280px; }
.stack-card { border-radius: var(--radius-xl); padding: 36px; }

.footer { padding: 36px 0 54px; color: var(--muted); font-size: 12px; }
.footer-row { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-top: 24px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .nav { display: none; }
  .nav-cta { margin-left: auto; }
  .hero { min-height: 680px; padding-top: 100px; }
  .hero h1, .project-hero h1 { font-size: clamp(54px, 14vw, 86px); }
  .hero-metrics, .about-grid, .project-grid, .skills-grid, .case-grid { grid-template-columns: 1fr; }
  .case-wide { grid-column: auto; }
  .projects-head { align-items: flex-start; flex-direction: column; }
  .filter-row { justify-content: flex-start; }
  .timeline-item { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 560px) {
  .shell { width: min(calc(100% - 24px), var(--shell)); }
  .nav-wrap { height: 62px; }
  .brand > span:last-child { display: none; }
  .hero { min-height: auto; padding: 115px 0 64px; }
  .hero h1 { font-size: 55px; }
  .hero-copy { font-size: 19px; }
  .hero-metrics { margin-top: 70px; gap: 12px; }
  .hero-metrics strong { font-size: 22px; }
  .section { padding: 78px 0; }
  .project-card { min-height: 470px; padding: 22px; }
  .contact-card { border-radius: 28px; }
  .footer-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
