/* ═══════════════════════════════════════════════════════════════
   William Ngo — Portfolio
   Theme: "Ember Noir" — warm near-black with a coral accent and amber/rose
   warm secondaries. A standalone identity for the freelance portfolio
   (not tied to any other product). Type scale + tokens below.
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }

/* Image-slot empty state — recolour for the dark theme (default is dark-on-light) */
image-slot::part(frame) { background: var(--bg-panel); }
image-slot::part(ring) { border-color: var(--border-card); }
image-slot::part(empty) { color: var(--text-secondary); }

:root {
  /* Brand accent the site leans on. Purple primary, amber as the warm fire glow. */
  --brand: var(--accent-purple);
  --brand-warm: var(--accent-amber);
  --brand-rose: var(--accent-rose);

  /* Editorial type scale (website-scale, larger than the dense POS ramp) */
  --fs-eyebrow: 12px;
  --fs-small: 14px;
  --fs-base: 17px;
  --fs-lead: clamp(18px, 1.4vw, 21px);
  --fs-h3: clamp(20px, 1.6vw, 24px);
  --fs-h2: clamp(30px, 4vw, 46px);
  --fs-h1: clamp(40px, 5.6vw, 68px);
  --fs-display: clamp(54px, 9vw, 120px);

  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --nav-h: 72px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ───────── Ember Noir palette (overrides the imported tokens) ───────── */
:root {
  --bg-primary:   #100d0c;   /* warm near-black */
  --bg-panel:     #15110f;   /* raised panel */
  --bg-basket:    #0c0a09;   /* deepest — inputs / wells */

  --surface-card: #1b1614;
  --surface-item: #161210;
  --surface-active: #2a201b;

  --border-subtle: #221b18;
  --border-card:   #322620;

  --accent-purple: #ff6f47;  /* PRIMARY — coral ember (brand) */
  --accent-amber:  #f4b15a;  /* warm secondary — highlights, campaign tag */
  --accent-rose:   #f2887a;  /* warm coral-pink — motion tag, required mark */
  --accent-teal:   #7fd1b0;  /* cool counterpoint — availability / success */

  --tint-purple: #2a1812;
  --tint-amber:  #2a2013;
  --tint-rose:   #2a1714;
  --tint-teal:   #15231d;

  --text-heading:   #f8f1ea;
  --text-body:      #e7ddd4;
  --text-secondary: #b4a89e;
  --text-muted:     #70625a;

  --on-accent: #1c110c;      /* dark warm ink for text on the coral accent */

  --shadow-accent: 0 6px 18px rgba(255,111,71,.22);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

html, body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

::selection { background: var(--tint-purple); color: var(--text-heading); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ───────────── Layout helpers ───────────── */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 11vw, 140px); position: relative; }
.section--tight { padding-block: clamp(48px, 7vw, 84px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--brand); opacity: .8;
}
.eyebrow--center::before { display: none; }

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head h2 {
  font-size: var(--fs-h2); font-weight: 800; letter-spacing: -0.025em;
  line-height: 1.05; color: var(--text-heading); margin: 18px 0 0;
  text-wrap: balance;
}
.section-head p { font-size: var(--fs-lead); color: var(--text-secondary); margin: 18px 0 0; max-width: 60ch; }

.text-warm { color: var(--brand-warm); }
.text-brand { color: var(--brand); }

/* ───────────── Buttons ───────────── */
.btn {
  --b: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 52px; padding-inline: 26px;
  border-radius: var(--r-md);
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .35s var(--ease), background .25s, border-color .25s, color .25s, box-shadow .35s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary {
  background: var(--brand); color: var(--on-accent);
  box-shadow: var(--shadow-accent);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255,111,71,.34); }
.btn--ghost {
  background: transparent; color: var(--text-heading);
  border-color: var(--border-card);
}
.btn--ghost:hover { border-color: var(--brand); background: var(--surface-item); transform: translateY(-2px); }
.btn--block { width: 100%; }

/* ───────────── Nav ───────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(16,13,12,.80);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border-subtle);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; }
.monogram {
  width: 40px; height: 40px; border-radius: 12px; position: relative;
  /* top sheen layered over the coral gradient — keeps the WN text on top */
  background:
    linear-gradient(180deg, rgba(255,255,255,.40), rgba(255,255,255,0) 46%),
    linear-gradient(157deg, #ff9168 2%, #f5602f 52%, #e2521f);
  color: #3a1409;
  display: grid; place-items: center;
  font-weight: 800; font-size: 16px; letter-spacing: -0.04em;
  text-shadow: 0 1px 0 rgba(255,222,202,.45);
  box-shadow:
    0 1.5px 0 rgba(255,212,192,.55) inset,
    0 -8px 16px rgba(140,38,8,.35) inset,
    0 9px 18px -5px rgba(0,0,0,.55),
    0 3px 7px rgba(0,0,0,.40);
}
.brand .name { font-weight: 700; color: var(--text-heading); letter-spacing: -0.02em; font-size: 17px; }
.brand .name small { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin-top: 1px; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  position: relative; padding: 9px 14px; border-radius: var(--r-sm);
  font-size: 15px; font-weight: 500; color: var(--text-secondary);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text-heading); }
