/* ===========================================================
   Aleksei Zhynguel — Portfolio
   Shared styles. Taste-soft premium: silver canvas, copper accent,
   double-bezel cards, button-in-button CTAs, spring motion.
   =========================================================== */

:root {
  /* canvas */
  --bg: #F2F2F0;
  --bg-soft: #ECEBE8;
  --surface: #FAFAF8;
  --surface-2: #FFFFFF;

  /* ink */
  --fg: #14130F;
  --fg-2: #2A2924;
  --muted: #6B6964;
  --muted-2: #8E8C86;
  --hairline: rgba(20, 19, 15, 0.08);
  --hairline-strong: rgba(20, 19, 15, 0.14);

  /* copper accent — warm, senior, not startup-bright */
  --accent: #B5673A;
  --accent-soft: rgba(181, 103, 58, 0.10);
  --accent-ink: #FFFFFF;

  /* inverted shell for closing band */
  --shell: #0E0E0B;
  --shell-fg: #F5F4F0;
  --shell-muted: #9B9990;
  --shell-hairline: rgba(245, 244, 240, 0.10);

  /* radii */
  --r-card: 28px;
  --r-card-inner: 22px;
  --r-pill: 999px;
  --r-md: 14px;
  --r-sm: 10px;

  /* elevation — diffuse only, no hard shadows */
  --shadow-card: 0 20px 40px -15px rgba(20, 19, 15, 0.05), 0 2px 6px -2px rgba(20, 19, 15, 0.04);
  --shadow-soft: 0 14px 30px -18px rgba(20, 19, 15, 0.06);
  --shadow-pop: 0 30px 60px -25px rgba(20, 19, 15, 0.18), 0 8px 18px -10px rgba(20, 19, 15, 0.08);

  /* motion */
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --t-fast: 200ms;
  --t-mid: 450ms;
  --t-slow: 700ms;

  /* type */
  --font-display: 'Geist', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body: 'Geist', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  scroll-behavior: smooth;
}

html { overflow-x: hidden; }

body {
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--t-fast) var(--ease);
}
a:hover { opacity: 0.7; }

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

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

/* ======================  AMBIENT MESH BLOB  ====================== */
.mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.18;
}
.mesh::before, .mesh::after {
  content: "";
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}
.mesh::before {
  background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
  top: -20vmax;
  left: -10vmax;
  animation: mesh-drift-a 28s var(--ease) infinite;
}
.mesh::after {
  background: radial-gradient(circle, #C7A48B 0%, transparent 60%);
  bottom: -25vmax;
  right: -15vmax;
  animation: mesh-drift-b 36s var(--ease) infinite;
}
@keyframes mesh-drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8vmax, 6vmax) scale(1.12); }
}
@keyframes mesh-drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-6vmax, -8vmax) scale(0.92); }
}

/* ======================  FLOATING PILL NAV  ====================== */
.pillnav {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  background: rgba(250, 250, 248, 0.78);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-soft);
  max-width: calc(100vw - 32px);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pillnav::-webkit-scrollbar { display: none; }
.pillnav a, .pillnav button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: 500 13.5px/1 var(--font-body);
  letter-spacing: -0.005em;
  border-radius: var(--r-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  touch-action: manipulation;
}
.pillnav a:hover, .pillnav button:hover { background: var(--bg-soft); }
.pillnav a.is-active { background: var(--fg); color: var(--bg); }
.pillnav .brand {
  font: 700 14px/1 var(--font-display);
  letter-spacing: -0.015em;
  padding: 9px 16px 9px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.pillnav .brand-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
@media (max-width: 720px) {
  .pillnav .brand-text { display: none; }
  .pillnav a, .pillnav button { padding: 8px 12px; font-size: 13px; }
}

/* ======================  LAYOUT HELPERS  ====================== */
.shell {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
}
@media (max-width: 600px) { .shell { padding: 0 18px; } }

.section {
  padding: clamp(72px, 9vw, 140px) 0;
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 3px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  font: 500 12px/1.2 var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  box-shadow: var(--shadow-soft);
}
.eyebrow .pulse {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--accent-soft);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-soft); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.h-display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(46px, 7.4vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.035em;
  color: var(--fg);
}
.h-1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.h-2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.018em;
}
.h-3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.012em;
}

