/* ============================================================
   DIRECTION C — BOLD MODERN
   Confident sans, warm coral accent, photo-driven, asymmetric.
============================================================ */

:root {
  --bg: oklch(0.18 0.012 250);
  --bg-soft: oklch(0.22 0.012 250);
  --bg-card: oklch(0.24 0.012 250);
  --bg-warm: oklch(0.20 0.014 35);
  --ink: oklch(0.97 0.005 70);
  --ink-soft: oklch(0.85 0.008 70);
  --mute: oklch(0.65 0.012 250);
  --mute-2: oklch(0.45 0.012 250);
  --rule: oklch(0.32 0.012 250);
  --rule-soft: oklch(0.26 0.012 250);
  --accent: oklch(0.80 0.17 68);    /* amber */
  --accent-deep: oklch(0.63 0.18 62);
  --good: oklch(0.78 0.14 145);

  --display: "Geist", "Söhne", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --sans: "Geist", "Söhne", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent); color: oklch(0.16 0.02 68); }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: var(--mute-2); }

/* ============================================================
   LAYOUT
============================================================ */
.app {
  display: grid;
  grid-template-columns: 200px 1fr;
}
.rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 32px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  z-index: 5;
  background: var(--bg);
  border-right: 1px solid var(--rule-soft);
}
.rail .mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 18px;
}
.rail .mark .pip {
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px oklch(0.80 0.17 68 / 0.18);
  transition: transform 0.4s ease;
}
.rail:hover .mark .pip { transform: rotate(90deg) scale(1.1); }

.rail .meta {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--mute);
  line-height: 1.7;
}
.rail .now {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--good);
}
.rail .now::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 8px var(--good);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.rail nav { display: flex; flex-direction: column; gap: 0; }
.rail nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--mute);
  padding: 9px 14px 9px 16px;
  border-radius: 100px;
  position: relative;
  transition: color 0.2s ease, background 0.2s ease, padding-left 0.25s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}
.rail nav a .num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--mute-2);
}
.rail nav a .nav-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}
.rail nav a:hover .nav-icon,
.rail nav a.active .nav-icon { opacity: 1; }
.rail nav a:hover { color: var(--ink); background: var(--bg-soft); }
.rail nav a.active { color: var(--ink); background: var(--bg-soft); }
.rail nav a.active::before {
  content: "";
  position: absolute;
  left: -24px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 22px;
  background: var(--accent);
  border-radius: 100px;
}

.rail .socials {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.rail .socials a {
  padding: 9px;
  border: 1px solid var(--rule-soft);
  border-radius: 100px;
  display: grid;
  place-items: center;
  color: var(--mute);
  transition: all 0.2s ease;
}
.rail .socials a svg { display: block; }
.rail .socials a:hover { color: var(--ink); border-color: var(--ink); background: var(--bg-soft); }

main { min-width: 0; }

/* ============================================================
   GENERIC SECTION
============================================================ */
section {
  padding: 100px 64px;
  border-bottom: 1px solid var(--rule-soft);
  position: relative;
}
section:last-child { border-bottom: none; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--mute);
  padding: 7px 14px;
  border: 1px solid var(--rule);
  border-radius: 100px;
  margin-bottom: 28px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.eyebrow .nav-icon { width: 13px; height: 13px; flex-shrink: 0; color: var(--accent); }

.section-title {
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin-bottom: 20px;
  max-width: 22ch;
}
.section-title .em { color: var(--accent); }
.section-title .strike { text-decoration: line-through; text-decoration-color: var(--accent); text-decoration-thickness: 4px; color: var(--mute); }

.section-lede {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 60ch;
  margin-bottom: 56px;
}

/* ============================================================
   HERO
============================================================ */
.hero {
  padding: 80px 64px 72px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
}
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}
.hero-top .badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 8px 14px;
  border-radius: 100px;
  background: var(--bg-soft);
}
.hero-top .badge .pip {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 8px var(--good);
}
.hero-top .right {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  text-align: right;
  line-height: 1.6;
}

