/* ============================================================
   COMPONENTS / SECTION LAYOUT
   ============================================================ */

/* ---------- RANK BAR (scroll progress as belt rank: white → black) ---------- */
.rankbar {
  position: fixed; top: 0; left: 0; right: 0; height: 6px; z-index: 60;
  background: var(--line-soft); overflow: hidden;
}
.rankbar__fill {
  position: absolute; inset: 0; transform-origin: left; transform: scaleX(0);
  background: var(--accent);
  box-shadow: inset 0 0 0 1px oklch(0.6 0 0 / 0.4);
  transition: transform 0.12s linear, background-color 0.55s var(--ease);
  z-index: 1;
}
.rankbar.is-promoted .rankbar__fill { box-shadow: inset 0 0 0 1px oklch(0.6 0 0 / 0.4), 0 0 12px var(--accent); }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklch, var(--paper) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: var(--rule) solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.nav__mark { font-family: var(--ff-mono); font-weight: 700; letter-spacing: 0.04em; font-size: 0.9rem; display: flex; align-items: center; gap: 10px; }
.nav__mark .sq { width: 14px; height: 14px; background: var(--accent); display: inline-block; }
.nav__links { display: flex; gap: clamp(12px, 2vw, 30px); align-items: center; }
.nav__links a {
  font-family: var(--ff-mono); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-soft); text-decoration: none; transition: color 0.2s;
}
.nav__links a:hover { color: var(--accent); }
.nav__clock { font-family: var(--ff-mono); font-size: 0.76rem; font-weight: 700; color: var(--ink-soft); letter-spacing: 0.06em; }
.nav__theme {
  font-family: var(--ff-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-soft); background: transparent;
  border: 1px solid var(--line-soft); padding: 6px 11px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color 0.2s, border-color 0.2s;
}
.nav__theme:hover { color: var(--ink); border-color: var(--line); }
.nav__theme-sw {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.25), 0 0 0 1px var(--line-soft);
  transition: background-color 0.4s var(--ease);
}
@media (max-width: 760px) { .nav__links a:not(.nav__cta) { display: none; } .nav__clock { display: none; } }
@media (max-width: 460px) { .nav__theme span:last-child { display: none; } }

/* ---------- HERO ---------- */
.hero { padding-top: clamp(38px, 7vw, 84px); padding-bottom: 0; }
.hero__eyebrow {
  display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center;
  font-family: var(--ff-mono); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: clamp(22px, 4vw, 40px);
}
.hero__eyebrow .live { color: var(--accent); display: inline-flex; align-items: center; gap: 8px; }
.hero__eyebrow .live::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  animation: blink 1.4s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0.15; } }
.hero__eyebrow .bar { width: 28px; height: 1px; background: var(--line-soft); }

.hero__name {
  font-family: var(--ff-display); font-weight: 900; text-transform: uppercase;
  line-height: 0.84; letter-spacing: -0.04em;
  font-size: clamp(2.7rem, 12.2vw, 10.5rem);
}
.hero__name .ln2 { color: var(--accent); }
.hero__name .ln2 .stroke { -webkit-text-stroke: 2px var(--accent); color: transparent; }