.lede {
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.5;
  color: var(--muted);
  max-width: 52ch;
}

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.mono-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.accent { color: var(--accent); }

/* ======================  HERO  ====================== */
.hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 0 80px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 64px;
  align-items: end;
}
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.hero-title { margin-top: 4px; }
.hero-title .accent { white-space: nowrap; }

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 8px;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.hero-stats > div {
  background: var(--surface);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero-stats .num {
  font: 700 28px/1 var(--font-display);
  letter-spacing: -0.025em;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.hero-stats .lbl {
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* ======================  BUTTONS — button-in-button pill  ====================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px 14px 24px;
  border: 0;
  background: var(--fg);
  color: var(--bg);
  font: 600 14.5px/1 var(--font-display);
  letter-spacing: -0.01em;
  border-radius: var(--r-pill);
  cursor: pointer;
  position: relative;
  transition: transform var(--t-slow) var(--ease), background var(--t-mid) var(--ease);
  text-decoration: none;
  touch-action: manipulation;
}
.btn:hover { background: #000; transform: scale(0.99); }
.btn:active { transform: scale(0.98); }
.btn .arrow-wrap {
  width: 24px; height: 24px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  margin-left: 6px;
  transition: transform var(--t-slow) var(--ease);
}
.btn:hover .arrow-wrap { transform: translate(1px, -1px) scale(1.06); }
.btn .arrow-wrap svg { width: 11px; height: 11px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: transparent;
  color: var(--fg);
  font: 600 14.5px/1 var(--font-display);
  letter-spacing: -0.01em;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline-strong);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  touch-action: manipulation;
}
.btn-ghost:hover { background: var(--surface); border-color: var(--fg); }
.btn-ghost svg { width: 14px; height: 14px; }

.btn-sm { padding: 10px 16px; font-size: 13px; }
.btn-sm .arrow-wrap { width: 20px; height: 20px; }
.btn-sm .arrow-wrap svg { width: 10px; height: 10px; }

/* secondary text link */
.textlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 14px/1 var(--font-body);
  color: var(--fg);
  border-bottom: 1px solid var(--hairline-strong);
  padding-bottom: 2px;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  touch-action: manipulation;
}
.textlink:hover { color: var(--accent); border-color: var(--accent); opacity: 1; }
.textlink svg { width: 12px; height: 12px; }

/* ======================  DOUBLE-BEZEL CARD  ====================== */
.bezel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 6px;
  box-shadow: var(--shadow-card);
  position: relative;
  transition: transform var(--t-slow) var(--ease), box-shadow var(--t-slow) var(--ease);
  touch-action: manipulation;
}
.bezel:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.bezel-core {
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card-inner);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  min-height: 100%;
}
.bezel-title { font: 600 19px/1.2 var(--font-display); letter-spacing: -0.015em; color: var(--fg); }
.bezel-body { font: 400 14.5px/1.5 var(--font-body); color: var(--muted); }
.bezel-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.bezel-meta .tag {
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 5px 9px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
}
.bezel-meta .tag.accent {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}

/* ======================  BENTO GRID  ====================== */
.bento {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: auto auto;
  gap: 18px;
}
.bento > .bezel:nth-child(1) { grid-row: span 2; }
.bento > .bezel:nth-child(2) { grid-row: span 1; }
.bento > .bezel:nth-child(3) { grid-row: span 1; }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr !important; }
  .bento > .bezel:nth-child(1) { grid-row: auto; }
  .bento > .bezel:nth-child(n) { grid-row: auto; }
}

