/* ========================================
   RESET & VARIABLES
   ======================================== */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}

:root {
  color-scheme: dark;
  --bg: #080808;
  --bg2: #0e0e0c;
  --bg3: #141412;
  --surface: #1a1917;
  --ink: #e8e4dc;
  --ink-soft: #b8b2a6;
  --ink-muted: #8a8477;
  --accent: #c45d3e;
  --accent-warm: #d4845a;
  --accent-cool: #4db89e;
  --rule: rgba(232,228,220,.1);
  --rule2: rgba(232,228,220,.18);
  --chip: rgba(232,228,220,.06);
  --accent-soft: rgba(196,93,62,.12);
  --cool-soft: rgba(77,184,158,.08);
  --cool-line: rgba(77,184,158,.3);
  --glow: rgba(196,93,62,.13);
  --nav-bg: rgba(8,8,8,.96);
  --panel-head: rgba(14,14,12,.96);
  --overlay: rgba(4,4,4,.85);
  --grid: rgba(232,228,220,.07);
  --band: #0d0d0f;
  --glow2: rgba(77,184,158,.09);
  --lift: 0 18px 40px -18px rgba(196,93,62,.35);
  --radius: 12px;
  --display: 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'DM Mono', monospace;
  /* side padding that caps content at ~72rem on wide screens */
  --gutter: max(3rem, calc((100% - 72rem) / 2));
}

/* Light theme: follows the system unless the visitor picked one with the toggle. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) { 
    color-scheme: light;
    --bg: #fafaf9; --bg2: #ffffff; --bg3: #f1f0ee; --surface: #ffffff;
    --ink: #18181b; --ink-soft: #3f3f46; --ink-muted: #6b6b73;
    --accent: #b8431f; --accent-warm: #9a3412; --accent-cool: #0f766e;
    --rule: rgba(0,0,0,.08); --rule2: rgba(0,0,0,.14); --chip: rgba(0,0,0,.05);
    --accent-soft: rgba(184,67,31,.09); --cool-soft: rgba(15,118,110,.07); --cool-line: rgba(15,118,110,.3);
    --glow: rgba(184,67,31,.07); --nav-bg: rgba(250,250,249,.92); --panel-head: rgba(255,255,255,.94);
    --overlay: rgba(24,24,27,.35);
    --grid: rgba(24,24,27,.07); --band: #f2f1ee; --glow2: rgba(15,118,110,.06); --lift: 0 18px 40px -20px rgba(184,67,31,.3);
   }
}
:root[data-theme="light"] { 
    color-scheme: light;
    --bg: #fafaf9; --bg2: #ffffff; --bg3: #f1f0ee; --surface: #ffffff;
    --ink: #18181b; --ink-soft: #3f3f46; --ink-muted: #6b6b73;
    --accent: #b8431f; --accent-warm: #9a3412; --accent-cool: #0f766e;
    --rule: rgba(0,0,0,.08); --rule2: rgba(0,0,0,.14); --chip: rgba(0,0,0,.05);
    --accent-soft: rgba(184,67,31,.09); --cool-soft: rgba(15,118,110,.07); --cool-line: rgba(15,118,110,.3);
    --glow: rgba(184,67,31,.07); --nav-bg: rgba(250,250,249,.92); --panel-head: rgba(255,255,255,.94);
    --overlay: rgba(24,24,27,.35);
    --grid: rgba(24,24,27,.07); --band: #f2f1ee; --glow2: rgba(15,118,110,.06); --lift: 0 18px 40px -20px rgba(184,67,31,.3);
   }

html {
  scroll-behavior: smooth;
  font-size: 17px;
}

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--bg) }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px }
h1, h2, h3, .proj-title, .exp-role { text-wrap: balance }
p, li { text-wrap: pretty }

::-webkit-scrollbar { width: 3px }
::-webkit-scrollbar-track { background: var(--bg) }
::-webkit-scrollbar-thumb { background: var(--accent) }

/* ========================================
   PROGRESS BAR
   ======================================== */
#progress {
  position: fixed;
  top: 0; left: 0;
  height: 1px;
  background: var(--accent);
  z-index: 9998;
  width: 0;
  transition: width .1s;
}

