/* ═══════════════════════════════════════════════════════════════
   Avaneeth Anil — portfolio
   1. Tokens          5. Hero
   2. Reset / base    6. Sections (About / Research / Skills / Contact)
   3. Primitives      7. Footer
   4. Topbar          8. Motion & responsive
   ═══════════════════════════════════════════════════════════════ */

/* ───────────────────────── 1. TOKENS ───────────────────────── */

:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: "Source Serif 4", ui-serif, Georgia, "Times New Roman", serif;
  --display-weight: 600;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* fluid type scale */
  --t-hero: clamp(3.6rem, 17vw, 11.5rem);
  --t-h2: clamp(2.15rem, 5.6vw, 4.25rem);
  --t-h3: clamp(1.05rem, 1.9vw, 1.45rem);
  --t-lede: clamp(1.05rem, 2.1vw, 1.5rem);
  --t-body: clamp(0.975rem, 1.15vw, 1.0625rem);
  --t-meta: 0.78rem;

  --wrap: 1180px;
  --gut: clamp(1.25rem, 5vw, 5.5rem);
  --sec-y: clamp(6rem, 13vh, 11rem);

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 22px;
  --r-pill: 999px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.6s;
}

/* dark (default) */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0b0d;
  --bg-2: #101013;
  --bg-3: #16161a;
  --fg: #f4f4f2;
  --fg-2: #a9a9a3;
  --fg-3: #7e7e78;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.17);
  --accent: #ff6a3d;
  --accent-2: #3dd6ff;
  --accent-soft: rgba(255, 106, 61, 0.13);
  --shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.85);
  --glow: 0 0 90px -20px rgba(255, 106, 61, 0.35);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fafaf8;
  --bg-2: #ffffff;
  --bg-3: #f1f1ed;
  --fg: #131316;
  --fg-2: #55555a;
  --fg-3: #6b6b72;
  --line: rgba(0, 0, 0, 0.11);
  --line-2: rgba(0, 0, 0, 0.22);
  --accent: #c23a14;
  --accent-2: #0a7ea4;
  --accent-soft: rgba(194, 58, 20, 0.09);
  --shadow: 0 30px 70px -34px rgba(20, 20, 30, 0.22);
  --glow: 0 0 90px -20px rgba(194, 58, 20, 0.18);
}

/* ─────────────────────── 2. RESET / BASE ─────────────────────── */

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

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.45s var(--ease), color 0.45s var(--ease);
}

body.is-locked { overflow: hidden; }

img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--fg);
  border-radius: var(--r-sm);
  transform: translateY(-160%);
  transition: transform 0.25s var(--ease);
}
.skip-link:focus-visible { transform: none; }

/* ──────────────────────── 3. PRIMITIVES ──────────────────────── */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-meta);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fg-2);
}

em { font-style: italic; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.95rem 1.5rem;
  font-size: 0.925rem;
  font-weight: 550;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  white-space: nowrap;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease),
              border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn--sm { padding: 0.55rem 1.05rem; font-size: 0.85rem; }

.btn--solid { color: var(--bg); background: var(--fg); }
.btn--solid:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }

