/* =========================================================================
   Ehashan Pial — Portfolio
   Design: editorial-academic × modern developer.
   Display serif (Fraunces) + grotesque sans (Geist) + mono (Geist Mono).
   Palette: navy ink, paper, warm terracotta accent.
   ========================================================================= */

:root {
  /* light theme */
  --paper:        #fcfbf8;
  --paper-2:      #f4f2ec;
  --surface:      #ffffff;
  --ink:          #131a26;
  --ink-soft:     #3a4456;
  --ink-faint:    #6b7488;
  --line:         #e6e2d8;
  --line-strong:  #d6d1c4;
  --navy:         #0f1a2e;
  --accent:       #c2533b;
  --accent-soft:  #e9d3cb;
  --accent-ink:   #9c3f2b;
  --code-bg:      #f6f8fa;
  --code-border:  #e4e7eb;
  --shadow:       0 1px 2px rgba(19,26,38,.06), 0 8px 28px -12px rgba(19,26,38,.18);
  --shadow-lg:    0 24px 60px -24px rgba(19,26,38,.35);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans:    "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "Geist Mono", "SF Mono", ui-monospace, Menlo, monospace;

  --maxw: 1120px;
  --radius: 14px;
  --radius-sm: 9px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

[data-theme="dark"] {
  --paper:        #0b111c;
  --paper-2:      #0f1726;
  --surface:      #121c2e;
  --ink:          #e9ecf2;
  --ink-soft:     #b5bdcc;
  --ink-faint:    #7e889b;
  --line:         #1f2a3d;
  --line-strong:  #2a374d;
  --navy:         #0a1322;
  --accent:       #e0735a;
  --accent-soft:  #2c2019;
  --accent-ink:   #f0937e;
  --code-bg:      #0e1726;
  --code-border:  #1f2a3d;
  --shadow:       0 1px 2px rgba(0,0,0,.4), 0 10px 30px -12px rgba(0,0,0,.6);
  --shadow-lg:    0 28px 70px -28px rgba(0,0,0,.8);
}

/* ----------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background .4s var(--ease), color .4s var(--ease);
}

/* subtle dotted-grid atmosphere */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0);
  background-size: 38px 38px;
  opacity: .5;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

::selection { background: var(--accent); color: #fff; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }

/* ----------------------------------------------------------- navigation */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 28px;
  height: 66px; display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 600; letter-spacing: -.01em; }
.brand-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--navy); color: #f4f1ea;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  letter-spacing: -.5px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
[data-theme="dark"] .brand-mark { background: var(--accent); color: #1a0f0a; }
.brand-name { font-size: 16px; }

.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  position: relative; padding: 8px 14px; border-radius: 8px;
  font-size: 14.5px; font-weight: 500; color: var(--ink-soft);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--paper-2); }
.nav-links a.is-active { color: var(--accent); }
.nav-links a.is-active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: var(--accent); border-radius: 2px;
}

.nav-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px;
  color: var(--ink-soft); transition: background .2s, color .2s, transform .2s;
}
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.icon-btn:active { transform: scale(.92); }
.i-moon { display: none; }
[data-theme="dark"] .i-sun { display: none; }
[data-theme="dark"] .i-moon { display: block; }
.menu-only { display: none; }

.mobile-menu {
  display: none; flex-direction: column; padding: 8px 28px 18px;
  border-bottom: 1px solid var(--line); background: var(--paper);
}
.mobile-menu a { padding: 12px 4px; font-weight: 500; border-bottom: 1px solid var(--line); }
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu.open { display: flex; }

/* --------------------------------------------------------------- layout */
section { position: relative; z-index: 1; }
.section { padding: 92px 0; }
.section-head { margin-bottom: 48px; max-width: 640px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -.02em; color: var(--ink); }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); }
.section-head p { margin-top: 14px; color: var(--ink-soft); font-size: 17px; }

/* ----------------------------------------------------------------- hero */
.hero { padding: 72px 0 60px; }
.hero-grid {
  display: grid; grid-template-columns: 1.45fr .9fr; gap: 56px; align-items: center;
}
.hero-roles {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px;
}
.role-chip {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em;
  padding: 5px 11px; border-radius: 100px;
  border: 1px solid var(--line-strong); color: var(--ink-soft); background: var(--surface);
}
.hero h1 {
  font-size: clamp(40px, 6.4vw, 74px); line-height: .98; letter-spacing: -.03em;
}
.hero h1 .accent { color: var(--accent); font-style: italic; font-weight: 500; }
.hero-bio { margin-top: 24px; font-size: 18px; color: var(--ink-soft); max-width: 54ch; }
.hero-cta { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 20px; border-radius: 100px; font-weight: 600; font-size: 14.5px;
  transition: transform .2s var(--ease), box-shadow .2s, background .2s, color .2s, border-color .2s;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--ink); color: var(--paper); box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