.hero-main {
  display: flex;
  align-items: center;
  gap: 48px;
  margin-top: 0;
}
.hero-name {
  flex: 1;
  font-size: clamp(52px, 8vw, 130px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.045em;
  margin-bottom: 0;
}
.hero-name .l1 { display: block; }
.hero-name .l2 { display: inline-block; position: relative; color: var(--accent); }
.hero-name .l2::after {
  content: ".";
  color: var(--ink);
}
.hero-name .arrow {
  display: inline-block;
  font-size: 0.55em;
  line-height: 1;
  vertical-align: 0.12em;
  color: var(--accent);
  margin-left: 0.05em;
  transform: rotate(-15deg);
  transform-origin: 50% 50%;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hero:hover .hero-name .arrow { transform: rotate(0deg) translateX(8px); }

.hero-portrait {
  aspect-ratio: 4/5;
  flex: 0 0 240px;
  width: 240px;
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 16px 32px -16px oklch(0 0 0 / 0.5);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hero-portrait:hover { transform: scale(1.02); }
.hero-portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.95) contrast(1.05);
}
.hero-portrait .pill {
  position: absolute;
  left: 16px; bottom: 16px;
  background: oklch(0.18 0.012 250 / 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 8px 12px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
}

.hero-bottom {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 56px;
  margin-top: 56px;
  align-items: end;
  padding-top: 28px;
  border-top: 1px solid var(--rule-soft);
}
.hero-bottom .lede {
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.4;
  color: var(--ink-soft);
}
.hero-bottom .lede .em { color: var(--accent); font-weight: 500; }
.hero-bottom .stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.hero-bottom .stat .lab {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 8px;
}
.hero-bottom .stat .val {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.hero-bottom .stat .val em { color: var(--accent); font-style: normal; }

/* ============================================================
   FEATURED — magazine spread
============================================================ */
.featured-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  margin-bottom: 40px;
}
.featured-head .heads { max-width: 760px; }
.cc-controls {
  display: flex; gap: 8px; align-items: center;
}
.cc-controls button {
  width: 48px; height: 48px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.cc-controls button:hover { background: var(--accent); color: oklch(0.16 0.02 68); border-color: var(--accent); transform: translateY(-2px); }
.cc-controls button:focus { outline: none; }
.cc-controls button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cc-controls button:active { transform: none; background: transparent; color: var(--ink); border-color: var(--rule); }
.cc-controls .count {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--mute);
  margin: 0 10px;
}

.cc-wrap {
  margin: 0 -64px;
  padding: 0 64px;
  overflow: hidden;
}
.cc-track {
  display: flex;
  gap: 28px;
  transition: transform 0.6s cubic-bezier(0.7, 0, 0.2, 1);
}
.fcard {
  flex: 0 0 calc(50% - 14px);
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 36px;
  align-items: center;
}
.fcard .img {
  display: block;
  aspect-ratio: 4/3;
  min-width: 0;
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.4s ease;
}
.fcard .img:hover { transform: translateY(-3px); }
.fcard .img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.fcard:hover .img img { transform: scale(1.06); }
.fcard .img .badge {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 1;
  background: oklch(0.18 0.012 250 / 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 7px 12px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
}
.fcard .img .play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.fcard .img .play span {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: oklch(0.16 0.02 68);
  display: grid;
  place-items: center;
  font-size: 18px;
  transition: transform 0.3s ease;
  box-shadow: 0 16px 40px -8px oklch(0.80 0.17 68 / 0.4);
}
.fcard:hover .img .play span { transform: scale(1.12); }

.fcard .body { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; min-width: 0; }
.fcard .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.fcard .tags span {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  padding: 4px 10px;
  border: 1px solid var(--rule-soft);
  border-radius: 100px;
}
.fcard h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.fcard .desc { color: var(--ink-soft); font-size: 15px; line-height: 1.6; max-width: 50ch; }
.fcard .meta {
  display: flex; gap: 28px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}
.fcard .meta strong { display: block; color: var(--ink); font-family: var(--sans); font-size: 13px; letter-spacing: 0.01em; text-transform: none; font-weight: 500; margin-top: 4px; }
.fcard .links { display: flex; gap: 14px; margin-top: 4px; }
.fcard .links a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 4px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.fcard .links a:hover { color: var(--accent); border-color: var(--accent); }

/* ============================================================
   ABOUT
============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-text p {
  font-size: 22px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 20px;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.about-text p:last-child { margin-bottom: 0; }
.about-text p .em { color: var(--ink); font-weight: 500; }
.about-text p .hi { background: linear-gradient(180deg, transparent 60%, oklch(0.80 0.17 68 / 0.3) 60%); padding: 0 2px; }
.about-text p a { color: var(--accent); border-bottom: 1px solid var(--accent-deep); padding-bottom: 2px; }

.about-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
  position: relative;
}
.about-photos .ph {
  background: var(--bg-card);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  transition: transform 0.4s ease;
}
.about-photos .ph:hover { transform: translateY(-4px); }
.about-photos .ph img { width: 100%; height: 100%; object-fit: cover; }
.about-photos .ph .cap {
  position: absolute;
  left: 12px; bottom: 12px;
  background: oklch(0.18 0.012 250 / 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 5px 10px;
  border-radius: 100px;
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}
.about-photos .ph.tall { grid-row: 1 / 3; aspect-ratio: 3/4.5; }
.about-photos .ph.tall img { object-position: center 30%; }
.about-photos .ph.short { aspect-ratio: 4/3; }

/* sticker */
.sticker {
  position: absolute;
  top: -18px; right: -18px;
  width: 96px; height: 96px;
  background: var(--accent);
  color: oklch(0.16 0.02 68);
  border-radius: 50%;
  display: grid; place-items: center;
  text-align: center;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1.3;
  z-index: 2;
  animation: spin 16s linear infinite;
  box-shadow: 0 12px 30px -6px oklch(0.80 0.17 68 / 0.5);
}
@keyframes spin { to { transform: rotate(360deg); } }
.sticker span { transform: rotate(0deg); }

/* facts strip */
.facts {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule-soft);
  border: 1px solid var(--rule-soft);
  border-radius: 8px;
  overflow: hidden;
}
.fact { background: var(--bg); padding: 24px; transition: background 0.25s ease; }
.fact:hover { background: var(--bg-soft); }
.fact .lab {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 14px;
}
.fact .val {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.fact .val em { color: var(--accent); font-style: normal; font-weight: 500; }
.fact .sub { font-size: 13px; color: var(--mute); margin-top: 6px; }

/* ============================================================
   TIMELINE PROJECTS
============================================================ */
.tl-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.tl-controls button {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--mute);
  padding: 9px 16px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tl-controls button:hover { color: var(--ink); border-color: var(--ink); }
.tl-controls button.on {
  background: var(--accent); color: oklch(0.16 0.02 68); border-color: var(--accent);
}

.tl { position: relative; }
.year-grp { margin-bottom: 64px; }
.year-grp:last-child { margin-bottom: 0; }
.yr-hd {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding-bottom: 18px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--rule-soft);
}
.yr-hd .yr {
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.yr-hd .yr em { color: var(--accent); font-style: normal; }
.yr-hd .sub {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mute);
}

.proj-rows { display: flex; flex-direction: column; }
.prow {
  display: grid;
  grid-template-columns: 80px 1fr 200px 60px;
  gap: 24px;
  align-items: start;
  padding: 22px 0 22px 4px;
  border-bottom: 1px solid var(--rule-soft);
  cursor: pointer;
  transition: transform 0.3s ease;
  position: relative;
}
.prow:last-child { border-bottom: none; }
.prow:hover { transform: translateX(14px); }
.prow .when {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  padding-top: 6px;
}
.prow .main h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 6px;
}
.prow:hover .main h3 { color: var(--accent); }
.prow .main p { color: var(--mute); font-size: 14px; line-height: 1.5; max-width: 56ch; }
.prow .tg { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; }
.prow .tg span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}
.prow .tg span:not(:last-child)::after { content: " ·"; color: var(--mute-2); }
.prow .kind {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  padding-top: 8px;
}
.prow .kind .swatch {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}
.prow .kind.thesis .swatch { background: var(--accent); }
.prow .kind.acad .swatch { background: oklch(0.74 0.12 220); }
.prow .kind.pers .swatch { background: var(--good); }
.prow .kind.preprint .swatch { background: var(--good); }
.prow .arr {
  font-size: 22px;
  color: var(--mute-2);
  text-align: right;
  padding-top: 6px;
  transition: color 0.3s ease, transform 0.3s ease;
}
.prow:hover .arr { color: var(--accent); transform: translateX(4px); }