.bento-visual {
  position: relative;
  border-radius: var(--r-md);
  background:
    linear-gradient(135deg, rgba(181, 103, 58, 0.08), rgba(20, 19, 15, 0.02)),
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(20, 19, 15, 0.04) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(20, 19, 15, 0.04) 23px 24px);
  border: 1px solid var(--hairline);
  height: 220px;
  overflow: hidden;
  margin-top: 8px;
}
.bento-visual .glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 700 64px/1 var(--font-display);
  color: var(--fg);
  letter-spacing: -0.04em;
}
.bento-visual .glyph .dot { color: var(--accent); }
.bento-visual .corner {
  position: absolute;
  top: 12px; right: 14px;
  font: 500 10px/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ======================  MARQUEE  ====================== */
.marquee {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
  padding: 18px 0;
  overflow: hidden;
  position: relative;
}
.marquee-track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: marquee 32s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font: 600 18px/1 var(--font-display);
  letter-spacing: -0.015em;
  color: var(--fg-2);
  white-space: nowrap;
}
.marquee-item .glyph {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  display: grid;
  place-items: center;
  font: 700 13px/1 var(--font-mono);
  color: var(--accent);
}
.marquee-item .tech-logo {
  width: 28px; height: 28px;
  border-radius: 6px;
  object-fit: contain;
  vertical-align: middle;
}
.marquee-item .sep {
  width: 6px; height: 6px;
  background: var(--muted-2);
  border-radius: 50%;
  display: inline-block;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ======================  CONTACT CTA SECTION (home)  ====================== */
.cta-band {
  background: var(--fg);
  color: var(--bg);
  border-radius: var(--r-card);
  padding: clamp(36px, 5vw, 64px);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-pop);
}
.cta-band::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, var(--accent) 0%, transparent 60%);
  opacity: 0.22;
  filter: blur(40px);
  pointer-events: none;
}
.cta-band h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
  max-width: 16ch;
  position: relative;
  z-index: 1;
}
.cta-band p {
  margin-top: 20px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--shell-muted);
  max-width: 48ch;
  position: relative;
  z-index: 1;
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  position: relative;
  z-index: 1;
}
.cta-band .btn { background: var(--bg); color: var(--fg); }
.cta-band .btn .arrow-wrap { background: var(--accent); color: var(--accent-ink); }
.cta-band .btn-ghost { color: var(--bg); border-color: rgba(245, 244, 240, 0.24); }
.cta-band .btn-ghost:hover { background: rgba(245, 244, 240, 0.08); border-color: var(--bg); }

.cta-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--shell-hairline);
  position: relative;
  z-index: 1;
}
.cta-meta-item { display: flex; flex-direction: column; gap: 4px; }
.cta-meta-item .lbl {
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--shell-muted);
}
.cta-meta-item .val {
  font: 600 14px/1.4 var(--font-body);
  color: var(--bg);
}

/* ======================  CLOSING BAND  ====================== */
.closing {
  background: var(--shell);
  color: var(--shell-fg);
  border-radius: var(--r-card);
  padding: clamp(48px, 7vw, 96px) clamp(28px, 4vw, 56px);
  position: relative;
  overflow: hidden;
  margin-top: 40px;
}
.closing h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  max-width: 14ch;
}
.closing h2 .accent { color: var(--accent); }
.closing p {
  margin-top: 28px;
  color: var(--shell-muted);
  font-size: 17px;
  max-width: 48ch;
}
.closing-actions { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; }
.closing .btn { background: var(--shell-fg); color: var(--shell); }
.closing .btn .arrow-wrap { background: var(--accent); }
.closing .btn-ghost { color: var(--shell-fg); border-color: var(--shell-hairline); }
.closing .btn-ghost:hover { background: rgba(245,244,240,0.06); border-color: var(--shell-fg); }

