/* ==========================================================
   dricciardelli.com
   Fonts are self-hosted (Inter, SIL OFL). No third parties.
   ========================================================== */

@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter-Medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter-SemiBold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("/assets/fonts/InterDisplay-Bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --bg: #07080B;
  --text: #F4F6FA;
  --muted: #A9B4C6;
  --line: rgba(244, 246, 250, 0.12);

  --red: #FF5A5F;
  --red-label: #FF8A8E;
  --red-text: #FFE1E2;
  --red-soft: #FFC2C4;
  --red-bg: #0E0607;

  --blue: #4C9BFF;
  --blue-label: #8FBFFF;
  --blue-text: #E6F0FF;
  --blue-soft: #B7C3D6;
  --blue-bg: #06090F;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Inter Display", "Inter", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --x: 0%;
}

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

html { background: var(--bg); color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: #E8ECF2; text-decoration: none; }
a:hover { color: #FFFFFF; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 8px; background: var(--text); color: var(--bg);
}
.skip:focus { top: 16px; color: var(--bg); }

/* ---------- Nav (shared) ---------- */

.nav {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 28px 5%;
}
.nav ul { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0; padding: 0; list-style: none; font-size: 15px; font-weight: 500; }
.nav a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.nav a[aria-current="page"] { color: var(--text); text-decoration: underline; text-underline-offset: 6px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.03em; }
.slash-red { color: var(--red); }
.slash-blue { color: var(--blue); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  height: max(100svh, 860px);
  overflow: hidden;
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
}
.hero .nav { position: absolute; top: 0; left: 0; right: 0; z-index: 5; }

.layer {
  position: absolute; inset: 0;
  background-size: 56px 56px;
}
.layer--blue {
  background-color: var(--blue-bg);
  background-image:
    linear-gradient(rgba(76,155,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76,155,255,0.05) 1px, transparent 1px);
}
.layer--red {
  background-color: var(--red-bg);
  background-image:
    linear-gradient(rgba(255,90,95,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,90,95,0.05) 1px, transparent 1px);
  clip-path: inset(0 calc(100% - var(--x)) 0 0);
  z-index: 1;
}

.hero__center {
  position: absolute; top: 150px; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 0 24px; text-align: center;
}
.eyebrow {
  margin: 0; font-family: var(--mono); font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase;
}
.layer--blue .eyebrow { color: var(--blue-label); }
.layer--red .eyebrow { color: var(--red-label); }

.name {
  margin: 0;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(46px, 7.2vw, 116px); line-height: 0.92; letter-spacing: -0.045em;
  color: var(--text);
}
.name--outline {
  color: var(--red-bg);
  -webkit-text-stroke: 2px var(--red);
}
.tagline { margin: 4px 0 0; font-size: 20px; line-height: 1.5; }
.layer--blue .tagline { color: var(--blue-soft); }
.layer--red .tagline { color: var(--red-soft); }

/* ---------- Panels ---------- */

.panel {
  position: absolute; bottom: 96px;
  width: min(430px, 42%);
  padding: 20px 24px;
  border-radius: 14px;
  font-family: var(--mono); font-size: 13px;
}
.panel--red { left: 5%; border: 1px solid rgba(255,90,95,0.35); background: rgba(24,6,8,0.72); }
.panel--blue { right: 5%; border: 1px solid rgba(76,155,255,0.35); background: rgba(6,12,24,0.72); }

.panel__head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding-bottom: 12px;
}
.panel__head h2 {
  margin: 0; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
}
.panel__status { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
.panel--red h2 { color: var(--red-label); }
.panel--red .panel__status { color: var(--red-text); }
.panel--blue h2 { color: var(--blue-label); }
.panel--blue .panel__status { color: var(--blue-text); }

.rows { margin: 0; }
.row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 7px 0;
}
.panel--red .row { border-top: 1px solid rgba(255,90,95,0.14); }
.panel--blue .row { border-top: 1px solid rgba(76,155,255,0.14); }
.row dt { flex: none; }
.row dd { margin: 0; min-width: 0; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel--red dt { color: var(--red-label); }
.panel--red dd { color: var(--red-text); }
.panel--blue dt { color: var(--blue-label); }
.panel--blue dd { color: var(--blue-text); }
.row dd.is-pending, .row dd.is-off { color: var(--muted); }
.noscript { margin: 8px 0 0; color: var(--muted); }

/* ---------- The line ---------- */

.divider {
  position: absolute; top: 0; bottom: 0; left: var(--x); z-index: 4;
  width: 44px; margin-left: -22px;   /* wide, invisible hit area */
  cursor: ew-resize; touch-action: none;
}
.divider::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; margin-left: -1px;
  background: var(--text); box-shadow: 0 0 22px rgba(244,246,250,0.5);
}
.handle {
  position: absolute; top: 50%; left: 50%;
  width: 60px; height: 60px; margin: -30px 0 0 -30px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--text); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: grab;
}
.divider.is-dragging .handle { cursor: grabbing; transform: scale(1.06); }