/* ========================================
   NAVIGATION — always visible
   ======================================== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.1rem var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rule);
}

/* Override hide — nav is always visible */
nav.hidden { transform: none !important }
nav.scrolled { border-color: var(--rule2) }

.nav-logo {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
  transition: color .3s;
}
.nav-logo:hover { color: var(--accent) }
.nav-logo { margin-right: auto }
nav { gap: .75rem }
.nav-links { margin-right: 1.5rem }

.nav-links { display: flex; gap: 2.2rem; list-style: none }
.nav-links a {
  font-family: var(--body);
  font-size: .92rem;
  color: var(--ink-muted);
  text-decoration: none;
  position: relative;
  transition: color .3s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width .3s;
}
.nav-links a:hover { color: var(--ink) }
.nav-links a:hover::after { width: 100% }

.theme-toggle {
  background: none; border: 1px solid var(--rule2); border-radius: 999px;
  width: 2.1rem; height: 2.1rem; display: grid; place-items: center;
  color: var(--ink-muted); cursor: pointer; transition: color .25s, border-color .25s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent) }
.theme-toggle svg { width: 16px; height: 16px }
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-hamburger span {
  width: 22px; height: 1.5px;
  background: var(--ink-muted);
  transition: all .3s;
}

/* ========================================
   HERO
   ======================================== */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 7rem var(--gutter) 3.5rem;
  gap: 4rem;
  align-items: center;
  position: relative;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 35% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 35% 40%, #000 20%, transparent 75%);
}
.hero::after {
  content: ''; position: absolute; inset: -20%; pointer-events: none;
  background:
    radial-gradient(40rem 26rem at 20% 10%, var(--glow), transparent 70%),
    radial-gradient(34rem 24rem at 85% 70%, var(--glow2), transparent 70%);
  animation: drift 24s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate(4%, -3%) } }
.hero > * { position: relative; z-index: 1 }
.hero-left { animation: fadeUp .8s ease forwards }

.hero-eyebrow {
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.8rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(2.4rem, 4.6vw, 3.7rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.035em;
  margin-bottom: 2rem;
  color: var(--ink);
}
.hero-title em { font-style: normal; color: var(--accent) }

.hero-subtitle {
  font-family: var(--body);
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 46ch;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem }
.hero-worked { margin-top: 2rem; font-size: .9rem; color: var(--ink-muted) }
.hero-worked strong { color: var(--ink-soft); font-weight: 500 }
.hero-avail {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .85rem; color: var(--accent-cool);
  padding: .3rem .8rem; margin-bottom: 1.5rem;
  border: 1px solid var(--cool-line); border-radius: 999px;
  background: var(--cool-soft);
}
.hero-avail span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-cool); animation: pulse 2.2s ease-in-out infinite }

.hero-right {
  position: relative;
  animation: fadeUp .8s .2s ease forwards;
  opacity: 0;
}
.hero-card {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute;
  top: -50%; right: -30%;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
  pointer-events: none;
}
.hero-card-label {
  font-family: var(--mono);
  font-size: 0.80rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 1.8rem;
}
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem }
.stat-number {
  font-family: var(--display);
  font-size: 2.3rem;
  font-weight: 650;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--ink);
  margin-bottom: .2rem;
}
.stat-number span { color: var(--accent) }
.stat-label {
  font-family: var(--mono);
  font-size: 0.80rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  line-height: 1.5;
}
.hero-tags {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  display: flex; gap: .5rem; flex-wrap: wrap;
}
.hero-tags span {
  font-family: var(--body);
  font-size: 0.80rem;
  padding: .35rem .7rem;
  background: var(--chip); border-radius: 6px;
  color: var(--ink-muted);
  transition: all .3s;
}
.hero-tags span:hover { color: var(--accent-warm) }


/* ========================================
   SECTION COMMON
   ======================================== */
