@import url("../fonts/fonts.css");

/* ============================================================
   Rishabh Tiwari — personal portfolio
   "Dark editorial scientific"
   editorial-monocle posture (serif display, sans body, mono
   metadata; no shadows, no rounded cards; borders + whitespace)
   inverted to a dark paper + one phosphor-green signal accent.
   ============================================================ */

:root {
  --bg:        oklch(0.157 0.007 85);
  --bg-2:      oklch(0.126 0.008 85);
  --surface:   oklch(0.196 0.009 85);
  --surface-2: oklch(0.232 0.010 85);
  --fg:        oklch(0.930 0.008 90);
  --fg-soft:   oklch(0.810 0.010 90);
  --muted:     oklch(0.660 0.012 85);
  --faint:     oklch(0.580 0.012 85);
  --border:    oklch(0.305 0.010 85);
  --border-2:  oklch(0.390 0.012 85);
  --accent:        oklch(0.845 0.185 145);
  --accent-bright: oklch(0.910 0.180 145);
  --accent-soft:   oklch(0.845 0.185 145 / 0.14);
  --accent-ink:    oklch(0.165 0.030 145);
  --focus:         oklch(0.740 0.170 145);

  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1180px;
  --pad: clamp(20px, 5vw, 64px);
  --sec-pad: clamp(72px, 10vw, 128px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg:        oklch(0.968 0.004 90);
  --bg-2:      oklch(0.935 0.006 90);
  --surface:   oklch(0.985 0.003 90);
  --surface-2: oklch(0.945 0.006 90);
  --fg:        oklch(0.230 0.020 70);
  --fg-soft:   oklch(0.360 0.020 70);
  --muted:     oklch(0.420 0.016 70);
  --faint:     oklch(0.480 0.016 70);
  --border:    oklch(0.870 0.008 90);
  --border-2:  oklch(0.780 0.010 90);
  --accent:        oklch(0.420 0.120 150);
  --accent-bright: oklch(0.500 0.130 150);
  --accent-soft:   oklch(0.420 0.120 150 / 0.12);
  --accent-ink:    oklch(0.985 0.008 150);
  --focus:         oklch(0.500 0.130 150);
}

/* ---------- reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4, p, ul, ol, figure, blockquote {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

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

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- layout ---------- */

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

.section {
  padding-block: var(--sec-pad);
  position: relative;
}

.section + .section { border-top: 1px solid var(--border); }

.measure {
  max-width: 62ch;
}

/* ---------- typography ---------- */

.kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

.kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--border-2);
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.01em;
}

.hero-title {
  font-size: clamp(52px, 11vw, 128px);
  margin-block: 28px 0;
  overflow-wrap: break-word;
}

.hero-title.is-page {
  font-size: clamp(44px, 8vw, 92px);
}

.hero-title .it {
  font-style: italic;
  color: var(--fg-soft);
}

.lead {
  font-family: var(--font-display);
  font-size: clamp(21px, 2.6vw, 30px);
  line-height: 1.35;
  color: var(--fg-soft);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.02;
}

.card-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.12;
}

.card-title a { transition: color 0.25s var(--ease); }
.card-title a:hover { color: var(--accent-bright); }

.mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

.muted { color: var(--muted); }
.soft { color: var(--fg-soft); }

/* ---------- section head ---------- */

.sec-head {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: baseline;
  gap: 20px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 56px;
}

.sec-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--faint);
  letter-spacing: 0.08em;
}

.sec-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ---------- nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--bg) 84%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.brand {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.brand .brand-mark {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--faint);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 30px);
}

.nav-link {
  font-size: 14px;
  color: var(--muted);
  position: relative;
  padding: 10px 2px;
  transition: color 0.25s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-link:hover { color: var(--fg); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-link[aria-current="page"] {
  color: var(--fg);
}

.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 9px 14px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.theme-toggle:hover {
  color: var(--fg);
  border-color: var(--border-2);
  background: var(--surface);
}

/* ---------- status strip ---------- */

.status-strip {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-block: 1px solid var(--border);
  background: var(--bg-2);
  overflow: hidden;
}

.status-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 34px;
  padding-block: 13px;
}

.status-inner .sep { color: var(--faint); }

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  margin-right: 9px;
  animation: pulse 2.4s var(--ease) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--accent-soft); }
  50% { opacity: 0.72; box-shadow: 0 0 0 6px var(--accent-soft); }
}

.caret {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--accent);
  margin-left: 4px;
  vertical-align: middle;
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* ---------- signal trace ---------- */