/* ============================================================
   RESEARCH LIST
============================================================ */
.research-list { margin-top: 56px; }
.ritem {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 40px;
  padding: 32px 0;
  border-top: 1px solid var(--rule);
}
.ritem:last-child { border-bottom: 1px solid var(--rule); }
.ritem-meta { display: flex; flex-direction: column; gap: 10px; padding-top: 2px; }
.rbadge {
  display: inline-block;
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  width: fit-content;
}
.rbadge.preprint { background: var(--accent); color: oklch(0.16 0.02 68); }
.rbadge.thesis { background: var(--bg-soft); color: var(--mute); }
.rdate { font-size: 12px; font-family: var(--mono); color: var(--mute); }
.ritem-body h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin-bottom: 6px;
}
.ritem-body h3 a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
.ritem-body h3 a:hover { color: var(--accent); }
.rauthors { font-size: 13px; color: var(--mute); margin-bottom: 3px; }
.rvenue { font-size: 13px; font-style: italic; color: var(--mute); margin-bottom: 10px; }
.rdesc { font-size: 14px; color: var(--ink-soft); line-height: 1.6; margin-bottom: 10px; }
.rlinks { display: flex; gap: 16px; }
.rlink { font-size: 12px; font-family: var(--mono); color: var(--accent); text-decoration: none; letter-spacing: 0.04em; }
.rlink:hover { text-decoration: underline; }