section {
  padding: 3.5rem var(--gutter);
  border-bottom: 1px solid var(--rule);
}
#about, #experience { background: var(--band) }
#projects { background: radial-gradient(50rem 28rem at 100% 0%, var(--glow2), transparent 70%) }
#blog { background: radial-gradient(50rem 28rem at 0% 10%, var(--glow), transparent 70%) }
#contact { position: relative; overflow: hidden; background: radial-gradient(46rem 26rem at 50% 100%, var(--glow), transparent 70%) }
#contact::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 100%, #000 15%, transparent 70%);
  mask-image: radial-gradient(ellipse 70% 80% at 50% 100%, #000 15%, transparent 70%);
}
#contact > * { position: relative }
.section-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: end;
  margin-bottom: 1.75rem;
}
.section-title {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.03em;
}
.section-title em { font-style: normal; color: var(--accent) }
.section-label {
  font-family: var(--mono);
  font-size: 0.84rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}

/* ========================================
   REVEAL
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.16,1,.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0) }

/* ========================================
   ABOUT
   ======================================== */
.about {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: 3rem;
  border-top: 1px solid var(--rule2);
  padding-top: 1.5rem;
}
.about-meta .meta-row {
  padding: .8rem 0;
  border-bottom: 1px solid var(--rule);
}
.about-meta .meta-row:first-child { padding-top: 0 }
.about-meta .meta-row:last-child { border-bottom: none }
.meta-key {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: .2rem;
}
.meta-val {
  font-family: var(--body);
  font-size: .95rem;
  color: var(--ink-soft);
}
.about-body {
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-soft);
}
.about-body p+p { margin-top: 1.2rem }
.about-body strong { color: var(--ink); font-weight: 500 }

/* ========================================
   SKILLS
   ======================================== */
.skills-grid {
  columns: 3;
  column-gap: 1rem;
}
.skill-group {
  padding: 1.6rem;
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: border-color .3s, box-shadow .3s;
  break-inside: avoid;
  margin-bottom: 1rem;
}
.skill-group:hover { border-color: var(--accent-soft); box-shadow: var(--lift) }
.skill-cat {
  font-family: var(--mono);
  font-size: 0.80rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.skill-cat::before {
  content: '';
  width: .8rem; height: 1px;
  background: var(--ink-muted);
}
.skill-items { display: flex; flex-wrap: wrap; gap: .35rem }
.skill-tag {
  font-family: var(--body);
  font-size: 0.80rem;
  padding: .28rem .65rem;
  background: var(--chip); border-radius: 6px;
  color: var(--ink-muted);
  transition: all .25s;
  cursor: default;
}
.skill-tag:hover,
.skill-tag.hot { background: var(--accent-soft); color: var(--accent-warm) }

/* ========================================
   EXPERIENCE — timeline
   ======================================== */
.exp-list {
  position: relative;
  border-top: 1px solid var(--rule);
}

.exp-row {
  display: grid;
  gap: .6rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
  transition: background .3s;
}

.exp-left { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem }
.exp-live {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--mono);
  font-size: 0.80rem;
  letter-spacing: .1em;
  color: var(--accent-cool);
}
.exp-live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-cool);
  animation: pulse 2.2s ease-in-out infinite;
}
.exp-period {
  font-family: var(--mono);
  font-size: 0.80rem;
  letter-spacing: .1em;
  color: var(--ink-muted);
}

.exp-right { padding-top: .1rem }
.exp-role {
  font-family: var(--display);
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: .3rem;
}
.exp-role em { font-style: normal; color: var(--accent) }
.exp-co {
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
}
.exp-bullets { list-style: none; display: flex; flex-direction: column; gap: .5rem }
.exp-more summary { cursor: pointer; margin-top: .6rem; font-size: .9rem; font-weight: 500; color: var(--accent); list-style: none }
.exp-more summary::-webkit-details-marker { display: none }
.exp-more summary::after { content: ' ↓' }
.exp-more[open] summary { display: none }
.exp-more .exp-bullets { margin-top: .5rem }
.exp-bullets li {
  font-family: var(--body);
  font-size: .95rem;
  line-height: 1.6;
  color: var(--ink-soft);
  position: relative;
  padding-left: 1.4rem;
}
.exp-bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  top: .35rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--accent);
}
.exp-bullets li strong { color: var(--ink); font-weight: 500 }
.exp-tags {
  display: flex; flex-wrap: wrap; gap: .3rem;
  margin-top: 1.2rem;
}
.exp-tag {
  font-family: var(--body);
  font-size: 0.78rem;
  padding: .22rem .6rem;
  background: var(--chip); border-radius: 6px;
  color: var(--ink-muted);
  transition: all .25s;
}
.exp-tag:hover { color: var(--accent) }
/* ========================================
   PROJECTS
   ======================================== */
