/* =========================================================
   Utkarsh Sawant — portfolio
   technical / dark / animated
   ========================================================= */

:root {
  --bg: #0a0a0f;
  --bg-2: #0f0f17;
  --surface: #14141d;
  --surface-2: #1a1a26;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e8e8ee;
  --text-dim: #a8a8b8;
  --text-mute: #787888;
  --accent: #7c5cff;        /* electric indigo */
  --accent-2: #00e1ff;      /* cyan */
  --accent-3: #ff5cb0;      /* magenta */
  --good: #4ade80;
  --shell-w: min(1200px, 92vw);
  --radius: 18px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

/* hide native cursor only while custom glow is being tracked */
body.cursor-hidden { cursor: none; }

@media (max-width: 768px) {
  body, body.cursor-hidden { cursor: auto; }
}

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.muted { color: var(--text-mute); }
.inline { display: inline-block; padding: 1px 6px; background: var(--surface); border-radius: 4px; font-size: 0.9em; }

/* ============ preview banner (only on preview-noritual.html) ============ */

.preview-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 8px 16px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #ffd66e;
  background: rgba(255, 214, 110, 0.08);
  border-bottom: 1px solid rgba(255, 214, 110, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.preview-banner ~ .site-header { top: 32px; }
body:has(.preview-banner) { padding-top: 32px; }

/* ============ background fx ============ */

/* every background variant uses .bg-layer; visibility gated by [data-bg] on body */
.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}
body[data-bg="particles"] .bg-particles,
body[data-bg="kpi"]       .bg-kpi,
body[data-bg="dag2"]      .bg-dag2,
body[data-bg="prompt"]    .bg-prompt,
body[data-bg="erd"]       .bg-erd {
  opacity: 1;
}

/* -- particles variant (canvas + faint grid) -- */
#bg-canvas { z-index: -2; }
.grid-overlay {
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* -- kpi variant: realistic live metrics scrolling in two columns -- */
.bg-kpi {
  overflow: hidden;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px;
  line-height: 1.8;
}
.bg-kpi .kpi-stream {
  position: absolute;
  left: 4vw;
  top: 0;
  width: 40vw;
  margin: 0;
  white-space: pre;
  color: rgba(168, 168, 184, 0.22);
  animation: kpi-scroll 80s linear infinite;
}
.bg-kpi .kpi-stream--b {
  left: auto; right: 4vw;
  animation-duration: 105s;
  animation-delay: -35s;
}
@keyframes kpi-scroll {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}

/* -- dag v2: labeled real-pipeline DAG -- */
.bg-dag2 svg { width: 100%; height: 100%; }
.bg-dag2 .dag2-pulses circle {
  filter: drop-shadow(0 0 6px rgba(0,225,255,0.7));
}

/* -- prompt variant: a single tmux-like psql window typing queries -- */
.bg-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
}
.bg-prompt .prompt-window {
  width: min(720px, 80vw);
  margin: 0;
  padding: 18px 24px;
  background: rgba(15, 15, 23, 0.55);
  border: 1px solid rgba(124, 92, 255, 0.18);
  border-radius: 12px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(168, 168, 184, 0.5);
  white-space: pre-wrap;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
}
.bg-prompt .prompt-header {
  display: block;
  color: rgba(124, 92, 255, 0.55);
  margin-bottom: 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
}
.bg-prompt .prompt-ps { color: rgba(0, 225, 255, 0.55); margin-right: 6px; }
.bg-prompt .prompt-typed { color: rgba(232, 232, 238, 0.55); }
.bg-prompt .prompt-cursor {
  color: rgba(0, 225, 255, 0.7);
  animation: prompt-blink 1s steps(2) infinite;
}
@keyframes prompt-blink {
  0%, 50%   { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* -- erd variant: ghost ER diagram, static -- */
.bg-erd svg { width: 100%; height: 100%; opacity: 0.7; }


.cursor-glow {
  position: fixed;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(124, 92, 255, 0.6);
  pointer-events: none;
  z-index: 9999;
  top: 0; left: 0;
  transform: translate(-100px, -100px);
  opacity: 0;
  transition: width 0.25s var(--ease), height 0.25s var(--ease),
              background 0.25s var(--ease), border-color 0.25s var(--ease),
              opacity 0.2s var(--ease);
  mix-blend-mode: difference;
}
.cursor-glow.is-visible { opacity: 1; }
.cursor-glow.is-hover {
  width: 60px; height: 60px;
  background: rgba(124, 92, 255, 0.15);
  border-color: var(--accent-2);
}

/* ============ header ============ */

.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 48px);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(10, 10, 15, 0.6);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600; font-size: 15px;
  letter-spacing: -0.01em;
}
.brand-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 12px var(--good);
  animation: pulse 2s ease-in-out infinite;
}
.brand-accent { color: var(--accent); }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.primary-nav ul {
  display: flex; gap: 4px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}