.nav-links a.active { color: var(--text-heading); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: var(--brand); border-radius: 2px;
}
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-cta .btn { height: 42px; padding-inline: 18px; font-size: 15px; }

.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--border-card); background: var(--surface-item); border-radius: var(--r-sm); color: var(--text-heading); cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; margin: auto; }

/* ───────────── Hero ───────────── */
.hero { position: relative; padding-top: calc(var(--nav-h) + clamp(40px, 8vw, 96px)); padding-bottom: clamp(60px, 9vw, 120px); overflow: hidden; }
.hero-glow {
  position: absolute; pointer-events: none; z-index: 0; filter: blur(60px); opacity: .55;
}
.hero-glow.g1 { width: 560px; height: 560px; top: -180px; right: -120px;
  background: radial-gradient(circle, rgba(255,111,71,.42), transparent 65%); }
.hero-glow.g2 { width: 480px; height: 480px; top: 120px; left: -160px;
  background: radial-gradient(circle, rgba(244,177,90,.20), transparent 65%); }
.hero-glow.g3 { width: 420px; height: 420px; bottom: -160px; right: 22%;
  background: radial-gradient(circle, rgba(242,136,122,.16), transparent 65%); }

.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }

.hero h1 {
  font-size: var(--fs-h1); font-weight: 800; letter-spacing: -0.035em; line-height: .98;
  color: var(--text-heading); margin: 22px 0 0; text-wrap: balance;
}
.hero h1 .accent { color: var(--brand); }
.hero-lead { font-size: var(--fs-lead); color: var(--text-secondary); margin: 26px 0 0; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-status {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 30px;
  font-size: var(--fs-small); color: var(--text-secondary);
}
.dot { width: 9px; height: 9px; border-radius: 999px; background: var(--accent-teal); position: relative; }
.dot::after { content: ""; position: absolute; inset: -5px; border-radius: 999px; border: 1px solid var(--accent-teal); opacity: .5; animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0% { transform: scale(.6); opacity: .6; } 100% { transform: scale(1.6); opacity: 0; } }

/* Hero visual */
.hero-visual { position: relative; }
.hero-frame {
  position: relative; border: 1px solid var(--border-card); border-radius: var(--r-xl);
  padding: 12px; background: linear-gradient(180deg, var(--surface-card), var(--bg-panel));
  box-shadow: var(--shadow-lg);
}
.hero-frame image-slot { width: 100%; aspect-ratio: 4 / 5; border-radius: 12px; }
.hero-frame video { width: 100%; aspect-ratio: 4 / 5; border-radius: 12px; object-fit: cover; display: block; background: #000; }
.hero-badge {
  position: absolute; left: -22px; bottom: 28px;
  background: var(--bg-panel); border: 1px solid var(--border-card);
  border-radius: var(--r-lg); padding: 14px 18px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 14px;
}
.hero-badge .big { font-family: var(--font-mono); font-weight: 600; font-size: 28px; color: var(--text-heading); letter-spacing: -0.02em; }
.hero-badge .lbl { font-size: 12px; color: var(--text-secondary); line-height: 1.3; max-width: 12ch; }

/* ───────────── Brand strip ───────────── */
.brands { border-block: 1px solid var(--border-subtle); }
.brands .wrap { display: flex; align-items: center; gap: clamp(20px, 4vw, 56px); flex-wrap: wrap; padding-block: 26px; }
.brands .label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }
.brands ul { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: clamp(20px, 4vw, 48px); margin: 0; padding: 0; }
.brands li { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; color: var(--text-secondary); opacity: .85; transition: color .2s, opacity .2s; }
.brands li:hover { color: var(--text-heading); opacity: 1; }

/* ───────────── Stats ───────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border-subtle); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); overflow: hidden; }
.stat { background: var(--bg-primary); padding: 28px clamp(18px, 2.4vw, 30px); }
.stat .num { font-family: var(--font-mono); font-weight: 600; font-size: clamp(34px, 4.4vw, 48px); letter-spacing: -0.03em; color: var(--text-heading); font-feature-settings: 'tnum' 1; }
.stat .num span { color: var(--brand); }
.stat .cap { font-size: 14px; color: var(--text-secondary); margin-top: 6px; }

/* ───────────── Work ───────────── */
.work-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter {
  height: 40px; padding-inline: 18px; border-radius: var(--r-pill);
  background: var(--surface-item); border: 1px solid var(--border-card);
  color: var(--text-secondary); font-size: 14px; font-weight: 500; cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}
.filter:hover { color: var(--text-heading); }
.filter.active { background: var(--brand); color: var(--on-accent); border-color: var(--brand); }

.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 26px); margin-top: clamp(32px, 4vw, 48px); }
.card {
  height: 100%;
  position: relative; background: var(--surface-card); border: 1px solid var(--border-card);
  border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .4s var(--ease), border-color .3s, box-shadow .4s, opacity .35s, filter .35s;
}
.card:hover { transform: translateY(-4px); border-color: var(--brand); box-shadow: var(--shadow-lg); }
.card.hide { display: none; }
.card-media { position: relative; aspect-ratio: 16 / 10; background: var(--bg-panel); }
.card-media image-slot { width: 100%; height: 100%; }
.card-media img, .card-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card-media video { background: #000; }

/* Website cards: browser-frame placeholder; live screenshot layers on top when it loads */
.site-thumb { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg-panel); }
.site-bar { height: 34px; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--surface-card); border-bottom: 1px solid var(--border-card); }
.site-bar .dots { display: flex; gap: 5px; flex: none; }
.site-bar .dots i { width: 9px; height: 9px; border-radius: 999px; background: var(--border-card); }
.site-bar .url { flex: 1; font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); background: var(--bg-basket); border: 1px solid var(--border-card); border-radius: 999px; padding: 4px 12px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-body { flex: 1; display: grid; place-items: center; padding: 16px; text-align: center; background: radial-gradient(130% 120% at 50% -10%, var(--tint-purple), transparent 70%); }
.site-body .site-name { font-size: clamp(18px, 2vw, 24px); font-weight: 800; letter-spacing: -0.02em; color: var(--text-heading); }
.card-media .site-thumb .shot { display: none; object-position: top; z-index: 1; }
.card-tag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 10px; border-radius: var(--r-sm); background: rgba(16,13,12,.74);
  backdrop-filter: blur(6px); border: 1px solid var(--border-card); color: var(--text-body);
  white-space: nowrap;
}
.card-tag.t-web { color: var(--accent-purple); }
.card-tag.t-campaign { color: var(--accent-amber); }
.card-tag.t-motion { color: var(--accent-rose); }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body .client { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.card-body h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; color: var(--text-heading); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.4em; }
.card-body p { font-size: 15px; color: var(--text-secondary); margin: 2px 0 0; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3em; }
.card-arrow { margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--brand); }
.card-arrow svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.card:hover .card-arrow svg { transform: translateX(4px); }
.card.clickable { cursor: pointer; }