.closing-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--shell-hairline);
}
@media (max-width: 720px) {
  .closing-meta { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
.closing-meta-item .lbl {
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--shell-muted);
}
.closing-meta-item .val {
  font: 600 18px/1.3 var(--font-display);
  letter-spacing: -0.015em;
  margin-top: 8px;
  color: var(--shell-fg);
}

/* ======================  FOOTER  ====================== */
.footer {
  padding: 40px 0 60px;
  border-top: 1px solid var(--hairline);
  margin-top: 80px;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer .mono { letter-spacing: 0.2em; }
.footer .links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer a { font: 500 13px/1 var(--font-body); color: var(--muted); }
.footer a:hover { color: var(--fg); opacity: 1; }

/* ======================  SCROLL-ENTRY  ====================== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(8px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease), filter 800ms var(--ease);
  will-change: opacity, transform, filter;
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
.reveal[data-stagger="1"] { transition-delay: 80ms; }
.reveal[data-stagger="2"] { transition-delay: 160ms; }
.reveal[data-stagger="3"] { transition-delay: 240ms; }
.reveal[data-stagger="4"] { transition-delay: 320ms; }

/* ======================  PROJECT GRID (projects.html)  ====================== */
.page-hero {
  padding: 160px 0 60px;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 8vw, 112px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  max-width: 12ch;
}
.page-hero .lede { margin-top: 24px; }

.proj-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (max-width: 820px) { .proj-grid { grid-template-columns: 1fr; } }

.proj-card .bezel-core { min-height: 280px; padding: 32px; }
.proj-card .proj-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
}
.proj-card .proj-title {
  font: 700 24px/1.15 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--fg);
}
.proj-card .proj-year {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 9px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  background: var(--bg);
}
.proj-card .proj-desc {
  font: 400 15px/1.55 var(--font-body);
  color: var(--muted);
}
.proj-card .proj-stack {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.proj-card .proj-stack .tag {
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
}
.proj-card .proj-cta { display: flex; align-items: center; gap: 14px; margin-top: 4px; }

.proj-coming {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--r-pill);
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.proj-coming .dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* ======================  BLOG  ====================== */
.post-list { display: flex; flex-direction: column; gap: 12px; }
.post-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 22px 28px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  transition: background var(--t-fast) var(--ease), transform var(--t-slow) var(--ease);
  touch-action: manipulation;
}
.post-row:hover { background: var(--surface-2); transform: translateX(2px); }
.post-row .date {
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.post-row .title {
  font: 600 18px/1.3 var(--font-display);
  letter-spacing: -0.015em;
  color: var(--fg);
}
.post-row .excerpt { color: var(--muted); font-size: 14px; margin-top: 4px; }
.post-row .arrow {
  width: 32px; height: 32px;
  border: 1px solid var(--hairline-strong);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--muted);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.post-row:hover .arrow { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.post-row .arrow svg { width: 12px; height: 12px; }
@media (max-width: 720px) {
  .post-row { grid-template-columns: 1fr; gap: 8px; padding: 20px; }
  .post-row .arrow { display: none; }
}

.empty-state {
  text-align: center;
  padding: 80px 28px;
  background: var(--surface);
  border: 1px dashed var(--hairline-strong);
  border-radius: var(--r-card);
}
.empty-state h2 {
  font: 700 28px/1.2 var(--font-display);
  letter-spacing: -0.02em;
  color: var(--fg);
  max-width: 22ch;
  margin: 0 auto;
}
.empty-state p { color: var(--muted); max-width: 44ch; margin: 14px auto 0; }

/* ======================  POST ARTICLE  ====================== */
.post-article {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 140px 28px 80px;
}
@media (max-width: 600px) { .post-article { padding: 120px 18px 60px; } }

.post-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 14px/1 var(--font-body);
  color: var(--muted);
  margin-bottom: 40px;
  transition: color var(--t-fast) var(--ease);
}
.post-back:hover { color: var(--fg); opacity: 1; }

.post-header { margin-bottom: 48px; }

.post-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.post-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 16px;
}

.post-dek {
  font-size: 19px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: 24px;
}

.post-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.post-tags .tag {
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 5px 9px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
}

.post-body {
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg-2);
}
.post-body h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 48px 0 16px;
}
.post-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--fg);
  margin: 32px 0 12px;
}
.post-body p { margin: 16px 0; }
.post-body ul { margin: 16px 0; padding-left: 24px; }
.post-body ol { margin: 16px 0; padding-left: 24px; }
.post-body li { margin: 8px 0; }
.post-body pre {
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 20px;
  overflow-x: auto;
  margin: 24px 0;
}
.post-body code {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
}
.post-body p code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 15px;
}
.post-body strong { color: var(--fg); }
.post-body a { color: var(--accent); text-decoration: underline; }
.post-body a:hover { opacity: 1; }
.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--surface);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-style: italic;
  color: var(--fg-2);
}