.hero__lead {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 70px);
  align-items: end; padding: clamp(26px, 4vw, 46px) 0 clamp(30px, 4vw, 52px);
}
.hero__tagline { font-family: var(--ff-display); font-weight: 800; font-size: clamp(1.5rem, 3.4vw, 2.7rem); line-height: 1.0; letter-spacing: -0.02em; }
.hero__sub { color: var(--ink-soft); font-size: clamp(0.98rem, 1.3vw, 1.12rem); max-width: 52ch; line-height: 1.55; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
@media (max-width: 760px) { .hero__lead { grid-template-columns: 1fr; gap: 18px; } }

/* ---------- STATS / TIMING TOWER ---------- */
.stats__cap {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  font-family: var(--ff-mono); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint);
  padding-bottom: 12px;
}
.stats__cap-a { color: var(--accent); }
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: var(--rule) solid var(--line); border-left: 1px solid var(--line-soft);
}
.stat {
  border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  padding: clamp(16px, 2vw, 26px) clamp(14px, 1.6vw, 22px) clamp(14px, 1.8vw, 22px);
  position: relative; overflow: hidden; transition: background 0.25s var(--ease);
}
.stat:hover { background: var(--panel); }
.stat__no { font-family: var(--ff-mono); font-size: 0.7rem; font-weight: 700; color: var(--accent); letter-spacing: 0.1em; }
.stat__v {
  font-family: var(--ff-display); font-weight: 900; line-height: 0.92;
  font-size: clamp(2.2rem, 4.4vw, 4rem); letter-spacing: -0.03em; margin: 8px 0 6px;
  font-variant-numeric: tabular-nums;
}
.stat__k { font-family: var(--ff-mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }
.stat__note { font-family: var(--ff-mono); font-size: 0.68rem; color: var(--ink-faint); margin-top: 4px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- GENERIC SECTION SPACING ---------- */
.section { padding-bottom: clamp(48px, 8vw, 110px); }
.section__body { padding-top: clamp(30px, 5vw, 64px); }

/* ---------- ABOUT ---------- */
.about__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(28px, 6vw, 80px); align-items: start; }
.about__lead { font-family: var(--ff-display); font-weight: 700; font-size: clamp(1.4rem, 2.7vw, 2.15rem); line-height: 1.12; letter-spacing: -0.02em; text-wrap: pretty; }
.about__lead em { color: var(--accent); font-style: normal; }
.about__blurb { color: var(--ink-soft); font-size: 1.05rem; line-height: 1.6; margin-top: 22px; max-width: 56ch; }
.edu { border: var(--rule) solid var(--line); background: var(--panel); }
.edu__row { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.edu__row:last-child { border-bottom: 0; }
.edu__k { font-family: var(--ff-mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.edu__v { font-weight: 700; font-size: 1.02rem; margin-top: 4px; }
.edu__v small { display: block; font-weight: 500; color: var(--ink-soft); font-size: 0.86rem; margin-top: 2px; }
@media (max-width: 860px) { .about__grid { grid-template-columns: 1fr; } }

/* ---------- EXPERIENCE / STINT LOG ---------- */
.exp { display: flex; flex-direction: column; }
.stint {
  display: grid; grid-template-columns: 220px 1fr; gap: clamp(18px, 4vw, 56px);
  padding: clamp(26px, 3.4vw, 40px) 0; border-bottom: 1px solid var(--line-soft);
  position: relative;
}
.stint:hover .stint__org { color: var(--accent); }
.stint__time { font-family: var(--ff-mono); }
.stint__date { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; color: var(--ink); }
.stint__loc { font-size: 0.74rem; color: var(--ink-faint); margin-top: 6px; }
.stint__status {
  display: inline-block; margin-top: 12px; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.12em;
  padding: 4px 9px; background: var(--accent); color: var(--on-accent);
}
.stint__no { font-family: var(--ff-mono); font-size: 0.74rem; color: var(--ink-faint); margin-bottom: 8px; }
.stint__role { font-family: var(--ff-display); font-weight: 800; font-size: clamp(1.25rem, 2.3vw, 1.85rem); line-height: 1.04; letter-spacing: -0.02em; }
.stint__org { font-family: var(--ff-mono); font-weight: 700; font-size: 0.95rem; margin-top: 6px; transition: color 0.25s; }
.stint__points { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.stint__points li { position: relative; padding-left: 22px; color: var(--ink-soft); font-size: 0.98rem; line-height: 1.5; max-width: 70ch; }
.stint__points li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-family: var(--ff-mono); font-weight: 700; }
.stint__stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  font-family: var(--ff-mono); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 5px 10px; border: 1px solid var(--line-soft); color: var(--ink-soft); background: var(--panel);
}
@media (max-width: 760px) { .stint { grid-template-columns: 1fr; gap: 14px; } }

/* ---------- PROJECTS ---------- */
.projects { display: flex; flex-direction: column; gap: clamp(22px, 3vw, 36px); }
.project { border: var(--rule) solid var(--line); background: var(--panel); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.project:hover { transform: translateY(-4px); box-shadow: -8px 8px 0 var(--accent); }
.project__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: clamp(22px, 3vw, 34px); border-bottom: var(--rule) solid var(--line); flex-wrap: wrap; }
.project__id { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.project__name { font-family: var(--ff-display); font-weight: 900; font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 0.9; letter-spacing: -0.03em; text-transform: uppercase; }
.project__type { font-family: var(--ff-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.project__tagline { font-family: var(--ff-display); font-weight: 700; font-size: clamp(1.05rem, 1.8vw, 1.45rem); line-height: 1.12; letter-spacing: -0.015em; max-width: 30ch; text-align: right; }
.project__metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: var(--rule) solid var(--line); }
.metric { padding: clamp(18px, 2.4vw, 30px) clamp(16px, 2vw, 24px); border-right: 1px solid var(--line-soft); }
.metric:last-child { border-right: 0; }
.metric__v { font-family: var(--ff-display); font-weight: 900; font-size: clamp(1.9rem, 4vw, 3.2rem); line-height: 0.92; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.metric__v.accent { color: var(--accent); }
.metric__k { font-family: var(--ff-mono); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); margin-top: 8px; line-height: 1.35; }
.project__body { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(20px, 4vw, 50px); padding: clamp(22px, 3vw, 34px); }
.project__desc { font-size: 1.05rem; line-height: 1.55; }
.project__detail { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.6; margin-top: 14px; }
.project__side { display: flex; flex-direction: column; gap: 18px; }
.project__stack { display: flex; flex-wrap: wrap; gap: 7px; }
@media (max-width: 760px) { .project__metrics { grid-template-columns: 1fr; } .metric { border-right: 0; border-bottom: 1px solid var(--line-soft); } .project__body { grid-template-columns: 1fr; } .project__tagline { text-align: left; } }

/* ---------- SKILLS / SETUP SHEET ---------- */
.skills { display: grid; grid-template-columns: repeat(4, 1fr); border-top: var(--rule) solid var(--line); border-left: 1px solid var(--line-soft); }
.skillcol { border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: clamp(18px, 2vw, 26px); }
.skillcol__h { font-family: var(--ff-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; display: flex; justify-content: space-between; }
.skillcol__h span:last-child { color: var(--ink-faint); }
.skill-item { padding: 9px 0; border-top: 1px solid var(--line-soft); font-weight: 600; font-size: 0.96rem; display: flex; align-items: center; gap: 10px; }
.skill-item:first-of-type { border-top: 0; }
.skill-item::before { content: ""; width: 5px; height: 5px; background: var(--accent); flex: 0 0 auto; }
@media (max-width: 860px) { .skills { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .skills { grid-template-columns: 1fr; } }

/* ---------- BEYOND CODE ---------- */
.beyond { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: var(--rule) solid var(--line); border-left: var(--rule) solid var(--line); }
.bcard {
  border-right: var(--rule) solid var(--line); border-bottom: var(--rule) solid var(--line);
  padding: clamp(24px, 3.5vw, 44px); min-height: clamp(200px, 24vw, 280px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  position: relative; overflow: hidden; transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.bcard:hover { background: var(--accent); color: var(--on-accent); }
.bcard:hover .bcard__label, .bcard:hover .bcard__meta { color: var(--on-accent); opacity: 0.8; }
.bcard:hover .bcard__blurb { color: var(--on-accent); }
.bcard__label { font-family: var(--ff-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; color: var(--accent); transition: color 0.3s, opacity 0.3s; }
.bcard__title { font-family: var(--ff-display); font-weight: 900; text-transform: uppercase; font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 0.92; letter-spacing: -0.025em; }
.bcard__blurb { color: var(--ink-soft); font-size: 0.98rem; line-height: 1.5; max-width: 44ch; transition: color 0.3s; }
.bcard__meta { font-family: var(--ff-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; color: var(--ink-faint); transition: color 0.3s, opacity 0.3s; }
.bcard__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
@media (max-width: 680px) { .beyond { grid-template-columns: 1fr; } }

/* ---------- CONTACT ---------- */
.contact__big { font-family: var(--ff-display); font-weight: 900; text-transform: uppercase; line-height: 0.86; letter-spacing: -0.035em; font-size: clamp(2.8rem, 11vw, 9rem); }
.contact__big a { color: var(--ink); text-decoration: none; transition: color 0.25s; display: inline-block; }
.contact__big a:hover { color: var(--accent); }
.contact__rows { display: grid; grid-template-columns: repeat(4, 1fr); border-top: var(--rule) solid var(--line); border-left: 1px solid var(--line-soft); margin-top: clamp(30px, 5vw, 56px); }
.crow { border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 20px 22px; text-decoration: none; color: var(--ink); transition: background 0.2s; display: block; }
.crow:hover { background: var(--panel); }
.crow__k { font-family: var(--ff-mono); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.crow__v { font-weight: 700; font-size: 0.98rem; margin-top: 8px; word-break: break-word; }
.crow:hover .crow__v { color: var(--accent); }
@media (max-width: 760px) { .contact__rows { grid-template-columns: repeat(2, 1fr); } }

/* ---------- FOOTER ---------- */
.footer { border-top: var(--rule) solid var(--line); padding: 28px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer span { font-family: var(--ff-mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; color: var(--ink-faint); text-transform: uppercase; }
.footer .accent { color: var(--accent); }