.trace {
  width: 100%;
  height: clamp(64px, 9vw, 120px);
  margin-top: clamp(40px, 6vw, 72px);
  position: relative;
}

.trace svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.trace .tr {
  fill: none;
  stroke: var(--border-2);
  stroke-width: 1.4;
  stroke-linecap: round;
  opacity: 0.55;
  stroke-dasharray: 1200 1400;
  animation: trace-draw 14s linear infinite;
}

.trace .tr-0 {
  stroke: var(--accent);
  opacity: 0.8;
  stroke-width: 1.8;
  animation-duration: 17s;
}

@keyframes trace-draw {
  from { stroke-dashoffset: 2600; }
  to { stroke-dashoffset: 0; }
}

/* ---------- links & buttons ---------- */

.text-link {
  font-size: 15px;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: color 0.25s var(--ease);
}

.text-link .arr {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  transition: transform 0.3s var(--ease);
}

.text-link:hover .arr { transform: translateX(5px); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 26px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: 3px;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease),
              color 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: color-mix(in oklch, var(--accent) 84%, var(--bg-2));
  border-color: var(--accent-bright);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--border-2);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
  background: var(--surface);
}

/* ---------- editorial list (research interests) ---------- */

.interest-list {
  border-top: 1px solid var(--border);
}

.interest {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 20px;
  padding-block: 34px;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.interest-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--faint);
  padding-top: 8px;
}

.interest h3 {
  font-family: var(--font-display);
  font-size: clamp(21px, 2.3vw, 27px);
  line-height: 1.15;
  margin-bottom: 8px;
}

.interest p { color: var(--fg-soft); max-width: 58ch; }

.interest .tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 8px;
}

/* ---------- cards ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.grid > * { background: var(--bg); }

.card {
  padding: clamp(26px, 3.4vw, 42px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: background 0.3s var(--ease);
}

.card:hover { background: var(--surface); }

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-body { color: var(--fg-soft); font-size: 15.5px; }

.card-foot {
  margin-top: auto;
  padding-top: 12px;
}

/* ---------- details / case studies ---------- */

.study {
  border: 1px solid var(--border);
  background: var(--bg);
}

.study + .study { margin-top: 24px; }

.study summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: clamp(24px, 3.4vw, 38px);
  transition: background 0.3s var(--ease);
}

.study summary::-webkit-details-marker { display: none; }

.study summary:hover { background: var(--surface); }

.study-toggle {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.study-toggle::before {
  content: "+";
  font-size: 15px;
  line-height: 1;
  transition: transform 0.3s var(--ease);
}

.study[open] .study-toggle::before {
  content: "−";
}

.study[open] .study-toggle { color: var(--muted); }

.study-body {
  border-top: 1px solid var(--border);
  padding: clamp(26px, 3.4vw, 40px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 44px 48px;
}

.study-body > .study-full { grid-column: 1 / -1; }

.study-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 16px;
}

.study-label::after {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  background: var(--border-2);
  margin-top: 12px;
}

.study-block p + p { margin-top: 14px; }
.study-block p { color: var(--fg-soft); }

.study-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 11px;
  color: var(--fg-soft);
  font-size: 15.5px;
}

.study-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
}

.study-list li b { color: var(--fg); font-weight: 500; }

/* metric row */

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 4px;
}

.metric {
  background: var(--bg-2);
  padding: 22px 24px;
}

.metric .m-val {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1;
  color: var(--accent-bright);
  margin-bottom: 8px;
}

.metric .m-lab {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- timeline (work) ---------- */

.timeline {
  border-top: 1px solid var(--border);
}

.tl-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  padding-block: 46px;
  border-bottom: 1px solid var(--border);
}

.tl-year {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 6px;
}

.tl-role { font-family: var(--font-display); font-size: clamp(20px, 2.2vw, 26px); line-height: 1.18; }

.tl-org {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 9px;
}

.tl-body { margin-top: 18px; max-width: 66ch; color: var(--fg-soft); }

.tl-body li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 9px;
}

.tl-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 5px;
  height: 5px;
  background: var(--border-2);
}

.tl-row.is-compact .tl-body { color: var(--muted); }
.tl-row.is-compact .tl-role { font-size: clamp(18px, 2vw, 22px); color: var(--fg-soft); }

.tl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tl-tags span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 5px 10px;
}

/* ---------- lab / terminal ---------- */