.proj-tabs { display: flex; gap: .5rem; margin-bottom: 1.25rem }
.proj-tab {
  font-family: var(--body);
  font-size: .92rem;
  font-weight: 500;
  padding: .55rem 1.2rem;
  color: var(--ink-muted);
  cursor: pointer;
  border: 1px solid var(--rule2);
  border-radius: 999px;
  background: transparent;
  transition: all .25s;
}
.proj-tab.active { color: var(--bg); border-color: var(--accent); background: var(--accent) }
.proj-tab:hover:not(.active) { color: var(--ink) }
.proj-pane { display: none }
.proj-pane.active { display: block }
.proj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem }
.proj-card {
  padding: 2rem;
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  position: relative; overflow: hidden;
  transition: all .4s cubic-bezier(.16,1,.3,1);
  display: flex; flex-direction: column; gap: 1.2rem;
  cursor: default;
}
.proj-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s cubic-bezier(.16,1,.3,1);
}
.proj-card:hover { border-color: var(--accent-soft); box-shadow: var(--lift); transform: translateY(-3px) }
.proj-card:hover::before { transform: scaleX(1) }
.proj-num {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.proj-title {
  font-family: var(--display);
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  font-weight: 650; line-height: 1.3; letter-spacing: -.02em;
  color: var(--ink);
}
.proj-title em { font-style: normal; color: var(--accent) }
.proj-desc { font-family: var(--body); font-size: .95rem; line-height: 1.55; color: var(--ink-soft); flex: 1 }
.proj-impact {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--accent-cool);
  padding: .65rem 1rem;
  background: var(--cool-soft);
  border-left: 2px solid var(--accent-cool);
  line-height: 1.6;
}
.proj-tags { display: flex; flex-wrap: wrap; gap: .3rem }
.proj-tag {
  font-family: var(--body);
  font-size: 0.76rem;
  padding: .22rem .55rem;
  background: var(--chip); border-radius: 6px;
  color: var(--ink-muted);
  transition: all .25s;
}
.proj-tag:hover { color: var(--accent) }
.proj-foot { display: flex; align-items: center; justify-content: space-between; padding-top: .8rem; border-top: 1px solid var(--rule) }
.proj-cat { font-family: var(--mono); font-size: 0.78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted) }
.proj-actions { display: flex; align-items: center; gap: 1rem }
.proj-expand {
  font-family: var(--body);
  font-size: .92rem;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  background: none; border: none;
  transition: all .3s;
  display: flex; align-items: center; gap: .4rem;
  white-space: nowrap;
}
.proj-expand:hover { gap: .7rem }
a.proj-expand { text-decoration: none }
.proj-subhead { font-family: var(--mono); font-size: 0.80rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); margin: 3rem 0 1rem }

/* Loading */
.loading-cell { grid-column: 1/-1; padding: 3rem; text-align: center }
.spinner { width: 20px; height: 20px; border: 1px solid var(--rule2); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto .75rem }
.loading-text { font-family: var(--mono); font-size: 0.82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted) }
@keyframes spin { to { transform: rotate(360deg) } }

/* ========================================
   CASE STUDY MODAL
   ======================================== */