[data-theme="dark"] .btn-primary { background: var(--accent); color: #1a0f0a; }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

.hero-socials { margin-top: 26px; display: flex; gap: 6px; }
.social-link {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px;
  border: 1px solid var(--line); color: var(--ink-soft);
  transition: color .2s, border-color .2s, transform .2s, background .2s;
}
.social-link:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); background: var(--surface); }
.social-link svg { width: 19px; height: 19px; }

/* portrait */
.hero-portrait { position: relative; justify-self: center; }
.portrait-frame {
  position: relative; width: 290px; height: 350px; border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait-frame::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(15,26,46,.28));
}
.portrait-badge {
  position: absolute; bottom: 18px; left: 18px; right: 18px; z-index: 2;
  display: flex; align-items: center; gap: 9px;
  padding: 9px 13px; border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(8px); border: 1px solid var(--line);
  font-size: 13px; font-weight: 500;
}
.pulse { width: 9px; height: 9px; border-radius: 50%; background: #2ea36b; box-shadow: 0 0 0 0 rgba(46,163,107,.6); animation: pulse 2.4s infinite; flex: none; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(46,163,107,.5)} 70%{box-shadow:0 0 0 10px rgba(46,163,107,0)} 100%{box-shadow:0 0 0 0 rgba(46,163,107,0)} }
.portrait-deco {
  position: absolute; inset: -14px; border-radius: 26px; z-index: -1;
  background: var(--accent); opacity: .9;
  transform: rotate(-3deg);
}
[data-theme="dark"] .portrait-deco { opacity: .8; }

/* stats strip */
.stats {
  margin-top: 64px; display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--surface);
}
.stat { padding: 24px 26px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat-value { font-family: var(--font-display); font-size: 34px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; }
.stat-value .accent { color: var(--accent); }
.stat-label { font-size: 13px; color: var(--ink-faint); margin-top: 2px; letter-spacing: .02em; }

/* --------------------------------------------------------- timeline */
.tl-tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.tl-col h3.tl-heading {
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .14em; color: var(--ink-faint);
  margin-bottom: 28px;
}
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--line-strong), transparent);
}
.tl-item { position: relative; padding-bottom: 36px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -30px; top: 4px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-strong);
}
.tl-item.now .tl-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-period { font-family: var(--font-mono); font-size: 12.5px; color: var(--accent); letter-spacing: .02em; }
.tl-item h4 { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin-top: 4px; }
.tl-sub { font-size: 14.5px; color: var(--ink-soft); margin-top: 2px; }
.tl-loc { font-size: 13px; color: var(--ink-faint); margin-top: 2px; }
.tl-points { margin-top: 12px; list-style: none; display: grid; gap: 7px; }
.tl-points li { position: relative; padding-left: 18px; font-size: 14.5px; color: var(--ink-soft); }
.tl-points li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); opacity: .7; }

/* ----------------------------------------------------- publications */
.pub-list { display: grid; gap: 18px; }
.pub-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
  position: relative; overflow: hidden;
}
.pub-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent);
  transform: scaleY(0); transform-origin: top; transition: transform .35s var(--ease);
}
.pub-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.pub-card:hover::before { transform: scaleY(1); }
.pub-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.pub-badge {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 500;
}
.pub-year { font-family: var(--font-mono); font-size: 13px; color: var(--ink-faint); }
.pub-cite { margin-left: auto; font-size: 12.5px; color: var(--ink-faint); display: inline-flex; align-items: center; gap: 5px; }
.pub-card h3 { font-size: 21px; line-height: 1.25; }
.pub-authors { margin-top: 8px; font-size: 14.5px; color: var(--ink-soft); }
.pub-authors .me { color: var(--accent); font-weight: 600; }
.pub-venue { margin-top: 4px; font-size: 14px; font-style: italic; color: var(--ink-faint); font-family: var(--font-display); }
.pub-abstract { margin-top: 14px; font-size: 14.5px; color: var(--ink-soft); }
.pub-links { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.pub-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; padding: 7px 13px; border-radius: 8px;
  border: 1px solid var(--line-strong); color: var(--ink); transition: all .2s;
}
.pub-link:hover { border-color: var(--accent); color: var(--accent); }