.primary-nav a {
  display: block;
  padding: 8px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  text-decoration: none;
  color: var(--text-dim);
  border-radius: 999px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.primary-nav a:hover { color: var(--text); }
.primary-nav a.is-active {
  color: var(--text);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 40px; height: 40px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.nav-toggle span {
  width: 18px; height: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute; top: 100%; right: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px;
    transform: translateY(-10px);
    opacity: 0; visibility: hidden;
    transition: all 0.25s var(--ease);
  }
  .primary-nav.is-open {
    transform: translateY(8px);
    opacity: 1; visibility: visible;
  }
  .primary-nav ul {
    flex-direction: column;
    background: transparent; border: none; padding: 0;
  }
  .primary-nav a { padding: 10px 18px; }
}

/* ============ hero ============ */

.hero {
  width: var(--shell-w);
  margin: 0 auto;
  min-height: 100vh;
  padding: 140px 0 80px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
}

.hero-meta {
  display: inline-flex; align-items: center; gap: 10px;
  align-self: flex-start;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 36px;
}
.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 8px var(--good);
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}
.hero-title .line {
  display: block;
  overflow: hidden;
}
.hero-title em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}
.hero-title .grad {
  background: linear-gradient(120deg, var(--accent), var(--accent-2), var(--accent-3));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shift 8s ease-in-out infinite;
}
.hero-title .muted { color: var(--accent); opacity: 0.7; }

@keyframes shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-sub {
  max-width: 60ch;
  font-size: 1.125rem;
  color: var(--text-dim);
  margin-bottom: 40px;
}

.hero-cta {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-bottom: 80px;
}

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
              border-color 0.25s var(--ease), color 0.25s var(--ease);
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover {
  transform: translateY(-2px);
  background: white;
  color: var(--bg);
  box-shadow: 0 12px 30px -10px rgba(124, 92, 255, 0.6);
}
.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
  transform: translateY(-2px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.hero-stats > div {
  display: flex; flex-direction: column; gap: 4px;
}
.hero-stats strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.hero-stats span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-mute);
}

.scroll-hint {
  position: absolute;
  bottom: 30px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.scroll-line {
  position: relative;
  width: 1px;
  height: 48px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.scroll-line::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 50%;
  width: 100%;
  background: var(--text);
  animation: scroll-line-fill 1.8s ease-in-out infinite;
}
@keyframes scroll-line-fill {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(200%); }
}

/* ============ sections shared ============ */

.section {
  width: var(--shell-w);
  margin: 0 auto;
  padding: 120px 0;
  position: relative;
}

.section-head {
  margin-bottom: 64px;
  display: flex; flex-direction: column; gap: 12px;
}
.section-num {
  font-size: 14px;
  color: var(--accent-2);
  font-weight: 500;
  letter-spacing: 0.1em;
}
.section-head h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.section-head h2 .dot { color: var(--accent); }
.section-sub {
  color: var(--text-dim);
  max-width: 50ch;
}

/* ============ about ============ */

.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
}

.about-text .lead {
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 24px;
  line-height: 1.5;
}
.about-text p {
  color: var(--text-dim);
  margin-bottom: 18px;
  max-width: 60ch;
}
.about-text strong { color: var(--text); font-weight: 600; }
.about-text em { color: var(--accent-2); font-style: normal; }

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.about-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at top right, rgba(124,92,255,0.15), transparent 60%);
  pointer-events: none;
}
.card-header {
  font-size: 12px;
  color: var(--text-mute);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.about-card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 20px;
  font-size: 14px;
}
.about-card dt {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.about-card dd { color: var(--text); }

/* ============ stack ============ */

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.stack-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}
.stack-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(124,92,255,0.06) 100%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.stack-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}
.stack-card:hover::after { opacity: 1; }