.btn--ghost { color: var(--fg); border-color: var(--line-2); }
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.btn__arrow { width: 15px; height: 15px; transition: transform 0.3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

.tag {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--fg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.tag--wireless { color: #ff8a5c; border-color: rgba(255, 138, 92, 0.35); }
.tag--health   { color: #62d8c4; border-color: rgba(98, 216, 196, 0.35); }
.tag--bio      { color: #9db8ff; border-color: rgba(157, 184, 255, 0.35); }
.tag--iot      { color: #d4c65a; border-color: rgba(212, 198, 90, 0.35); }
.tag--rf       { color: #6fc4ff; border-color: rgba(111, 196, 255, 0.35); }

:root[data-theme="light"] .tag--wireless { color: #b8431c; border-color: rgba(184, 67, 28, 0.3); }
:root[data-theme="light"] .tag--health   { color: #0d7a6a; border-color: rgba(13, 122, 106, 0.3); }
:root[data-theme="light"] .tag--bio      { color: #3c53a8; border-color: rgba(60, 83, 168, 0.3); }
:root[data-theme="light"] .tag--iot      { color: #806b0b; border-color: rgba(128, 107, 11, 0.3); }
:root[data-theme="light"] .tag--rf       { color: #0a6b96; border-color: rgba(10, 107, 150, 0.3); }

.scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 120;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* ───────────────────────── 4. TOPBAR ───────────────────────── */

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease),
              backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.topbar.is-stuck {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom-color: var(--line);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 1.05rem var(--gut);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: auto;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: var(--display-weight);
  letter-spacing: 0.015em;
  line-height: 1;
  color: var(--accent);
  border: 1px solid var(--line-2);
  border-radius: 9px;
  transition: color 0.3s var(--ease), background-color 0.3s var(--ease),
              border-color 0.3s var(--ease);
}
/* the monogram inverts on hover; rotating lettering read as a glitch */
.brand:hover .brand__mark {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}
.brand__name { font-size: 0.975rem; }

.topnav { display: flex; gap: 1.4rem; }
.topnav a {
  position: relative;
  font-size: 0.925rem;
  font-weight: 450;
  color: var(--fg-2);
  padding-block: 0.25rem;
  transition: color 0.25s var(--ease);
}
.topnav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.35s var(--ease);
}
.topnav a:hover,
.topnav a.is-active { color: var(--fg); }
.topnav a:hover::after,
.topnav a.is-active::after { transform: scaleX(1); }

.topbar__actions { display: flex; align-items: center; gap: 0.6rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--fg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
              background-color 0.25s var(--ease);
}
.icon-btn:hover { color: var(--fg); border-color: var(--line-2); background: var(--bg-3); }
.icon-btn svg { width: 17px; height: 17px; }
:root[data-theme="dark"] .icon-btn__moon { display: none; }
:root[data-theme="light"] .icon-btn__sun { display: none; }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}
.burger span {
  width: 14px;
  height: 1.5px;
  margin-inline: auto;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.2s linear;
}
.burger.is-open span:first-child { transform: translateY(3.25px) rotate(45deg); }
.burger.is-open span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* mobile drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem var(--gut) 2.5rem;
  background: var(--bg);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.drawer[hidden] { display: none; }
.drawer.is-open { opacity: 1; }

.drawer__nav { display: flex; flex-direction: column; gap: 0.35rem; }
.drawer__nav a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-block: 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 12vw, 3.6rem);
  line-height: 1.05;
  border-bottom: 1px solid var(--line);
  transition: color 0.25s var(--ease), padding-left 0.35s var(--ease);
}
.drawer__nav a:hover { color: var(--accent); padding-left: 0.5rem; }
.drawer__num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
}
.drawer__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2.5rem;
  font-family: var(--font-mono);
  font-size: var(--t-meta);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.drawer__foot a:hover { color: var(--accent); }

/* ────────────────────────── 5. HERO ────────────────────────── */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100svh;
  padding: 8rem 0 5.5rem;
  overflow: hidden;
  isolation: isolate;
}

.hero__field {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(112% 88% at 2% 46%, var(--bg) 0%,
      color-mix(in srgb, var(--bg) 90%, transparent) 42%, transparent 76%),
    linear-gradient(180deg, var(--bg) 0%, transparent 20%, transparent 70%, var(--bg) 100%);
}

.hero__inner {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

.pulse {
  position: relative;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-top: 0.42em;
  background: var(--accent);
  border-radius: 50%;
}
.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { transform: scale(3.6); opacity: 0; }
  100% { transform: scale(3.6); opacity: 0; }
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--t-hero);
  font-weight: var(--display-weight);
  font-optical-sizing: auto;
  line-height: 0.94;
  letter-spacing: -0.021em;
}
.hero__line { display: block; }
.hero__line--alt {
  font-style: italic;
  padding-left: 0.08em;
  color: var(--accent);
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .hero__line--alt {
    background: linear-gradient(96deg, var(--accent) 12%, var(--accent-2) 92%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.hero__lede {
  max-width: 34ch;
  margin-top: clamp(1.5rem, 3.5vw, 2.4rem);
  font-size: var(--t-lede);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--fg);
}
.hero__lede em { color: var(--fg); font-style: italic; }

.hero__affil {
  margin-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: var(--t-meta);
  letter-spacing: 0.04em;
  color: var(--fg-3);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(2rem, 4vw, 2.75rem);
}

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  margin-top: clamp(2.25rem, 4.5vw, 3.25rem);
}
.social a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--t-meta);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-2);
  transition: color 0.25s var(--ease), transform 0.3s var(--ease);
}
.social svg { width: 16px; height: 16px; }
.social a:hover { color: var(--accent); transform: translateY(-2px); }

.hero__scroll {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: var(--wrap);
  margin: clamp(3rem, 7vh, 5rem) auto 0;
  padding-inline: var(--gut);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-3);
  transition: color 0.25s var(--ease);
}
.hero__scroll:hover { color: var(--fg); }
.hero__scroll-rail {
  position: relative;
  width: clamp(60px, 12vw, 120px);
  height: 1px;
  background: var(--line-2);
  overflow: hidden;
}
.hero__scroll-rail span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 34%;
  background: var(--accent);
  animation: rail 2.6s var(--ease) infinite;
}
@keyframes rail {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(320%); }
}