.cs-overlay { position: fixed; inset: 0; background: var(--overlay); z-index: 500; opacity: 0; pointer-events: none; transition: opacity .35s; backdrop-filter: blur(8px) }
.cs-overlay.open { opacity: 1; pointer-events: all }
.cs-modal { position: fixed; top: 0; right: 0; bottom: 0; width: min(820px, 100vw); background: var(--bg2); z-index: 501; transform: translateX(100%); transition: transform .45s cubic-bezier(.22,1,.36,1); overflow-y: auto; border-left: 1px solid var(--rule2) }
.cs-modal.open { transform: translateX(0) }
.cs-head { position: sticky; top: 0; background: var(--panel-head); backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); padding: 1.2rem 2.5rem; display: flex; align-items: center; justify-content: space-between; z-index: 10 }
.cs-close { font-family: var(--mono); font-size: 0.82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); cursor: pointer; background: none; border: none; transition: color .3s; display: flex; align-items: center; gap: .5rem }
.cs-close:hover { color: var(--accent) }
.cs-badge { font-family: var(--mono); font-size: 0.80rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent) }
.cs-body { padding: 3rem 2.5rem 5rem; max-width: 700px; margin: 0 auto }
.cs-meta { font-family: var(--mono); font-size: 0.80rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 1rem }
.cs-title { font-family: var(--display); font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; color: var(--ink); margin-bottom: 2rem }
.cs-section { margin-bottom: 2.5rem }
.cs-section h3 { font-family: var(--display); font-size: 1.15rem; font-weight: 650; color: var(--ink); margin-bottom: 1rem }
.cs-section p,.cs-section li { font-family: var(--body); font-size: 1rem; line-height: 1.65; color: var(--ink-soft); margin-bottom: .8rem }
.cs-section strong { color: var(--ink); font-weight: 500 }
.cs-section ul { margin-left: 1.2rem; margin-bottom: 1rem }
.cs-section li::marker { color: var(--accent) }
.cs-metric-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin: 1.5rem 0 }
.cs-metric { padding: 1.2rem; border: 1px solid var(--rule); border-radius: 8px; text-align: center }
.cs-metric-num { font-family: var(--display); font-size: 1.7rem; font-weight: 700; color: var(--accent); line-height: 1; margin-bottom: .3rem }
.cs-metric-label { font-family: var(--mono); font-size: 0.78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted) }
.cs-timeline { position: relative; padding-left: 2rem; margin: 1.5rem 0 }
.cs-timeline::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--rule2) }
.cs-tl-item { position: relative; margin-bottom: 1.5rem }
.cs-tl-item::before { content: ''; position: absolute; left: -2rem; top: .6rem; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg2) }
.cs-tl-phase { font-family: var(--mono); font-size: 0.80rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .3rem }
.cs-tl-desc { font-family: var(--body); font-size: .95rem; color: var(--ink-soft); line-height: 1.6 }
.cs-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: 1.5rem }
.cs-tags span { font-family: var(--body); font-size: 0.82rem; padding: .22rem .55rem; background: var(--chip); border-radius: 6px; color: var(--ink-muted) }
.cs-divider { border: none; border-top: 1px solid var(--rule); margin: 2rem 0 }

/* ========================================
   BLOG — fixed cards
   ======================================== */
.blog-header { display: flex; justify-content: flex-end; margin-bottom: 1.25rem }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.blog-card {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  cursor: pointer;
  position: relative; overflow: hidden;
  transition: background .35s;
}
.blog-card { transition: border-color .3s, box-shadow .3s, transform .3s }
.blog-card:hover { border-color: var(--accent-soft); box-shadow: var(--lift); transform: translateY(-3px) }
.blog-card:hover .bc-arrow { color: var(--accent); transform: translate(2px,-2px) }

/* Fixed-height thumb — no empty boxes */
.bc-thumb {
  width: 100%;
  height: 155px;
  overflow: hidden;
  background: var(--bg3);
  flex-shrink: 0;
}
.bc-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .85;
  transition: opacity .4s, transform .4s;
}
.blog-card:hover .bc-thumb img { opacity: 1; transform: scale(1.04) }