/* ---------- Hero footer strip ---------- */

.hero__foot {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding: 14px 5%;
  border-top: 1px solid var(--line); background: rgba(7,8,11,0.82);
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.hint { letter-spacing: 0.16em; text-transform: uppercase; color: #E8ECF2; }
.btn-ghost {
  min-height: 44px; padding: 0 16px; border-radius: 8px;
  border: 1px solid rgba(244,246,250,0.22); background: transparent; color: #E8ECF2;
  font-family: var(--mono); font-size: 12px; cursor: pointer;
}
.btn-ghost:hover { border-color: rgba(244,246,250,0.5); }

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

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px;
  padding: 28px 5%; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--muted);
}
.site-footer ul { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; }

/* ---------- Simple pages (work, projects, timeline, resume, contact, 404) ---------- */

.page {
  min-height: calc(100svh - 90px);
  display: flex; flex-direction: column;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(244,246,250,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244,246,250,0.03) 1px, transparent 1px);
  background-size: 56px 56px;
}
.page__body {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 48px 5% 96px;
}
.terminal {
  width: 100%; max-width: 720px;
  border: 1px solid rgba(244,246,250,0.14); border-radius: 14px; background: #0A0C0E;
  overflow: hidden;
}
.terminal__bar {
  padding: 14px 18px; border-bottom: 1px solid rgba(244,246,250,0.10);
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.terminal__body { padding: 24px 26px 30px; font-family: var(--mono); font-size: 15px; line-height: 1.9; }
.terminal__body p { margin: 0; }
.ok { color: #5BF59A; }
.warn { color: #FFB547; }
.prompt { color: var(--muted); }
.page h1 {
  margin: 18px 0 6px; font-family: var(--display); font-weight: 700;
  font-size: clamp(32px, 5vw, 52px); line-height: 1; letter-spacing: -0.035em;
}
.page .lead { margin: 0 0 8px; font-family: var(--sans); font-size: 18px; line-height: 1.5; color: var(--muted); }
.links { display: flex; flex-direction: column; gap: 4px; margin: 14px 0 0; padding: 0; list-style: none; }
.links a { display: inline-flex; min-height: 44px; align-items: center; text-decoration: underline; text-underline-offset: 5px; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero { height: max(100svh, 1000px); }
  .hero__center { top: 180px; }
  .tagline { font-size: 17px; }
  /* Both panels share the same spot and size: the line decides which one you see. */
  .panel, .panel--red, .panel--blue { left: 5%; right: 5%; width: auto; bottom: 124px; min-height: 336px; }
  .panel__head h2, .panel__status { font-size: 11px; letter-spacing: 0.1em; }
  .hero__foot { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
  .nav { flex-direction: column; align-items: flex-start; gap: 4px; padding: 20px 5%; }
  .nav ul { gap: 0 16px; font-size: 14px; }
  .panel { padding: 18px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ==========================================================
   Homepage sections below the hero
   ========================================================== */

:root {
  --purple: #C4B5FD;
  --purple-text: #DDD6FE;
  --purple-bg: #0C0812;
}

.tone-blue { --tone: var(--blue-label); --tone-text: var(--blue-soft); --tone-bg: var(--blue-bg); --tone-border: rgba(76,155,255,0.35); }
.tone-red { --tone: var(--red-label); --tone-text: var(--red-soft); --tone-bg: var(--red-bg); --tone-border: rgba(255,90,95,0.35); }
.tone-purple { --tone: var(--purple); --tone-text: var(--purple-text); --tone-bg: var(--purple-bg); --tone-border: rgba(167,139,250,0.40); }
.tone-neutral { --tone: #E8ECF2; --tone-text: var(--blue-soft); --tone-bg: #0C0E12; --tone-border: rgba(244,246,250,0.16); }

.block { padding: 112px 0; }
.block--alt { background: #0A0B0F; border-top: 1px solid rgba(244,246,250,0.08); border-bottom: 1px solid rgba(244,246,250,0.08); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 5%; }

.kicker {
  margin: 0 0 16px; font-family: var(--mono); font-size: 13px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}
.block__title {
  margin: 0 0 56px; max-width: 820px;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(34px, 4.6vw, 64px); line-height: 1.02; letter-spacing: -0.04em;
}
.block__title--tight { margin-bottom: 14px; }
.block__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 48px; }
.mono-note { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.lead { margin: 0; max-width: 560px; font-size: 18px; line-height: 1.55; color: var(--muted); }
.muted { color: var(--muted); }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

.updated {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  margin: -36px 0 48px; font-family: var(--mono); font-size: 13px; color: var(--muted);
}
.updated .dot { color: #5BF59A; margin-right: -8px; }

/* Impact stats */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  border-top: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column; gap: 12px; padding: 32px 28px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__value {
  margin: 0; font-family: var(--display); font-weight: 700;
  font-size: 52px; line-height: 1.1; letter-spacing: -0.04em; color: var(--tone);
}
.stat__unit { font-size: 30px; letter-spacing: -0.02em; }
.stat__text { margin: 0; font-size: 16px; line-height: 1.5; color: #D7DCE4; }
.stat__lock { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--tone); }

/* Approach */
.sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.side {
  display: flex; flex-direction: column; gap: 16px; padding: 32px;
  border-radius: 18px; border: 1px solid var(--tone-border); background: var(--tone-bg);
}
.side__label { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--tone); }
.side__title { margin: 0; font-family: var(--display); font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
.side__text { margin: 0; font-size: 16px; line-height: 1.55; color: var(--tone-text); }

/* Latest projects */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; }
.project-card {
  display: flex; flex-direction: column; gap: 14px; min-height: 300px; padding: 28px;
  border-radius: 18px; border: 1px solid var(--tone-border); background: var(--tone-bg);
  transition: transform .2s ease, border-color .2s ease;
}
.project-card:hover { transform: translateY(-3px); border-color: var(--tone); }
.project-card__meta { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 12px; }
.project-card__org { color: var(--tone); text-transform: uppercase; }
.project-card__date { color: var(--muted); }
.project-card__title { margin: 0; font-family: var(--display); font-size: 24px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; color: var(--text); }
.project-card__text { margin: 0; flex: 1; font-size: 16px; line-height: 1.55; color: var(--tone-text); }
.project-card__more { font-size: 15px; font-weight: 600; color: var(--text); }

/* Right now */
.now { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.now__intro { flex: 1 1 340px; min-width: 0; }
.now__intro .lead { margin-bottom: 28px; }
.now__terminal { flex: 1 1 560px; min-width: 0; max-width: none; background: var(--bg); }
.now__rows { margin: 0; padding: 8px 24px 16px; font-family: var(--mono); font-size: 14px; }
.now__row { display: flex; flex-wrap: wrap; gap: 4px 20px; padding: 14px 0; border-bottom: 1px solid rgba(244,246,250,0.08); }
.now__row:last-child { border-bottom: 0; }
.now__key { width: 110px; flex: none; }
.now__key.is-ok { color: #5BF59A; }
.now__key.is-warn { color: #FFB547; }
.now__value { flex: 1; min-width: 220px; margin: 0; color: #E8ECF2; }

/* Buttons */
.pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 24px;
  border-radius: 999px; border: 1px solid rgba(244,246,250,0.28); font-size: 16px; font-weight: 600;
}
.pill:hover { border-color: rgba(244,246,250,0.6); }
.pill--solid { background: var(--text); color: var(--bg); border-color: var(--text); }
.pill--solid:hover { color: var(--bg); background: #FFFFFF; }

/* Resume teaser */
.cta { padding: 128px 0 120px; }
.cta__inner { display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.cta__title {
  margin: 0; max-width: 820px; font-family: var(--display); font-weight: 700;
  font-size: clamp(34px, 5vw, 72px); line-height: 1.02; letter-spacing: -0.045em;
}
.cta .lead { font-size: 19px; }
.cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding-top: 10px; }

@media (max-width: 760px) {
  .block { padding: 80px 0; }
  .stat, .stat:first-child { border-left: 0; padding-left: 0; padding-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .updated { margin-top: -36px; }
}

/* ==========================================================
   Projects: layered stack (approved canvas demo)
   ========================================================== */

.pl {
  flex: 1; display: flex; flex-wrap: wrap; gap: 40px 56px;
  max-width: 1280px; width: 100%; margin: 0 auto; padding: 8px 5% 56px;
}
.pl__left { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.pl__title { margin: 0 0 10px; font-family: var(--display); font-weight: 700; font-size: 52px; line-height: 1; letter-spacing: -0.045em; }
.pl__intro { margin: 0; font-size: 17px; line-height: 1.55; color: var(--muted); }

.pl__detail {
  flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 28px;
  border-radius: 18px; border: 1px solid var(--tone-border); background: var(--tone-bg);
  transition: border-color .4s, background-color .4s;
}
.pl__meta { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 12px; }
.pl__org { color: var(--tone); text-transform: uppercase; letter-spacing: 0.08em; }
.pl__date { color: var(--muted); }
.pl__name { margin: 0; font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1.15; letter-spacing: -0.03em; }
.pl__full { margin: 0; flex: 1; font-size: 16px; line-height: 1.65; color: #D7DCE4; }
.pl__links { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; }
.pl__links .pill { min-height: 44px; padding: 0 20px; font-size: 15px; }

.pl__controls { display: flex; align-items: center; justify-content: center; gap: 16px; }
.pstack__btn {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(244,246,250,0.28); background: transparent; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.pstack__btn:hover { border-color: rgba(244,246,250,0.6); }
.pstack__count { min-width: 76px; text-align: center; font-family: var(--mono); font-size: 14px; letter-spacing: 0.08em; color: var(--muted); }

.pl__right {
  flex: 1.35 1 560px; min-width: 0; display: flex; flex-direction: column;
  border-radius: 22px; border: 1px solid rgba(244,246,250,0.10); background: rgba(10,11,15,0.6); overflow: hidden;
}
.pl__stage {
  flex: 1; min-height: 560px; display: flex; align-items: center; justify-content: center;
  perspective: 2200px; overflow: hidden; touch-action: pan-x; outline-offset: -4px;
}
.pl__deck {
  position: relative; width: 460px; height: 280px; transform-style: preserve-3d;
  transition: transform 1.1s cubic-bezier(.2,.8,.2,1);
  transform: translateY(0) rotateX(0deg) rotateZ(0deg) scale(1);
}
.pl__stage.is-angled .pl__deck { transform: translateY(70px) rotateX(36deg) rotateZ(-14deg) scale(0.92); }

.pl__card {
  position: absolute; inset: 0; box-sizing: border-box; padding: 22px 24px;
  display: flex; flex-direction: column; gap: 10px; overflow: hidden;
  border-radius: 16px; border: 1px solid var(--tone-border); background: var(--tone-bg);
  color: var(--text); text-align: left; font-family: var(--sans); cursor: pointer;
  backface-visibility: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.pl__stage.is-ready .pl__card { transition: transform .7s cubic-bezier(.2,.8,.2,1), opacity .5s, box-shadow .5s, border-color .4s; }
.pl__card.is-selected { border-color: var(--tone); box-shadow: 0 30px 60px rgba(0,0,0,0.6); }
.pl__card-meta { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; }
.pl__card-org { color: var(--tone); text-transform: uppercase; }
.pl__card-date { color: var(--muted); }
.pl__card-title { font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.15; letter-spacing: -0.02em; }
.pl__card-notes { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.pl__card-note { display: flex; gap: 10px; font-size: 14px; line-height: 1.4; color: #C9CFD9; }
.pl__card-mark { color: var(--tone); }
/* cards under the top one are dimmed slightly (not filtered, so text stays crisp) */
.pl__card-dim { position: absolute; inset: 0; background: #07080B; opacity: 0.18; pointer-events: none; transition: opacity .4s; }
.pl__card.is-selected .pl__card-dim, .pl__card:hover .pl__card-dim, .pl__card:focus-visible .pl__card-dim { opacity: 0; }

.pl__bar { display: flex; justify-content: center; align-items: center; padding: 16px 20px; border-top: 1px solid rgba(244,246,250,0.10); }
.pl__toggle {
  min-height: 44px; padding: 0 22px; border-radius: 999px; border: 0;
  background: var(--purple); color: #120A24; font-family: var(--sans); font-size: 15px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 10px;
}
.pl__toggle:hover { background: #D6CBFE; }

@media (max-width: 760px) {
  .pl__title { font-size: 42px; }
  .pl__stage { min-height: 420px; }
  .pl__deck { width: 300px; height: 230px; }
  .pl__card { padding: 18px; }
  .pl__card-title { font-size: 18px; }
  .pl__card-note { font-size: 13px; }
}

/* ==========================================================
   Project detail page
   ========================================================== */

.project { max-width: 860px; width: 100%; margin: 0 auto; padding: 24px 5% 96px; flex: 1; }
.project__back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 32px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.project__meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 18px; font-family: var(--mono); font-size: 13px; }
.project__org { color: var(--tone); text-transform: uppercase; letter-spacing: 0.1em; }
.project__date { color: var(--muted); }
.project__title {
  margin: 0 0 24px; font-family: var(--display); font-weight: 700;
  font-size: clamp(38px, 6vw, 72px); line-height: 1; letter-spacing: -0.045em;
}
.project__summary { margin: 0 0 56px; font-size: 21px; line-height: 1.55; color: var(--tone-text); }
.project__section { margin: 0 0 40px; }
.project__section h2 { margin: 0 0 12px; font-family: var(--display); font-size: 26px; letter-spacing: -0.02em; }
.project__section p { margin: 0; font-size: 17px; line-height: 1.65; color: #D7DCE4; }
.project .terminal { max-width: none; margin-bottom: 56px; }
.project__nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 32px; border-top: 1px solid var(--line); }
.project__nav a { display: inline-flex; flex-direction: column; gap: 4px; min-height: 44px; }
.project__nav small { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.project__nav span { font-weight: 600; }
.project__nav .next { text-align: right; margin-left: auto; }

/* ==========================================================
   Timeline (approved canvas design)
   ========================================================== */

.tl-page {
  min-height: 100svh; display: flex; flex-direction: column;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(244,246,250,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244,246,250,0.03) 1px, transparent 1px);
  background-size: 56px 56px;
}
.tl { flex: 1; min-width: 0; }
.tl-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px 24px; padding: 8px 72px 0; }
.tl-title { margin: 0 0 12px; font-family: var(--display); font-weight: 700; font-size: 52px; line-height: 1; letter-spacing: -0.045em; }
.tl-updated { margin: 0; }
.tl-open { display: flex; flex-wrap: wrap; gap: 10px; transition: opacity .4s; }
.tl-open .pill, .tl-bar .pill { min-height: 46px; cursor: pointer; font-family: var(--sans); background: transparent; color: var(--text); }
.tl-open .pill--solid, .tl-bar .pill--solid { background: var(--text); color: var(--bg); border-color: var(--text); }
.tl[data-view="full"] .tl-open, .tl[data-plain="on"] .tl-open { opacity: 0; pointer-events: none; }

/* pinned bar: filters + view buttons (full and boring views only).
   In the month view it takes no space; it opens instantly (still invisible) when the
   line starts to turn, and folds away over the same 1.1s when turning back. */
.tl-bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px;
  max-height: 0; margin-top: 0; padding: 0 72px; overflow: hidden;
  background: rgba(7,8,11,0.86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease, max-height 1.1s cubic-bezier(.65,0,.25,1), margin-top 1.1s cubic-bezier(.65,0,.25,1), padding 1.1s cubic-bezier(.65,0,.25,1), border-color .3s;
}
.tl[data-view="full"] .tl-bar, .tl[data-plain="on"] .tl-bar {
  max-height: 260px; margin-top: 16px; padding: 14px 72px; overflow: visible;
  opacity: 1; pointer-events: auto; border-bottom-color: rgba(244,246,250,0.10);
  transition: opacity .5s ease .9s, max-height 0s, margin-top 0s, padding 0s, border-color .5s ease .9s;
}
.tl[data-plain="on"] .tl-bar { transition-delay: .3s, 0s, 0s, 0s, .3s; }
.tl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-chip {
  min-height: 40px; padding: 0 13px; border-radius: 999px;
  border: 1px solid rgba(244,246,250,0.18); background: transparent; color: var(--muted);
  font-family: var(--mono); font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.tl-chip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.tl-chip__count { opacity: 0.6; }
.tl-chip.is-on { border-color: var(--c); background: rgba(244,246,250,0.08); color: var(--text); }
.tl-bar__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* the stage and the boring list share one grid cell */
.tl-grid { display: grid; margin-top: 12px; overflow-x: clip; }
.tl-stage {
  grid-area: 1 / 1; position: relative; overflow: hidden; outline-offset: -4px;
  transform-origin: 50% 0;
  transition-property: height, transform, opacity, filter;
  transition-timing-function: cubic-bezier(.2,.8,.2,1), cubic-bezier(.65,0,.25,1), ease, ease;
}
.tl[data-plain="on"] .tl-stage { transform: scale(0.55); opacity: 0; filter: blur(6px); pointer-events: none; }
.tl-wrap {
  position: absolute; left: 0; top: 0; transform-origin: 0 40px;
  transition: transform 1.1s cubic-bezier(.65,0,.25,1);
}
.tl-line {
  position: absolute; top: 39px; height: 2px;
  background: linear-gradient(90deg, rgba(244,246,250,0.12), rgba(244,246,250,0.4) 70%, rgba(244,246,250,0.12));
}
.tl-month {
  position: absolute; left: 0; top: 0; transform-origin: 0 40px;
  transition-property: transform, filter, opacity;
  transition-duration: 1.1s, .8s, .6s;
  transition-timing-function: cubic-bezier(.65,0,.25,1), ease, ease;
}
.tl-month__head {
  display: flex; align-items: center; gap: 18px; height: 80px; padding: 0; border: 0; background: transparent;
  color: var(--text); font-family: var(--sans); cursor: pointer; text-align: left;
}
.tl-month.is-focus .tl-month__head { cursor: default; }
.tl-month__dot {
  flex: none; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--text); box-shadow: 0 0 0 7px var(--bg);
}
.tl-month__label { font-family: var(--display); font-weight: 700; font-size: 40px; letter-spacing: -0.035em; white-space: nowrap; }
.tl-month__items { margin: 4px 0 0 16px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.tl-item {
  padding: 16px 20px; border-radius: 14px;
  border: 1px solid rgba(244,246,250,0.10); border-left: 3px solid var(--c); background: rgba(12,14,18,0.94);
}
.tl-item__top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.tl-item__tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--c); }
.tl-item__title { margin: 0; font-size: 17px; line-height: 1.35; font-weight: 600; }
.tl-item__text { margin: 6px 0 0; font-size: 15px; line-height: 1.55; color: var(--blue-soft); }

/* boring view */
.tl-plain {
  grid-area: 1 / 1; align-self: start; padding: 28px 72px 80px;
  column-count: 3; column-gap: 56px;
  transform-origin: 50% 0; transform: scale(1.06); opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform .7s cubic-bezier(.2,.8,.2,1), opacity .6s ease, visibility 0s linear .7s;
}
.tl[data-plain="on"] .tl-plain {
  transform: scale(1); opacity: 1; visibility: visible; pointer-events: auto;
  transition: transform .7s cubic-bezier(.2,.8,.2,1) .35s, opacity .6s ease .35s, visibility 0s;
}
.tl-plain__month { break-inside: avoid; margin: 0 0 28px; }
.tl-plain__label {
  margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid rgba(244,246,250,0.12);
  font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.12em; color: #E8ECF2;
}
.tl-plain__items { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.tl-plain__item { display: flex; gap: 10px; }
.tl-plain__mark { flex: none; width: 7px; height: 7px; margin-top: 7px; border-radius: 2px; background: var(--c); }
.tl-plain__title { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; }
.tl-plain__text { display: block; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* month view controls */
.tl-controls { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 0 72px 40px; transition: opacity .4s; }
.tl[data-view="full"] .tl-controls, .tl[data-plain="on"] .tl-controls { opacity: 0; pointer-events: none; }
.tl-controls .pstack__btn:disabled { opacity: 0.35; cursor: default; }
.tl-counter { min-width: 170px; text-align: center; font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; color: var(--muted); }
.tl-noscript { padding: 0 72px; }

/* no animation on first paint */
.tl:not(.is-ready) .tl-wrap, .tl:not(.is-ready) .tl-month, .tl:not(.is-ready) .tl-stage { transition: none !important; }

@media (max-width: 760px) {
  .tl-head, .tl-controls, .tl-noscript { padding-left: 20px; padding-right: 20px; }
  .tl-bar, .tl[data-view="full"] .tl-bar, .tl[data-plain="on"] .tl-bar { padding-left: 20px; padding-right: 20px; gap: 10px; }
  .tl[data-view="full"] .tl-bar, .tl[data-plain="on"] .tl-bar { padding-top: 10px; padding-bottom: 10px; }
  .tl-chips { flex-wrap: nowrap; width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tl-chips::-webkit-scrollbar { display: none; }
  .tl-chip { flex: none; }
  .tl-bar__actions { width: 100%; flex-wrap: nowrap; }
  .tl-bar__actions .pill { flex: 1 1 auto; justify-content: center; min-height: 44px; padding: 0 14px; font-size: 14px; white-space: nowrap; }
  .tl-title { font-size: 40px; }
  .tl-month__label { font-size: 30px; }
  .tl-plain { padding: 24px 20px 64px; column-count: 1; }
  .tl-counter { min-width: 140px; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .tl-plain { column-count: 2; }
}