.term {
  border: 1px solid var(--border);
  background: var(--bg-2);
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.term-bar .term-dots { margin-right: auto; display: flex; gap: 7px; }

.term-bar .t-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-2);
}

.term-body { padding: clamp(22px, 3vw, 34px); }

.term-line {
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--fg-soft);
}

.term-line .prompt { color: var(--accent); }
.term-line .path { color: var(--faint); }
.term-line .out { color: var(--muted); }

.term-line + .term-line { margin-top: 4px; }

.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 26px;
}

.svc {
  background: var(--bg);
  padding: 24px;
}

.svc .svc-name {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg);
  margin-bottom: 6px;
}

.svc .svc-name::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 9px;
  vertical-align: 1px;
}

.svc p {
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------- skills grid ---------- */

.skill-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  padding-block: 24px;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.skill-row:first-child { border-top: 1px solid var(--border); }

.skill-name {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.skill-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  font-size: 15px;
  color: var(--fg-soft);
}

.skill-items span { position: relative; }

.skill-items span::after {
  content: "";
  position: absolute;
  right: -15px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--faint);
}

.skill-items span:last-child::after { display: none; }

/* ---------- meta rows (education / recognition) ---------- */

.meta-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  padding-block: 26px;
  border-bottom: 1px solid var(--border);
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-title { font-family: var(--font-display); font-size: 20px; line-height: 1.2; margin-bottom: 6px; }
.meta-sub { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.meta-desc { margin-top: 8px; color: var(--fg-soft); font-size: 15px; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  margin-top: 0;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 48px;
  padding-block: clamp(56px, 8vw, 88px);
}

.footer-brand p { margin-top: 16px; color: var(--muted); max-width: 34ch; font-size: 15px; }

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 20px;
}

.footer-col li { margin-bottom: 12px; }

.footer-col a {
  font-size: 15px;
  color: var(--fg-soft);
  transition: color 0.25s var(--ease);
}

.footer-col a:hover { color: var(--accent-bright); }

.footer-bottom {
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-block: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--faint);
}

.footer-bottom .ok {
  color: var(--muted);
}

.footer-bottom .ok .dot {
  width: 6px;
  height: 6px;
  margin-right: 6px;
  animation: none;
  box-shadow: none;
}

/* ---------- reveal on scroll ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- hero (home) ---------- */

.hero {
  padding-block: clamp(72px, 11vw, 150px) 0;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-kicker .dot {
  width: 6px;
  height: 6px;
  margin-right: 10px;
  animation: none;
  box-shadow: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  margin-top: 40px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 30px;
  margin-top: 52px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.hero-facts b {
  color: var(--fg-soft);
  font-weight: 400;
}

/* ---------- page hero (interior) ---------- */

.page-hero {
  padding-block: clamp(64px, 9vw, 116px) clamp(40px, 6vw, 64px);
}

.page-hero .lead {
  max-width: 52ch;
  margin-top: 22px;
}

/* ---------- teaser rows (home) ---------- */

.teaser {
  border-top: 1px solid var(--border);
  padding-block: 40px;
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 40px;
  align-items: start;
  transition: background 0.3s var(--ease);
}

.teaser:hover { background: var(--surface); }

.teaser-num {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--faint);
  padding-top: 8px;
}

.teaser-title { display: block; font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 32px); line-height: 1.1; }
.teaser-desc { display: block; margin-top: 10px; color: var(--fg-soft); max-width: 58ch; }

.teaser-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  padding-top: 8px;
}

.teaser-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .study-body { grid-template-columns: 1fr; }
  .tl-row, .skill-row, .meta-row { grid-template-columns: 1fr; gap: 16px; }
  .tl-year, .skill-name, .meta-label { padding-top: 0; }
  .interest { grid-template-columns: 40px 1fr; }
  .interest .tag { display: none; }
  .footer-top { grid-template-columns: 1fr; gap: 40px; }
  .teaser { grid-template-columns: 1fr; gap: 16px; }
  .teaser-foot { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-inner { height: auto; min-height: 64px; flex-wrap: wrap; padding-block: 12px; }
  .nav-links { order: 3; width: 100%; flex-wrap: wrap; gap: 4px 18px; border-top: 1px solid var(--border); padding-top: 10px; }
  .sec-head { grid-template-columns: 44px 1fr; }
  .sec-tag { display: none; }
  .hero-title { font-size: clamp(44px, 13vw, 72px); }
  .status-inner { gap: 8px 22px; }
  .metrics { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
  .metrics { grid-template-columns: 1fr; }
}