/* ============================================================
   SKILLS
============================================================ */
.skills-block { margin-bottom: 56px; }
.skills-block:last-child { margin-bottom: 0; }
.skills-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
}
.skills-head h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.skills-head .count {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}
.skill {
  aspect-ratio: 1;
  background: var(--bg-soft);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  transition: background 0.25s ease, transform 0.25s ease;
  cursor: default;
  border: 1px solid transparent;
}
.skill:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  transform: translateY(-3px) rotate(-1deg);
}
.skill img { width: 36px; height: 36px; object-fit: contain; filter: brightness(1.05); }
.skill .nm {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
}

/* ============================================================
   CV
============================================================ */
.cv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.cv-col h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule-soft);
  letter-spacing: -0.015em;
  display: flex; justify-content: space-between; align-items: baseline;
}
.cv-col h3 .ct {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 400;
}
.cv-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule-soft);
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
}
.cv-item:last-child { border-bottom: none; }
.cv-item:hover { transform: translateX(6px); }
.cv-logo {
  width: 72px; height: 72px;
  border-radius: 12px;
  background: var(--bg-soft);
  display: grid; place-items: center;
  padding: 8px;
}
.cv-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cv-body { align-self: center; }
.cv-body h4 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
  margin-bottom: 4px;
}
.cv-body h4 .at { color: var(--mute); font-weight: 400; }
.cv-item:hover .cv-body h4 { color: var(--accent); }
.cv-body .when {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.cv-body p { color: var(--ink-soft); font-size: 14px; line-height: 1.55; }

/* ============================================================
   CONTACT
============================================================ */
.contact { padding: 120px 64px 80px; }
.contact-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 56px;
  align-items: end;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--rule-soft);
}
.contact h2 {
  font-size: clamp(56px, 8vw, 132px);
  line-height: 0.93;
  letter-spacing: -0.045em;
  font-weight: 700;
}
.contact h2 .em { color: var(--accent); }
.contact h2 .em.und {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 6px;
  text-underline-offset: 8px;
}

.contact-actions { display: flex; flex-direction: column; gap: 12px; align-items: stretch; min-width: 260px; }
.contact-actions a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid var(--rule);
  border-radius: 100px;
  padding: 14px 22px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  transition: all 0.2s ease;
}
.contact-actions a:hover { border-color: var(--ink); background: var(--bg-soft); transform: translateY(-2px); }
.contact-actions a.primary { background: var(--accent); border-color: var(--accent); color: oklch(0.16 0.02 68); }
.contact-actions a.primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -8px oklch(0.80 0.17 68 / 0.5); }
.contact-actions a .arr { font-size: 16px; }

.colo-foot {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}

/* ============================================================
   REVEAL
============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---- r-federation badge ---- */
.rfed-badge {
  display: inline-block;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.rfed-badge:hover { border-color: var(--accent); color: var(--accent); }

/* ---- YouTube modal ---- */
#yt-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
#yt-modal.open { display: flex; }
#yt-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(4px);
}
#yt-box {
  position: relative;
  z-index: 1;
  width: min(880px, 92vw);
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}
#yt-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  background: none;
  border: none;
  color: var(--fg);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s;
}
#yt-close:hover { opacity: 1; }
#yt-frame-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}
#yt-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ============================================================
   TABLET  ≤1100px