/* ───────────── Lightbox ───────────── */
.lightbox { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: clamp(20px, 5vw, 64px); background: rgba(8,6,10,.86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.lightbox.open { display: flex; }
.lb-inner { display: flex; flex-direction: column; gap: 18px; max-width: 1100px; width: 100%; align-items: center; }
.lb-media { width: 100%; display: flex; justify-content: center; }
.lb-media img, .lb-media video { max-width: 100%; max-height: 72vh; border-radius: var(--r-lg); border: 1px solid var(--border-card); background: #000; display: block; box-shadow: var(--shadow-lg); }
.lb-caption { text-align: center; max-width: 60ch; }
.lb-caption .lb-client { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-amber); }
.lb-caption .lb-title { font-size: var(--fs-h3); font-weight: 700; color: var(--text-heading); margin: 6px 0 0; }
.lb-caption .lb-desc { font-size: 15px; color: var(--text-secondary); margin: 8px 0 0; line-height: 1.5; }
.lb-close { position: fixed; top: 20px; right: 24px; width: 48px; height: 48px; border-radius: 999px; border: 1px solid var(--border-card); background: var(--surface-card); color: var(--text-heading); font-size: 20px; cursor: pointer; display: grid; place-items: center; transition: border-color .2s, transform .2s; z-index: 2; }
.lb-close:hover { border-color: var(--brand); transform: scale(1.05); }

/* ───────────── Services ───────────── */
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(14px, 1.6vw, 20px); }
.svc {
  background: var(--surface-card); border: 1px solid var(--border-card); border-radius: var(--r-lg);
  padding: clamp(24px, 2.6vw, 36px); display: flex; flex-direction: column; gap: 16px;
  transition: border-color .3s, transform .4s var(--ease), background .3s;
}
.svc:hover { border-color: var(--brand); transform: translateY(-3px); }
.svc-ico {
  width: 52px; height: 52px; border-radius: var(--r-md); display: grid; place-items: center;
  background: var(--tint-purple); color: var(--brand); border: 1px solid var(--border-card);
}
.svc:nth-child(2) .svc-ico { background: var(--tint-amber); color: var(--accent-amber); }
.svc:nth-child(3) .svc-ico { background: var(--tint-rose); color: var(--accent-rose); }
.svc:nth-child(4) .svc-ico { background: var(--tint-teal); color: var(--accent-teal); }
.svc-ico svg { width: 26px; height: 26px; }
.svc h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.02em; color: var(--text-heading); margin: 0; }
.svc p { font-size: 15.5px; color: var(--text-secondary); margin: 0; line-height: 1.55; }
.svc ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.svc ul li { font-size: 12.5px; color: var(--text-body); padding: 5px 11px; border-radius: var(--r-sm); background: var(--surface-item); border: 1px solid var(--border-subtle); font-family: var(--font-mono); letter-spacing: .01em; white-space: nowrap; }