/* --------------------------------------------------------- projects */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.filter-btn {
  font-size: 13.5px; font-weight: 500; padding: 8px 16px; border-radius: 100px;
  border: 1px solid var(--line-strong); color: var(--ink-soft); transition: all .2s;
}
.filter-btn:hover { color: var(--ink); border-color: var(--ink); }
.filter-btn.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
[data-theme="dark"] .filter-btn.active { background: var(--accent); color: #1a0f0a; border-color: var(--accent); }

.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.proj-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s, border-color .3s;
}
.proj-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.proj-banner {
  height: 128px; position: relative; overflow: hidden;
  display: grid; place-items: center;
  background: var(--navy);
}
.proj-banner svg { width: 100%; height: 100%; position: absolute; inset: 0; opacity: .9; }
.proj-banner .proj-init {
  position: relative; z-index: 1; font-family: var(--font-display); font-size: 40px; font-weight: 600;
  color: rgba(255,255,255,.95); letter-spacing: -1px;
}
.proj-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.proj-cat {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 9px;
}
.proj-card h3 { font-size: 19px; line-height: 1.2; }
.proj-desc { margin-top: 10px; font-size: 14px; color: var(--ink-soft); flex: 1; }
.proj-stack { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--font-mono); font-size: 11.5px; padding: 3px 9px; border-radius: 6px;
  background: var(--paper-2); color: var(--ink-soft); border: 1px solid var(--line);
}
.proj-actions { margin-top: 18px; display: flex; gap: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.proj-actions a { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; color: var(--ink-soft); transition: color .2s; }
.proj-actions a:hover { color: var(--accent); }
.proj-actions svg { width: 16px; height: 16px; }

/* --------------------------------------------------------- blog list */
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.blog-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.blog-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.blog-cat {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 500;
}
.blog-date { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-faint); }
.blog-card h2 { font-size: 24px; line-height: 1.2; }
.blog-card p { margin-top: 12px; font-size: 15px; color: var(--ink-soft); flex: 1; }
.blog-more { margin-top: 18px; font-size: 14px; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 7px; transition: gap .2s; }
.blog-card:hover .blog-more { gap: 12px; }

/* --------------------------------------------------- blog post / md */
.post { max-width: 760px; margin: 0 auto; }
.post-header { margin-bottom: 40px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.post-back { font-size: 14px; color: var(--ink-faint); display: inline-flex; align-items: center; gap: 7px; margin-bottom: 26px; transition: gap .2s, color .2s; }
.post-back:hover { color: var(--accent); gap: 11px; }
.post-header h1 { font-size: clamp(32px, 5vw, 50px); line-height: 1.04; }
.post-meta { margin-top: 18px; display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--ink-faint); }

/* GitHub-flavoured markdown body */
.md { font-size: 16.5px; line-height: 1.75; color: var(--ink-soft); }
.md > *:first-child { margin-top: 0; }
.md h1, .md h2, .md h3, .md h4 { color: var(--ink); margin: 1.8em 0 .7em; line-height: 1.25; }
.md h1 { font-size: 30px; }
.md h2 { font-size: 25px; padding-bottom: .3em; border-bottom: 1px solid var(--line); }
.md h3 { font-size: 20px; }
.md h4 { font-size: 17px; }
.md p { margin: 1.05em 0; }
.md a { color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.md a:hover { text-decoration-thickness: 2px; }
.md ul, .md ol { margin: 1.05em 0; padding-left: 1.6em; }
.md li { margin: .4em 0; }
.md li::marker { color: var(--ink-faint); }
.md blockquote {
  margin: 1.4em 0; padding: 4px 20px; border-left: 4px solid var(--accent-soft);
  color: var(--ink-faint); background: var(--paper-2); border-radius: 0 8px 8px 0;
}
.md blockquote p { margin: .6em 0; }
.md hr { border: none; border-top: 1px solid var(--line); margin: 2.4em 0; }
.md img { border-radius: 10px; margin: 1.4em 0; border: 1px solid var(--line); }

/* inline code */
.md code {
  font-family: var(--font-mono); font-size: .86em;
  background: var(--code-bg); border: 1px solid var(--code-border);
  padding: .15em .4em; border-radius: 6px; color: var(--ink);
}
/* code blocks */
.md pre {
  background: var(--code-bg); border: 1px solid var(--code-border);
  border-radius: 10px; padding: 18px 20px; overflow-x: auto; margin: 1.5em 0;
  font-size: 14px; line-height: 1.6;
}
.md pre code { background: none; border: none; padding: 0; font-size: 14px; color: inherit; }
.highlight { background: var(--code-bg) !important; border-radius: 10px; }
.highlight pre { margin: 0; border: none; }

/* tables (GitHub style) */
.md table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 15px; }
.md th, .md td { border: 1px solid var(--line-strong); padding: 9px 14px; text-align: left; }
.md th { background: var(--paper-2); font-weight: 600; color: var(--ink); }
.md tr:nth-child(even) td { background: var(--paper-2); }