.stack-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 18px;
  color: var(--text);
}
.chips {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.chips li {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 5px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.stack-card:hover .chips li { color: var(--text); }

/* ============ marquee (stack section replacement) ============ */

.section-marquee .section-head { margin-bottom: 40px; }

.marquee {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);  /* break out of the .shell width */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 8px 0;
  /* fade out at the edges so logos appear/disappear smoothly */
  mask-image: linear-gradient(to right, transparent 0, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 8%, black 92%, transparent 100%);
}
.marquee-track {
  overflow: hidden;
  width: 100%;
}
.marquee-row {
  display: inline-flex;
  gap: 18px;
  white-space: nowrap;
  padding-right: 18px;
}
.marquee-row--ltr { animation: marquee-left 40s linear infinite; }
.marquee-row--rtl { animation: marquee-right 45s linear infinite; }
.marquee-row--slow { animation-duration: 60s; }

@keyframes marquee-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes marquee-right {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 14px 26px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.marquee:hover .marquee-row { animation-play-state: paused; }
.marquee-item:hover {
  color: var(--text);
  border-color: var(--accent-2);
  background: var(--surface);
}

@media (max-width: 720px) {
  .marquee-item { font-size: 13px; padding: 10px 18px; }
  .marquee { gap: 12px; }
  .marquee-row { gap: 12px; padding-right: 12px; }
}

/* ============ animated text (scroll-lit characters) ============ */

[data-animate-text] .atxt-char {
  opacity: 0.18;
  transition: opacity 0.1s linear;
  color: var(--text);
}

/* ============ principles (how I think) ============ */

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 960px) {
  .principles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .principles { grid-template-columns: 1fr; }
}
.principle {
  position: relative;
  padding: 28px 28px 28px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.principle::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}
.principle:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}
.principle:hover::before { transform: scaleX(1); }

.principle-num {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.principle h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 10px 0 12px;
  letter-spacing: -0.01em;
}
.principle p {
  color: var(--text-dim);
  font-size: 0.95rem;
  max-width: 50ch;
}

/* ============ projects ============ */

/* ============ project stack (sticky stacking cards) ============ */

.section-projects { padding-bottom: 80px; }

.project-stack {
  margin-top: 32px;
  /* room for the last card to scroll into a sticky stop without colliding with the next section */
}

.project-slot {
  position: sticky;
  /* each slot sticks at a slightly different top so cards pile up;
     index handled via :nth-child below */
  top: 96px;
  /* fixed-height viewport for each card so the next slot's sticky kicks in at the right moment */
  height: 85vh;
  min-height: 600px;
  margin-bottom: 24px;
}
.project-slot:nth-child(1) { top: 96px;  z-index: 1; }
.project-slot:nth-child(2) { top: 124px; z-index: 2; }
.project-slot:nth-child(3) { top: 152px; z-index: 3; }
.project-slot:nth-child(4) { top: 180px; z-index: 4; }
.project-slot:nth-child(5) { top: 208px; z-index: 5; }
.project-slot:nth-child(6) { top: 236px; z-index: 6; }
.project-slot:nth-child(7) { top: 264px; z-index: 7; }

.project-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 36px;
  background: var(--bg-2);
  border: 1px solid var(--border-strong, var(--border));
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 -20px 40px -20px rgba(0,0,0,0.6);
}

.project-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.project-card-meta {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  min-width: 0;
}
.project-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 800;
  line-height: 0.9;
  color: var(--text);
  letter-spacing: -0.04em;
  flex-shrink: 0;
}
.project-card-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  min-width: 0;
}
.project-card-cat {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.project-card-text h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  text-transform: lowercase;
  margin: 0;
}

.project-card-cta {
  flex-shrink: 0;
  padding: 10px 18px;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text);
  border: 1px solid var(--border-strong, var(--border));
  border-radius: 999px;
  text-transform: uppercase;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
  cursor: default;
  user-select: none;
}
.project-card:hover .project-card-cta {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.project-card-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  min-height: 0;
}
.project-card-blurb {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
  overflow-y: auto;
}
.project-card-blurb p { margin: 0; }
.project-card-blurb strong { color: var(--text); font-weight: 600; }
.project-card-why {
  color: var(--accent-2);
  font-style: italic;
  opacity: 0.9;
}