/* ──────────────────────── 6. SECTIONS ──────────────────────── */

.section { position: relative; padding-block: var(--sec-y); }
.section--flush { padding-top: 0; }
.section--contact { padding-bottom: clamp(4rem, 8vh, 7rem); }

.section__head { margin-bottom: clamp(2rem, 4.5vw, 3.25rem); }

/* The numbered label *is* the section heading — no display line above it. */
.section__label {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-mono);
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg);
}
.section__num {
  color: var(--accent);
  font-weight: 500;
}
.section__label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}



/* ── About ── */

.about {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(2.25rem, 5vw, 4rem);
  align-items: start;
}

.about__media { padding-top: 0.35rem; }

/* The facts list spans both columns so its rules run the full measure, the way
   every other section's hairlines do — and it fills the space under the photo. */
.facts { grid-column: 1 / -1; }

/* The source photo carries a baked-in circular mask on white, so the frame is
   a circle and the image is scaled just past it — that pushes the white
   corners outside the clip instead of leaving a rim. A hairline ring replaces
   the old drop-glow, which muddied the edge against the dark background. */
.portrait {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.02) contrast(1.02);
  transform: scale(1.04);
  transition: transform 0.9s var(--ease);
}
.portrait:hover img { transform: scale(1.09); }
.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  pointer-events: none;
}

.prose p + p { margin-top: 1.15rem; }
.prose p {
  font-size: clamp(1rem, 1.35vw, 1.1rem);
  line-height: 1.72;
  color: var(--fg-2);
}
.prose strong { color: var(--fg); font-weight: 600; }

.facts { grid-column: 1 / -1; margin-top: clamp(0.5rem, 1.5vw, 1rem); }
.facts__row {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1.25rem;
  padding-block: 1.05rem;
  border-top: 1px solid var(--line);
}
.facts__row:last-child { border-bottom: 1px solid var(--line); }
.facts dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding-top: 0.2rem;
}
.facts dd { font-size: 0.95rem; line-height: 1.6; color: var(--fg); }
.facts__note { color: var(--fg-3); }



/* ── Research ── */



.pub {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  gap: 0 1.5rem;
  padding-block: clamp(1.75rem, 3.5vw, 2.35rem);
  border-top: 1px solid var(--line);
  transition: opacity 0.35s var(--ease);
}
.pubs > .pub:last-child { border-bottom: 1px solid var(--line); }
.pub.is-filtered { display: none; }

.pub__index {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--fg-3);
  transition: color 0.3s var(--ease);
}
.pub:hover .pub__index { color: var(--accent); }

.pub__venue {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.55rem;
}
.pub__cite { color: var(--fg-3); letter-spacing: 0.04em; text-transform: none; }

.pub__title {
  font-size: var(--t-h3);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.015em;
  color: var(--fg);
  text-wrap: balance;
}

.pub__authors {
  margin-top: 0.55rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--fg-2);
}
.pub__authors .me { color: var(--fg); font-weight: 650; }