.post-body .dropcap::first-letter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.2em;
  float: left;
  line-height: 0.8;
  margin-right: 8px;
  margin-top: 6px;
  color: var(--accent);
}

.invariants-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}
.invariants-table th {
  font: 600 12px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid var(--fg);
}
.invariants-table td {
  padding: 16px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
.invariants-table .inv-name {
  font: 600 15px/1.3 var(--font-display);
  color: var(--fg);
  width: 40%;
}
.invariants-table .inv-gua {
  color: var(--fg-2);
}

.post-end { margin-top: 64px; }

/* ======================  PROJECT ARTICLE  ====================== */
.proj-article {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 140px 28px 80px;
}
@media (max-width: 600px) { .proj-article { padding: 120px 18px 60px; } }

.proj-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 14px/1 var(--font-body);
  color: var(--muted);
  margin-bottom: 40px;
  transition: color var(--t-fast) var(--ease);
}
.proj-back:hover { color: var(--fg); opacity: 1; }

.proj-header { margin-bottom: 48px; }

.proj-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.proj-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 16px;
}

.proj-dek {
  font-size: 19px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 52ch;
  margin-bottom: 24px;
}

.proj-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.proj-tags .tag {
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 5px 9px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
}

.proj-body {
  font-size: 17px;
  line-height: 1.65;
  color: var(--fg-2);
}
.proj-body h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin: 48px 0 16px;
}
.proj-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--fg);
  margin: 32px 0 12px;
}
.proj-body p { margin: 16px 0; }
.proj-body ul { margin: 16px 0; padding-left: 24px; }
.proj-body ol { margin: 16px 0; padding-left: 24px; }
.proj-body li { margin: 8px 0; }
.proj-body pre {
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 20px;
  overflow-x: auto;
  margin: 24px 0;
}
.proj-body code {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
}
.proj-body p code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 15px;
}
.proj-body strong { color: var(--fg); }
.proj-body a { color: var(--accent); text-decoration: underline; }
.proj-body a:hover { opacity: 1; }
.proj-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--surface);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-style: italic;
  color: var(--fg-2);
}

.proj-body .dropcap::first-letter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.2em;
  float: left;
  line-height: 0.8;
  margin-right: 8px;
  margin-top: 6px;
  color: var(--accent);
}

/* ======================  ARCHITECTURE DIAGRAM  ====================== */
.arch-diagram {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 24px;
  margin: 32px 0;
  overflow-x: auto;
}
.arch-diagram svg {
  width: 100%;
  height: auto;
  min-width: 540px;
}
.arch-diagram .svc {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--fg);
}
.arch-diagram .svc-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  fill: var(--fg);
}
.arch-diagram .svc-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--muted);
}
.arch-diagram .arrow-line {
  stroke: var(--hairline-strong);
  stroke-width: 1.5;
  fill: none;
}
.arch-diagram .arrow-label {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--muted);
}

/* ======================  METRICS GRID  ====================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  overflow: hidden;
  margin: 24px 0;
}
@media (max-width: 600px) { .metrics-grid { grid-template-columns: 1fr; } }
.metrics-grid > div {
  background: var(--surface);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.metrics-grid .metric-val {
  font: 700 28px/1 var(--font-display);
  letter-spacing: -0.025em;
  color: var(--fg);
}
.metrics-grid .metric-lbl {
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ======================  GITHUB LINK  ====================== */
.proj-body .github-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--fg);
  color: var(--bg);
  font: 600 14px/1 var(--font-body);
  border-radius: var(--r-pill);
  text-decoration: none;
  transition: background var(--t-fast) var(--ease);
}
.proj-body .github-link:hover { background: #000; opacity: 1; }
.proj-body .github-link svg { width: 18px; height: 18px; }

/* ======================  CASE STUDY LINK  ====================== */
.proj-body .case-study-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 14px/1 var(--font-body);
  border-radius: var(--r-pill);
  text-decoration: none;
  transition: background var(--t-fast) var(--ease);
}
.proj-body .case-study-link:hover { opacity: 0.85; }