.project-card-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 20px;
  min-height: 0;
}
.project-card-visual svg {
  width: 100%;
  height: auto;
  max-height: 100%;
  display: block;
}
.project-card-visual-cap {
  position: absolute;
  bottom: 12px;
  left: 16px;
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 0.08em;
}

@media (max-width: 960px) {
  .project-card-body { grid-template-columns: 1fr; }
  .project-card-visual { min-height: 220px; }
  .project-slot { height: auto; min-height: 0; position: relative; top: 0 !important; margin-bottom: 24px; }
}
@media (max-width: 600px) {
  .project-card { padding: 24px; border-radius: 24px; gap: 20px; }
  .project-card-head { flex-direction: column; }
  .project-card-meta { gap: 16px; }
}

/* ============ project filter chips ============ */

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.chip-filter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 7px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
              border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.chip-filter:hover {
  color: var(--text);
  border-color: var(--border-strong);
}
.chip-filter.is-active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* hide filtered-out slots cleanly (must drop sticky too) */
.project-slot.is-hidden {
  display: none;
}

/* ============ now line in about ============ */

.now-line {
  margin-top: 22px;
  padding: 10px 14px;
  background: rgba(0, 225, 255, 0.05);
  border-left: 2px solid var(--accent-2);
  border-radius: 0 6px 6px 0;
  font-size: 0.9rem;
  color: var(--text);
}
.now-label {
  font-size: 10px;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-right: 10px;
}

.project-tech {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.project-tech li {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-dim);
}

/* ============ timeline ============ */

.timeline {
  list-style: none;
  position: relative;
  padding-left: 30px;
}
.timeline::before {
  content: '';
  position: absolute; left: 6px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}
.timeline-item {
  position: relative;
  padding-bottom: 40px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 30px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -30px; top: 8px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px rgba(124, 92, 255, 0.6);
}
.timeline-when {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
  padding-top: 4px;
  letter-spacing: 0.05em;
}
.timeline-what h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.timeline-what p {
  color: var(--text-dim);
  max-width: 60ch;
}

@media (max-width: 720px) {
  .timeline-item { grid-template-columns: 1fr; gap: 6px; }
}

/* ============ contact ============ */

.contact-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-lead {
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: 30px;
  max-width: 30ch;
  line-height: 1.4;
}

.contact-mail {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 6px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), gap 0.3s var(--ease);
}
.contact-mail:hover {
  color: var(--accent-2);
  border-color: var(--accent-2);
  gap: 18px;
}
.contact-mail svg { transition: transform 0.3s var(--ease); }
.contact-mail:hover svg { transform: translate(4px, -4px); }

.contact-links {
  list-style: none;
  display: flex; flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.contact-links a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px;
  background: var(--surface);
  text-decoration: none;
  font-size: 14px;
  color: var(--text);
  transition: background 0.2s var(--ease), padding-left 0.3s var(--ease);
}
.contact-links a:hover {
  background: var(--surface-2);
  padding-left: 30px;
}
.contact-links .mono {
  font-size: 12px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============ footer ============ */

.site-footer {
  width: var(--shell-w);
  margin: 0 auto;
  padding: 40px 0 30px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  font-size: 12px;
}

/* ============ animations ============ */

[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
[data-animate].is-in {
  opacity: 1;
  transform: translateY(0);
}

/* stagger child reveals */
.hero [data-animate]:nth-child(1) { transition-delay: 0.05s; }
.hero [data-animate]:nth-child(2) { transition-delay: 0.15s; }
.hero [data-animate]:nth-child(3) { transition-delay: 0.35s; }
.hero [data-animate]:nth-child(4) { transition-delay: 0.5s; }
.hero [data-animate]:nth-child(5) { transition-delay: 0.65s; }

.stack-grid [data-animate]:nth-child(1) { transition-delay: 0.05s; }
.stack-grid [data-animate]:nth-child(2) { transition-delay: 0.15s; }
.stack-grid [data-animate]:nth-child(3) { transition-delay: 0.25s; }
.stack-grid [data-animate]:nth-child(4) { transition-delay: 0.35s; }

.principles [data-animate]:nth-child(1) { transition-delay: 0.05s; }
.principles [data-animate]:nth-child(2) { transition-delay: 0.15s; }
.principles [data-animate]:nth-child(3) { transition-delay: 0.25s; }
.principles [data-animate]:nth-child(4) { transition-delay: 0.35s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-animate] { opacity: 1; transform: none; }
}