============================================================ */
@media (max-width: 1100px) {
  /* --- layout --- */
  .app { grid-template-columns: 1fr; }

  /* --- rail → sticky top bar --- */
  .rail {
    position: sticky; top: 0;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 10px 24px;
    gap: 0;
    border-right: none;
    border-bottom: 1px solid var(--rule-soft);
    z-index: 100;
  }
  .rail .mark { margin-right: auto; font-size: 16px; }
  .rail .meta { display: none; }
  .rail nav {
    flex-direction: row;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-shrink: 1;
  }
  .rail nav::-webkit-scrollbar { display: none; }
  .rail nav a {
    padding: 8px 12px;
    border-radius: 100px;
    font-size: 13px;
    white-space: nowrap;
  }
  .rail nav a.active::before { display: none; }
  .rail .socials {
    margin-top: 0;
    margin-left: 16px;
    flex-shrink: 0;
    grid-template-columns: repeat(4, auto);
    gap: 4px;
  }
  .rail .socials a { padding: 7px; }

  /* --- sections --- */
  section { padding: 72px 40px; }
  .hero { padding: 64px 40px 56px; }
  .contact { padding: 72px 40px 64px; }

  /* --- hero --- */
  .hero-main { flex-direction: row; align-items: center; gap: 36px; }
  .hero-portrait { flex: 0 0 180px; width: 180px; }
  .hero-bottom { grid-template-columns: 1fr; gap: 32px; }

  /* --- featured --- */
  .cc-wrap { margin: 0 -40px; padding: 0 40px; }
  .fcard { flex: 0 0 calc(min(720px, 100%)); grid-template-columns: 1fr; }

  /* --- archive --- */
  .prow { grid-template-columns: 70px 1fr 150px 40px; gap: 16px; }

  /* --- cv --- */
  .cv-grid { grid-template-columns: 1fr; gap: 28px; }

  /* --- skills --- */
  .skills-grid { grid-template-columns: repeat(4, 1fr); }

  /* --- facts --- */
  .facts { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }

  /* --- contact --- */
  .contact-row { grid-template-columns: 1fr; gap: 32px; }
  .contact-actions { min-width: 0; }
  .colo-foot { flex-direction: column; gap: 10px; align-items: flex-start; }
}

/* ============================================================
   PHONE  ≤600px
============================================================ */
@media (max-width: 600px) {
  /* --- rail: icons only --- */
  .rail { padding: 8px 16px; }
  .rail .mark .pip { display: none; }
  .rail nav a { padding: 7px 8px; gap: 0; font-size: 0; }
  .rail nav a .nav-icon { width: 16px; height: 16px; opacity: 0.6; }
  .rail nav a:hover .nav-icon,
  .rail nav a.active .nav-icon { opacity: 1; }
  .rail .socials { display: none; }

  /* --- sections --- */
  section { padding: 56px 20px; }
  .hero { padding: 48px 20px 44px; }
  .contact { padding: 56px 20px 48px; }

  /* --- hero --- */
  .hero-main { flex-direction: row; align-items: center; gap: 16px; }
  .hero-portrait { flex: 0 0 80px; width: 80px; }
  .hero-name { font-size: clamp(38px, 12vw, 52px); }
  .hero-bottom { gap: 28px; margin-top: 36px; }
  .hero-bottom .lede { font-size: 18px; }
  .hero-bottom .stats { grid-template-columns: 1fr 1fr; gap: 16px; }
  .hero-bottom .stat .val { font-size: 18px; }

  /* --- featured --- */
  .cc-wrap { margin: 0 -20px; padding: 0 20px; }
  .featured-head { flex-direction: column; gap: 20px; align-items: flex-start; }
  .fcard { gap: 24px; }
  .fcard h3 { font-size: 18px; }

  /* --- archive --- */
  .prow { display: flex; flex-direction: column; gap: 6px; }
  .prow .when { display: none; }
  .prow .arr { display: none; }
  .prow .kind { order: -1; padding-top: 0; }
  .prow .main h3 { font-size: 16px; }

  /* --- cv --- */
  .cv-item { grid-template-columns: 52px 1fr; gap: 14px; }
  .cv-logo { width: 52px; height: 52px; }
  .cv-body h4 { font-size: 15px; }

  /* --- skills --- */
  .skills-grid { grid-template-columns: repeat(3, 1fr); }

  /* --- facts --- */
  .facts { grid-template-columns: 1fr 1fr; }

  /* --- contact --- */
  .contact h2 { font-size: clamp(40px, 13vw, 80px); }
  .contact-actions a { padding: 12px 18px; }
  .colo-foot { font-size: 9.5px; align-items: center; text-align: center; }
}