.proj-end { margin-top: 64px; }

/* ======================  CONTACT  ====================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-card { padding: 32px; }
.contact-card .lbl {
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-card .val {
  font: 700 28px/1.2 var(--font-display);
  letter-spacing: -0.025em;
  color: var(--fg);
  margin-top: 14px;
  word-break: break-word;
}
.contact-card .note {
  color: var(--muted);
  font-size: 14.5px;
  margin-top: 12px;
  max-width: 38ch;
}
.contact-card .actions { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; }

.copied-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--fg);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: var(--r-pill);
  font: 500 13px/1 var(--font-body);
  letter-spacing: -0.005em;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--t-slow) var(--ease), opacity var(--t-slow) var(--ease);
  z-index: 100;
}
.copied-toast.is-shown { transform: translateX(-50%) translateY(0); opacity: 1; }

.availability-card .bezel-core { background: var(--fg); color: var(--bg); }
.availability-card .bezel-title { color: var(--bg); }
.availability-card .bezel-body { color: var(--shell-muted); }
.availability-card .mono { color: var(--shell-muted); }
.availability-card .bezel-meta .tag {
  background: rgba(245,244,240,0.08);
  color: var(--bg);
  border-color: var(--shell-hairline);
}
.availability-card .bezel-meta .tag.accent { background: var(--accent); color: var(--accent-ink); }
.availability-card .bezel-inner { color: var(--bg); }

/* ======================  FOOTER BAND: open-to-work dot  ====================== */
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: #4F8F4A;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(79, 143, 74, 0.4);
  animation: pulse-green 2.2s ease-out infinite;
  margin-right: 6px;
}
@keyframes pulse-green {
  0%   { box-shadow: 0 0 0 0 rgba(79, 143, 74, 0.45); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ======================  MOBILE REFINEMENTS  ====================== */
@media (max-width: 720px) {
  .about-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
}

@media (max-width: 600px) {
  /* hero — less vertical padding on small screens */
  .hero { padding: 100px 0 60px; }

  /* page-hero — less top padding on mobile */
  .page-hero { padding: 120px 0 40px; }

  /* hero display title — smaller on mobile to fit viewport */
  .h-display { font-size: 34px; line-height: 1.05; letter-spacing: -0.025em; }

  /* page-hero h1 — override its own clamp on mobile */
  .page-hero h1 { font-size: 34px; line-height: 1.05; letter-spacing: -0.025em; }

  /* hero stats — tighter cells */
  .hero-stats > div { padding: 14px 16px; }
  .hero-stats .num { font-size: 22px; }

  /* contact card values — smaller for long emails */
  .contact-card .val { font-size: 20px; }

  /* marquee — compress gaps, shrink logos and text */
  .marquee-track { gap: 24px; animation-duration: 24s; }
  .marquee-item { font-size: 14px; gap: 8px; }
  .marquee-item .tech-logo { width: 22px; height: 22px; }
  .marquee-item .glyph { width: 22px; height: 22px; font-size: 11px; }
  .marquee-item .sep { width: 4px; height: 4px; }

  /* contact linkedin card — stack content and icon */
  .contact-linkedin-inner {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    text-align: center;
    justify-items: center;
  }
  .contact-linkedin-inner > div { text-align: center; }
  .contact-linkedin-inner .actions { justify-content: center; }
  .contact-linkedin-inner .note { margin-inline: auto; }

  /* footer — less padding on mobile */
  .footer { padding: 32px 0 40px; margin-top: 48px; }
  .footer-row { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ======================  UTILITIES  ====================== */
.spacer-sm { height: 16px; }
.spacer-md { height: 32px; }
.spacer-lg { height: 64px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.gap-lg { gap: 24px; }
.muted { color: var(--muted); }
.text-center { text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; filter: none; }
}