.pub__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.4rem;
  margin-top: 1.05rem;
}
.pub__links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.pub__links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-2);
  transition: color 0.25s var(--ease);
}
.pub__links svg { width: 11px; height: 11px; transition: transform 0.3s var(--ease); }
.pub__links a:hover { color: var(--accent); }
.pub__links a:hover svg { transform: translate(2px, -2px); }



/* ── Experience ── */

.role {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  gap: 0.6rem 2.5rem;
  padding-block: clamp(1.85rem, 4vw, 2.6rem);
  border-top: 1px solid var(--line);
}
.roles > .role:last-child { border-bottom: 1px solid var(--line); }

.role__when {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-top: 0.2rem;
}
.role__dates {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-2);
}
/* accent is reserved for the affiliation that is still running */
.role--current .role__dates { color: var(--accent); }
.role__place {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.role__title {
  font-size: clamp(1.15rem, 2.1vw, 1.55rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--fg);
}
.role__org {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--fg-2);
}
.role__note {
  max-width: 56ch;
  margin-top: 0.9rem;
  font-size: 0.95rem;
  line-height: 1.68;
  color: var(--fg-2);
}
.role__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.1rem;
}
.role__tags li {
  padding: 0.3rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--fg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.role:hover .role__tags li { color: var(--fg-2); border-color: var(--line-2); }

/* Earlier titles held at the same affiliation */
.track {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.15rem;
  padding-left: 1.1rem;
  border-left: 1px solid var(--line);
}
.track::before {
  content: "Previously";
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.track__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 1rem;
}
.track__dates {
  flex: 0 0 9.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.track__role {
  font-size: 0.925rem;
  font-weight: 550;
  color: var(--fg-2);
}
/* ── News, talks & demos ── */

.news-item {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  gap: 0.5rem 2.5rem;
  padding-block: clamp(1.5rem, 3vw, 2.1rem);
  border-top: 1px solid var(--line);
}
.news > .news-item:last-child { border-bottom: 1px solid var(--line); }

.news-item__date {
  padding-top: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.news-item__kind {
  display: inline-block;
  margin-bottom: 0.6rem;
  padding: 0.24rem 0.62rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  border-radius: var(--r-pill);
}
.news-item__kind--talk   { color: #ff8a5c; }
.news-item__kind--poster { color: #62d8c4; }
.news-item__kind--demo   { color: #6fc4ff; }
:root[data-theme="light"] .news-item__kind--talk   { color: #b8431c; }
:root[data-theme="light"] .news-item__kind--poster { color: #0d7a6a; }
:root[data-theme="light"] .news-item__kind--demo   { color: #0a6b96; }

.news-item__title {
  font-size: clamp(1.02rem, 1.8vw, 1.32rem);
  font-weight: 600;
  line-height: 1.34;
  letter-spacing: -0.013em;
  color: var(--fg);
  text-wrap: balance;
}
.news-item__venue {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.9rem;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--fg-2);
}
.news-item__venue em { color: var(--fg); font-style: italic; }
.news-item__link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--fg-3);
  transition: color 0.25s var(--ease);
}
.news-item__link svg { width: 10px; height: 10px; transition: transform 0.3s var(--ease); }
.news-item__link:hover { color: var(--accent); }
.news-item__link:hover svg { transform: translate(2px, -2px); }

/* ── Empty-state panel (Publications, until there are entries) ── */

.empty {
  padding: clamp(2.25rem, 5vw, 3.5rem);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}
.empty__head {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: var(--display-weight);
  font-style: italic;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--fg);
}
.empty__note {
  max-width: 52ch;
  margin-top: 0.9rem;
  font-size: 0.975rem;
  line-height: 1.68;
  color: var(--fg-2);
}
.empty__note a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--accent);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.4s var(--ease);
}
.empty__note a svg { width: 11px; height: 11px; }
.empty__note a:hover { background-size: 100% 1px; }

/* ── Skillset ── */

.skill-row {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  padding-block: clamp(1.85rem, 4vw, 2.6rem);
  border-top: 1px solid var(--line);
}
.skills > .skill-row:last-child { border-bottom: 1px solid var(--line); }

.skill-row__name {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: var(--display-weight);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--fg);
}

.skill-row__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-content: start;
}
.skill-row__tags li {
  padding: 0.48rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 450;
  color: var(--fg-2);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
              background-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.skill-row__tags li:hover {
  color: var(--fg);
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ── Contact ── */

.cta { max-width: 44rem; }

.cta__title {
  font-family: var(--font-display);
  font-size: var(--t-h2);
  font-weight: var(--display-weight);
  font-optical-sizing: auto;
  line-height: 1.08;
  letter-spacing: -0.018em;
}
.cta__title em { color: var(--accent); }

.cta__lede {
  max-width: 40ch;
  margin-top: 1.5rem;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.65;
  color: var(--fg-2);
}

.cta__mail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: clamp(2.25rem, 4.5vw, 3rem);
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cta__mail-link {
  font-size: clamp(1.05rem, 3.2vw, 1.85rem);
  font-weight: 350;
  letter-spacing: -0.02em;
  word-break: break-word;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: color 0.3s var(--ease), background-size 0.45s var(--ease);
}
.cta__mail-link:hover { color: var(--accent); background-size: 100% 1px; }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  padding: 0.45rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.copy-btn:hover { color: var(--fg); border-color: var(--line-2); }
.copy-btn.is-done { color: var(--accent); border-color: var(--accent); }
.copy-btn svg { width: 13px; height: 13px; }

.cta__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 2rem;
  margin-top: 1.75rem;
}
.cta__links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: var(--t-meta);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-2);
  transition: color 0.25s var(--ease);
}
.cta__links svg { width: 11px; height: 11px; transition: transform 0.3s var(--ease); }
.cta__links a:hover { color: var(--accent); }
.cta__links a:hover svg { transform: translate(2px, -2px); }