/* admonitions */
.md .admonition { border: 1px solid var(--line-strong); border-left: 4px solid var(--accent); border-radius: 8px; padding: 4px 18px; margin: 1.5em 0; background: var(--surface); }
.md .admonition-title { font-weight: 700; color: var(--ink); margin-top: .8em; }

.post-related { max-width: 760px; margin: 64px auto 0; padding-top: 36px; border-top: 1px solid var(--line); }
.post-related h3 { font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-faint); font-weight: 500; margin-bottom: 20px; }

/* --------------------------------------------------------- contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-info { display: grid; gap: 4px; }
.contact-item {
  display: flex; gap: 16px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid var(--line);
}
.contact-item:last-child { border-bottom: none; }
.contact-ico {
  flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--paper-2); color: var(--accent); border: 1px solid var(--line);
}
.contact-ico svg { width: 20px; height: 20px; }
.contact-item .label { font-size: 12.5px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); }
.contact-item .value { font-size: 16px; color: var(--ink); margin-top: 2px; word-break: break-word; }
.contact-item a.value:hover { color: var(--accent); }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 7px; color: var(--ink-soft); }
.field input, .field textarea {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: 9px;
  padding: 12px 14px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-note { font-size: 13px; color: var(--ink-faint); margin-top: 10px; }
.alert-ok {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 14.5px; font-weight: 500; margin-bottom: 22px;
}

/* --------------------------------------------------------- 404 */
.nf { text-align: center; padding: 140px 0; }
.nf h1 { font-size: clamp(80px, 16vw, 180px); color: var(--accent); line-height: 1; }
.nf p { font-size: 18px; color: var(--ink-soft); margin-top: 10px; }
.nf .btn { margin-top: 28px; }

/* --------------------------------------------------- reveal animation */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }

/* hero load stagger */
.hero .anim { opacity: 0; transform: translateY(20px); animation: rise .8s var(--ease) forwards; }
.hero .anim.d1 { animation-delay: .05s; }
.hero .anim.d2 { animation-delay: .15s; }
.hero .anim.d3 { animation-delay: .25s; }
.hero .anim.d4 { animation-delay: .35s; }
.hero .anim.d5 { animation-delay: .45s; }
.hero-portrait { opacity: 0; transform: translateY(20px) scale(.97); animation: rise .9s var(--ease) .3s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* --------------------------------------------------------- responsive */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-portrait { justify-self: start; order: -1; }
  .tl-tracks { grid-template-columns: 1fr; gap: 44px; }
  .proj-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .nav-links { display: none; }
  .menu-only { display: grid; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
  .proj-grid, .blog-grid { grid-template-columns: 1fr; }
  .wrap { padding: 0 20px; }
  .nav-inner { padding: 0 20px; }
}
/* --------------------------------------------------------- footer */
.footer {
  margin-top: 80px;
  padding: 72px 0 32px;
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 1;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}
.footer-cols {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 56px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line);
}
.footer-brand-col { max-width: 380px; }
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 600;
  color: var(--ink);
}
.footer-name { font-size: 16px; letter-spacing: -.01em; }
.footer-tag {
  margin-top: 18px;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.65;
}
.footer-loc {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--ink-faint);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.footer-loc svg { width: 14px; height: 14px; flex: none; }

.footer-heading {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ink-faint);
  margin: 0 0 20px;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 11px;
}
.footer-col a {
  font-size: 14.5px;
  color: var(--ink-soft);
  transition: color .2s, padding-left .2s;
  position: relative;
}
.footer-col a::before {
  content: "→";
  position: absolute;
  left: -18px;
  opacity: 0;
  transition: opacity .2s, left .2s;
  color: var(--accent);
}
.footer-col a:hover {
  color: var(--accent);
  padding-left: 4px;
}
.footer-col a:hover::before {
  opacity: 1;
  left: -14px;
}

.footer-bottom {
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-copy, .footer-built {
  font-size: 13px;
  color: var(--ink-faint);
  margin: 0;
}
.footer-built { font-family: var(--font-mono); letter-spacing: .01em; }

@media (max-width: 720px) {
  .footer { padding: 56px 0 28px; margin-top: 60px; }
  .footer-cols {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-bottom: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}