/* ───────────── About ───────────── */
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(36px, 5vw, 72px); align-items: start; }
.about-photo { position: relative; }
.about-photo image-slot { width: 100%; aspect-ratio: 4 / 5; border-radius: var(--r-xl); border: 1px solid var(--border-card); }
.about-photo .portrait { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-xl); border: 1px solid var(--border-card); display: block; }
.about-photo .frame-tag { position: absolute; bottom: 16px; left: 16px; right: 16px; display: flex; align-items: center; justify-content: space-between; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); }
.about-body p { font-size: var(--fs-lead); color: var(--text-body); margin: 0 0 18px; line-height: 1.6; }
.about-body p.lede { color: var(--text-heading); font-weight: 500; }

.skills { margin-top: 34px; display: grid; gap: 22px; }
.skill-row { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: baseline; padding-top: 18px; border-top: 1px solid var(--border-subtle); }
.skill-row h4 { margin: 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-secondary); font-weight: 500; }
.skill-row .tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-row .tags span { font-size: 14px; color: var(--text-body); padding: 6px 13px; border-radius: var(--r-pill); background: var(--surface-item); border: 1px solid var(--border-card); }

/* Experience */
.exp { margin-top: 44px; display: grid; gap: 0; }
.exp-item { display: grid; grid-template-columns: 140px 1fr; gap: 24px; padding: 22px 0; border-top: 1px solid var(--border-subtle); }
.exp-item:last-child { border-bottom: 1px solid var(--border-subtle); }
.exp-item .yr { font-family: var(--font-mono); font-size: 14px; color: var(--brand); font-feature-settings: 'tnum' 1; }
.exp-item .role { font-size: 18px; font-weight: 700; color: var(--text-heading); letter-spacing: -0.01em; }
.exp-item .org { font-size: 15px; color: var(--text-secondary); margin-top: 3px; }

/* ───────────── Contact ───────────── */
.contact { background: var(--bg-panel); border-top: 1px solid var(--border-subtle); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5vw, 80px); align-items: start; }
.contact h2 { font-size: var(--fs-h2); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; color: var(--text-heading); margin: 16px 0 0; text-wrap: balance; }
.contact .sub { font-size: var(--fs-lead); color: var(--text-secondary); margin: 18px 0 0; max-width: 42ch; }