/* ───────────────────────── 7. FOOTER ───────────────────────── */

.footer { border-top: 1px solid var(--line); }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 2.25rem;
}
.footer__copy,
.footer__nav a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.footer__nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer__nav a { transition: color 0.25s var(--ease); }
.footer__nav a:hover { color: var(--accent); }

/* ─────────────────── 8. MOTION & RESPONSIVE ─────────────────── */

html.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
html.js .reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 1080px) {
  .about { grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 3rem); }
}

@media (max-width: 1100px) {
  .topnav,
  .topbar__resume { display: none; }
  .burger { display: flex; }
  .skill-row { grid-template-columns: 1fr; gap: 1.15rem; }
  .hero { padding-top: 7rem; }

  /* Every transmitter sits inside a narrow viewport, so the field would run
     straight under the copy. Damp it and lay a flat scrim behind the text. */
  .hero__field { opacity: 0.5; }
  .hero__veil {
    background:
      linear-gradient(180deg,
        var(--bg) 0%,
        color-mix(in srgb, var(--bg) 74%, transparent) 26%,
        color-mix(in srgb, var(--bg) 74%, transparent) 74%,
        var(--bg) 100%);
  }
}

@media (max-width: 620px) {
  :root { --sec-y: clamp(4.5rem, 10vh, 7rem); }
  .brand__name { display: none; }
  .pub {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .pub__index {
    font-size: 0.7rem;
    line-height: 1.4;
    color: var(--accent);
  }
  /* a full-width circle pushed the prose well below the fold */
  .facts__row { grid-template-columns: 1fr; gap: 0.4rem; }
  .role,
  .news-item { grid-template-columns: 1fr; gap: 0.75rem; }
  .role__when { flex-direction: row; gap: 0.9rem; padding-top: 0; }
  .news-item__date { padding-top: 0; }
  .track__dates { flex-basis: 100%; }
  .social { gap: 1.15rem; }
  .social span { display: none; }
  .social svg { width: 19px; height: 19px; }
  .copy-btn { margin-left: 0; }
}

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

@media print {
  .topbar, .drawer, .scroll-progress, .hero__field, .hero__veil,
  .hero__scroll, .filters, .copy-btn { display: none !important; }
  body { background: #fff; color: #000; }
  .hero { min-height: auto; padding: 1rem 0; }
  .pub, .skill-row { break-inside: avoid; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.7em; }
}