.bc-ph {
  width: 100%; height: 72px;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bc-ph span {
  font-family: var(--display);
  font-size: 2rem;
  color: transparent;
  -webkit-text-stroke: 1px var(--rule2);
}

.bc-body {
  padding: 1.4rem 1.5rem 1rem;
  flex: 1;
  display: flex; flex-direction: column; gap: .5rem;
}
.bc-meta {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: flex; align-items: center; gap: .45rem; flex-wrap: wrap;
}
.bc-meta span:first-child { color: var(--accent) }
.bc-sep { opacity: .35 }
.bc-title {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}
.bc-excerpt {
  font-family: var(--body);
  font-size: .95rem;
  line-height: 1.7;
  color: var(--ink-muted);
  flex: 1;
}
.bc-foot {
  padding: .75rem 1.5rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bc-read { font-family: var(--body); font-size: .92rem; font-weight: 500; color: var(--accent) }
.bc-arrow { font-size: .85rem; color: var(--ink-muted); transition: all .3s }

/* ========================================
   BLOG DRAWER
   ======================================== */
.drawer-overlay { position: fixed; inset: 0; background: var(--overlay); z-index: 600; opacity: 0; visibility: hidden; transition: all .35s; backdrop-filter: blur(4px) }
.drawer-overlay.open { opacity: 1; visibility: visible }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 90vw); background: var(--bg2); z-index: 601; transform: translateX(100%); transition: transform .4s cubic-bezier(.22,1,.36,1); overflow-y: auto; border-left: 1px solid var(--rule2) }
.drawer.open { transform: translateX(0) }
.drawer-head { position: sticky; top: 0; background: var(--panel-head); backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); padding: 1.2rem 2rem; display: flex; justify-content: space-between; align-items: center; z-index: 10 }
.drawer-head span { font-family: var(--mono); font-size: 0.80rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted) }
.drawer-close { font-family: var(--mono); font-size: 0.80rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); cursor: pointer; background: none; border: 1px solid var(--rule); padding: .45rem .9rem; transition: all .3s }
.drawer-close:hover { border-color: var(--accent); color: var(--accent) }
.drawer-body { padding: 2.5rem 2rem 4rem; max-width: 600px; margin: 0 auto }
.drawer-cat { font-family: var(--mono); font-size: 0.80rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem }
.drawer-title { font-family: var(--display); font-size: 1.7rem; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; color: var(--ink); margin-bottom: .75rem }
.drawer-date { font-family: var(--mono); font-size: 0.80rem; color: var(--ink-muted); margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--rule) }
.drawer-content { font-family: var(--body); font-size: 1rem; line-height: 1.7; color: var(--ink-soft) }
.drawer-content p { margin-bottom: 1.2rem }
.drawer-content h2,.drawer-content h3 { font-family: var(--display); color: var(--ink); font-weight: 650; margin: 1.8rem 0 .75rem; line-height: 1.2 }
.drawer-content h2 { font-size: 1.6rem }
.drawer-content h3 { font-size: 1.15rem; color: var(--accent-warm) }
.drawer-content img { max-width: 100%; margin: 1.5rem 0; opacity: .8 }
.drawer-content a { color: var(--accent); text-decoration: underline }
.drawer-content pre,.drawer-content code { font-family: var(--mono); font-size: .82rem; background: var(--bg3); color: var(--ink-soft) }
.drawer-content pre { padding: 1.25rem; overflow-x: auto; border: 1px solid var(--rule); margin: 1.25rem 0; line-height: 1.6 }
.drawer-content code { padding: .15rem .4rem }
.drawer-content blockquote { border-left: 2px solid var(--accent); padding-left: 1.25rem; margin: 1.5rem 0; font-style: italic; color: var(--ink-muted) }
.drawer-external { display: inline-flex; align-items: center; gap: .5rem; margin-top: 2rem; font-family: var(--mono); font-size: 0.84rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: .3rem; transition: gap .3s }
.drawer-external:hover { gap: .9rem }

/* ========================================
   RESUME — clean download card (no full CV)
   ======================================== */
.resume-actions { display: flex; gap: .75rem; margin-bottom: 1.5rem }
.btn-outline {
  font-family: var(--body);
  font-size: .92rem;
  font-weight: 500;
  padding: .7rem 1.4rem;
  border: 1px solid var(--rule2);
  border-radius: 999px;
  color: var(--ink-muted);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all .3s;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent) }
.btn-filled {
  font-family: var(--body);
  font-size: .92rem;
  font-weight: 500;
  border-radius: 999px;
  padding: .7rem 1.4rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  transition: all .3s;
  text-decoration: none;
}
.btn-filled:hover { background: var(--accent-warm); border-color: var(--accent-warm) }

