:root {
  --bg: #0b0f14;
  --bg-soft: #11161d;
  --bg-card: #161d26;
  --border: #232c38;
  --text: #e6edf3;
  --text-dim: #9aa7b4;
  --text-mute: #66727e;
  --accent: #2dd4bf;
  --accent-2: #22d3ee;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --radius: 12px;
  --max: 1080px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "Cascadia Code", "Consolas", "Courier New", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 20, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}
.brand { font-weight: 700; font-size: 1.05rem; color: var(--text); letter-spacing: -0.01em; }
.brand b { color: var(--accent); }
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: var(--text-dim); font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--accent); }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.6rem; cursor: pointer; }

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 8px;
  }
  .nav-links.open { display: flex; position: absolute; top: 64px; left: 12px; right: 12px; }
}

/* ---------- Hero ---------- */
.hero { padding: 84px 20px 48px; text-align: center; }
.hero .kicker {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--mono);
  margin-bottom: 16px;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; letter-spacing: -0.02em; }
.hero h1 .grad {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .sub { max-width: 640px; margin: 20px auto 0; color: var(--text-dim); font-size: 1.1rem; }

/* ---------- Stats band ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  max-width: var(--max);
  margin: 40px auto 0;
  padding: 0 20px;
}
.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
}
.stat .num { font-size: 1.7rem; font-weight: 700; color: var(--accent); font-family: var(--mono); }
.stat .lbl { color: var(--text-mute); font-size: 0.8rem; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Sections ---------- */
section { padding: 56px 0; }
.sec-head { text-align: center; margin-bottom: 32px; }
.sec-head .tag { font-family: var(--mono); color: var(--accent); font-size: 0.8rem; }
.sec-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-top: 6px; }
.sec-head p { color: var(--text-dim); margin-top: 8px; max-width: 640px; margin-inline: auto; }

/* ---------- Cards / grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card .cat { font-family: var(--mono); font-size: 0.72rem; color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.06em; }
.card h3 { font-size: 1.15rem; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--accent); text-decoration: none; }
.card .tagline { color: var(--text-dim); font-size: 0.92rem; }
.card .meta { margin-top: auto; color: var(--text-mute); font-size: 0.8rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tags span {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.72rem;
  font-family: var(--mono);
}
.client { color: var(--text-mute); font-size: 0.78rem; }

/* ---------- Filter chips ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 28px; }
.filters button {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
}
.filters button:hover { color: var(--text); border-color: var(--accent); }
.filters button.active { background: var(--accent); color: #062a26; border-color: var(--accent); font-weight: 600; }

/* ---------- Timeline ---------- */
.timeline { max-width: 720px; margin: 0 auto; position: relative; padding-left: 26px; border-left: 2px solid var(--border); }
.tl-item { position: relative; padding: 0 0 32px 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -33px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
}
.tl-item .yr { font-family: var(--mono); color: var(--accent); font-size: 0.85rem; }
.tl-item h3 { margin: 4px 0 6px; font-size: 1.05rem; }
.tl-item p { color: var(--text-dim); font-size: 0.92rem; }

/* ---------- Skills ---------- */
.skill-block { margin-bottom: 28px; }
.skill-block h3 { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin-bottom: 12px; }
.pill { font-family: var(--mono); font-size: 0.7rem; padding: 2px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.05em; }
.pill.expert { background: rgba(45,212,191,0.16); color: var(--accent); }
.pill.strong { background: rgba(34,211,238,0.14); color: var(--accent-2); }
.pill.good { background: rgba(154,167,180,0.14); color: var(--text-dim); }
.pill.skip { background: rgba(255,95,87,0.13); color: #ffb4ae; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { background: var(--bg-card); border: 1px solid var(--border); padding: 4px 12px; border-radius: 8px; font-size: 0.85rem; color: var(--text-dim); }
.note { background: var(--bg-card); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 16px; color: var(--text-dim); font-size: 0.9rem; margin-top: 12px; }

/* ---------- CTA ---------- */
.cta { background: linear-gradient(135deg, var(--accent-soft), rgba(34,211,238,0.05)); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; text-align: center; }
.cta h2 { font-size: 1.6rem; margin-bottom: 10px; }
.cta p { color: var(--text-dim); max-width: 560px; margin: 0 auto 24px; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #062a26;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.1s ease, background 0.15s ease;
}
.btn:hover { background: var(--accent-2); text-decoration: none; transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); }

/* ---------- Two-col ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.lead { color: var(--text-dim); }
.lead h2 { color: var(--text); font-size: 1.7rem; margin-bottom: 12px; }
.lead p { margin-bottom: 14px; }

/* ---------- Contact ---------- */
.contact-list { max-width: 560px; margin: 0 auto; display: grid; gap: 12px; }
.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.contact-row .k { color: var(--text-mute); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.contact-row .v { color: var(--text); font-family: var(--mono); font-size: 0.9rem; }
.contact-row a.v:hover { color: var(--accent); }

/* ---------- Project card (image-first) ---------- */
.pcard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
  text-align: left;
  width: 100%;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
}
.pcard:hover { transform: translateY(-3px); border-color: var(--accent); }
.pcard .shot {
  aspect-ratio: 16 / 10;
  background: #0e141b;
  overflow: hidden;
}
.pcard .shot img, .pcard .shot svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pcard .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pcard .cat { font-family: var(--mono); font-size: 0.72rem; color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.06em; }
.pcard .year { font-family: var(--mono); font-size: 0.72rem; color: var(--text-mute); }
.pcard h3 { font-size: 1.1rem; line-height: 1.25; }
.pcard .tagline { color: var(--text-dim); font-size: 0.92rem; }
.pcard .tags { margin-top: auto; }
.pcard .tags span {
  background: color-mix(in srgb, var(--chip, #2dd4bf) 14%, transparent);
  color: var(--chip, #2dd4bf);
}

/* expandable story */
.expand { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.28s ease; }
.expand > div { overflow: hidden; }
.pcard.open .expand { grid-template-rows: 1fr; }
.story { padding: 0 20px 20px; border-top: 1px solid var(--border); }
.story .sblk { padding: 14px 0 0; }
.story .sblk h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-mute); margin-bottom: 5px; font-family: var(--mono); }
.story .sblk p { color: var(--text-dim); font-size: 0.9rem; }
.story .client { margin-top: 14px; color: var(--text-mute); font-size: 0.78rem; font-family: var(--mono); }
.story .nub { font-family: var(--mono); font-size: 0.75rem; color: var(--accent); margin-top: 14px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; text-align: center; }
.site-footer p { color: var(--text-mute); font-size: 0.8rem; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Misc ---------- */
.mono { font-family: var(--mono); }
.muted { color: var(--text-mute); }
.center { text-align: center; }
.mt-40 { margin-top: 40px; }
.mb-24 { margin-bottom: 24px; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