.contact-list { margin-top: 38px; display: grid; gap: 14px; }
.contact-list a {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px;
  background: var(--surface-card); border: 1px solid var(--border-card); border-radius: var(--r-md);
  transition: border-color .25s, transform .3s var(--ease), background .25s;
}
.contact-list a:hover { border-color: var(--brand); transform: translateX(4px); }
.contact-list .ci { width: 42px; height: 42px; border-radius: var(--r-sm); background: var(--surface-item); border: 1px solid var(--border-card); display: grid; place-items: center; color: var(--brand); flex: none; }
.contact-list .ci svg { width: 20px; height: 20px; }
.contact-list .ct { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.contact-list .cv { font-size: 16px; color: var(--text-heading); font-weight: 500; margin-top: 2px; }

/* Form */
.form { background: var(--surface-card); border: 1px solid var(--border-card); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 38px); }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 9px; }
.field label .req { color: var(--brand-rose); }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg-basket); border: 1px solid var(--border-card); border-radius: var(--r-sm);
  color: var(--text-heading); font-family: inherit; font-size: 16px; padding: 14px 15px;
  transition: border-color .2s, box-shadow .2s; appearance: none;
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255,111,71,.18);
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b4a89e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; padding-right: 42px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field .err { color: var(--brand-rose); font-size: 12.5px; margin-top: 7px; display: none; }
.field.invalid input, .field.invalid textarea { border-color: var(--brand-rose); }
.field.invalid .err { display: block; }
.form-note { font-size: 13px; color: var(--text-muted); margin-top: 10px; line-height: 1.5; }
.form-success { display: none; text-align: center; padding: 30px 10px; }
.form-success.show { display: block; }
.form-success .check { width: 56px; height: 56px; border-radius: 999px; background: var(--tint-teal); color: var(--accent-teal); display: grid; place-items: center; margin: 0 auto 18px; border: 1px solid var(--border-card); }
.form-success h3 { color: var(--text-heading); font-size: 22px; margin: 0 0 8px; }
.form-success p { color: var(--text-secondary); margin: 0; }
.form.sent .form-body { display: none; }

/* ───────────── Footer ───────────── */
.footer { border-top: 1px solid var(--border-subtle); padding-block: 48px 40px; }
.footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { font-size: 14px; color: var(--text-secondary); transition: color .2s; }
.footer-links a:hover { color: var(--text-heading); }
.footer .meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); letter-spacing: .03em; }
.to-top { width: 44px; height: 44px; border-radius: var(--r-sm); border: 1px solid var(--border-card); background: var(--surface-item); color: var(--text-heading); display: grid; place-items: center; cursor: pointer; transition: border-color .2s, transform .3s var(--ease); }
.to-top:hover { border-color: var(--brand); transform: translateY(-2px); }

/* ───────────── Reveal animation (progressive enhancement) ─────────────
   Opacity stays at 1 in every state so content is never hidden — even if JS,
   IntersectionObserver, or transitions don't run. The entrance is a subtle
   transform-only slide that real browsers animate; a frozen capture just
   shows the content ~18px lower, still fully visible. */
.reveal { opacity: 1; transform: none; }
html.js .reveal { transform: translateY(18px); transition: transform .6s var(--ease); }
html.js .reveal.in { transform: none; }
@media (prefers-reduced-motion: reduce) { html.js .reveal { transform: none; transition: none; } .dot::after { animation: none; } }

/* ───────────── Responsive ───────────── */
@media (max-width: 940px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { max-width: 440px; }
  .hero-badge { left: auto; right: 18px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 380px; }
  .contact-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: grid; }
  .nav.menu-open .nav-links {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: rgba(16,13,12,.97); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-subtle); padding: 14px var(--gutter) 22px;
  }
  .nav.menu-open .nav-links a { padding: 14px; font-size: 17px; }
  .svc-grid { grid-template-columns: 1fr; }
  .skill-row { grid-template-columns: 1fr; gap: 10px; }
  .exp-item { grid-template-columns: 1fr; gap: 6px; }
  .field-row { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .work-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { flex: 1; }
}