.resume-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.rc-left {
  padding: 3rem;
  border-right: 1px solid var(--rule);
}
.rc-cert {
  padding: 1rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.rc-cert-name { font-family: var(--body); font-size: .92rem; color: var(--ink) }
.rc-cert-link {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: .08em;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.rc-cert-link:hover { text-decoration: underline }

.rc-right { padding: 3rem }
.rc-section-lbl {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: .75rem;
}
.rc-edu-item { padding: .6rem 0; border-bottom: 1px solid var(--rule) }
.rc-edu-item:last-child { border-bottom: none }
.rc-edu-deg { font-family: var(--body); font-size: .92rem; color: var(--ink) }
.rc-edu-sch { font-family: var(--mono); font-size: 0.74rem; letter-spacing: .06em; color: var(--ink-muted); margin-top: .15rem }

/* ========================================
   CONTACT
   ======================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden }
.contact-left { padding: 3.5rem 3rem; border-right: 1px solid var(--rule); display: flex; flex-direction: column; justify-content: center }
.contact-right { padding: 3.5rem 3rem; display: flex; flex-direction: column; justify-content: center }
.c-heading { font-family: var(--display); font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 700; line-height: 1.05; letter-spacing: -.035em; margin-bottom: 1.5rem }
.c-heading em { font-style: normal; color: var(--accent); display: block }
.c-sub { font-family: var(--body); font-size: 1rem; color: var(--ink-muted); line-height: 1.65; max-width: 34ch }
.contact-link { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); transition: all .3s }
.contact-link:first-child { border-top: 1px solid var(--rule) }
.contact-link:hover { padding-left: .4rem }
.contact-link:hover .c-arrow { transform: translateX(0); opacity: 1 }
.contact-link:hover .cl-val { color: var(--ink) }
.cl-label { font-family: var(--mono); font-size: 0.78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: .15rem }
.cl-val { font-family: var(--body); font-size: .95rem; color: var(--ink-soft); transition: color .25s }
.c-arrow { font-size: .8rem; color: var(--accent); transform: translateX(-5px); opacity: .25; transition: all .3s }

/* ========================================
   FOOTER
   ======================================== */
footer { padding: 1.5rem var(--gutter); border-top: 1px solid var(--rule); display: flex; justify-content: space-between; align-items: center }
.ft { font-family: var(--mono); font-size: 0.78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted) }
.ft-links { display: flex; gap: 1.8rem }
.ft-links a { font-family: var(--mono); font-size: 0.78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); text-decoration: none; transition: color .3s }
.ft-links a:hover { color: var(--accent) }

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px) } to { opacity: 1; transform: translateY(0) } }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .2 } }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 7rem; gap: 3rem }
  .about { grid-template-columns: 1fr; gap: 2rem }
  .skills-grid { columns: 2 }
  .proj-grid { grid-template-columns: 1fr }
  .blog-grid { grid-template-columns: repeat(2, 1fr) }
  .resume-card { grid-template-columns: minmax(0, 1fr) }
  .rc-left { border-right: none; border-bottom: 1px solid var(--rule) }
  .contact-grid { grid-template-columns: 1fr }
  .contact-left { border-right: none; border-bottom: 1px solid var(--rule) }
  .cs-metric-grid { grid-template-columns: repeat(2, 1fr) }
}

@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem }
  .nav-links { display: none }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; margin: 0; background: var(--bg); padding: 2rem 1.5rem; border-bottom: 1px solid var(--rule); gap: 1.5rem }
  .nav-hamburger { display: flex }
  section { padding: 4rem 1.5rem }
  .hero { padding: 6rem 1.5rem 3rem }
  .skills-grid { columns: 1 }
  .blog-grid { grid-template-columns: 1fr }
  footer { flex-direction: column; gap: 1rem; text-align: center }
  .cs-metric-grid { grid-template-columns: 1fr }
  .rc-left, .rc-right { padding: 2rem 1.5rem }
  .contact-left, .contact-right { padding: 3rem 1.5rem }
  .proj-card { padding: 2rem 1.5rem }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important }
  .reveal { opacity: 1; transform: none }
}

/* ========================================
   PRINT — ATS
   ======================================== */
