:root {
  --bg:         #0c0c0c;
  --bg1:        #101010;
  --bg2:        #141414;
  --rule:       #1c1c1c;
  --rule2:      #242424;
  --lime:       #d4ff1e;
  --lime-dim:   #8aaa0a;
  --lime-ghost: rgba(212,255,30,0.06);
  --text:       #f2f2ec;
  --mid:        #888882;
  --dim:        #666660;
  --font:       'Montserrat', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle grain */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 999; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

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

/* ─── LAYOUT ─── */
.page { max-width: 1080px; margin: 0 auto; padding: 0 48px; }

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(12,12,12,0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 48px;
  height: 52px; display: flex; align-items: center; justify-content: space-between;
}
.nav-mark {
  font-size: 11px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--text); text-decoration: none;
}
.nav-mark span { color: var(--lime); }
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  font-size: 10px; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--mid); text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  padding-top: 52px;
  display: grid;
  grid-template-rows: 1fr auto;
}

.hero-stage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 0 48px;
  position: relative;
}

/* Index label */
.hero-index {
  position: absolute; top: 64px; right: 0;
  font-size: 10px; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--dim);
  writing-mode: vertical-rl;
  opacity: 0; animation: fadeIn 0.5s 0.8s ease forwards;
}

.hero-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--lime);
  margin-bottom: 32px;
  opacity: 0; animation: up 0.6s 0.1s ease forwards;
}

.hero-name {
  font-size: clamp(60px, 10.5vw, 132px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 40px;
  opacity: 0; animation: up 0.8s 0.18s cubic-bezier(0.16,1,0.3,1) forwards;
}

.hero-name .line2 {
  display: block;
  color: var(--bg);
  -webkit-text-stroke: 2px var(--lime);
  paint-order: stroke fill;
}

.hero-desc {
  display: flex; align-items: flex-start; gap: 48px; flex-wrap: wrap;
  opacity: 0; animation: up 0.6s 0.36s ease forwards;
}

.hero-role {
  font-size: 13px; font-weight: 300; color: var(--mid);
  max-width: 340px; line-height: 1.8; letter-spacing: 0.02em;
}
.hero-role strong { font-weight: 600; color: var(--text); }

.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 4px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px; font-family: var(--font);
  font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; text-decoration: none;
  border: 1px solid; transition: all 0.2s; cursor: pointer;
}
.btn-lime { background: var(--lime); border-color: var(--lime); color: var(--bg); }
.btn-lime:hover { background: transparent; color: var(--lime); }
.btn-outline { background: transparent; border-color: var(--rule2); color: var(--mid); }
.btn-outline:hover { border-color: var(--mid); color: var(--text); }

/* Hero bottom stats strip */
.hero-strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  opacity: 0; animation: up 0.5s 0.5s ease forwards;
}

.strip-item {
  padding: 28px 0; border-right: 1px solid var(--rule);
  display: flex; align-items: baseline; gap: 12px;
}
.strip-item:last-child { border-right: none; }
.strip-item:nth-child(2) { padding-left: 32px; }
.strip-item:nth-child(3) { padding-left: 32px; }

.strip-num {
  font-size: 36px; font-weight: 900; letter-spacing: -0.04em; line-height: 1;
  color: var(--text);
}
.strip-num sup { font-size: 14px; color: var(--lime); font-weight: 700; }
.strip-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--dim); line-height: 1.5;
}



/* ─── SECTIONS ─── */
.section {
  padding: 88px 0;
}

.sec-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 56px;
  padding-bottom: 20px; border-bottom: 1px solid var(--rule);
}

.sec-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--text);
  display: flex; align-items: center; gap: 16px;
}
.sec-title::before {
  content: '';
  display: block; width: 28px; height: 2px; background: var(--lime);
}

.sec-count { font-size: 10px; font-weight: 600; letter-spacing: 0.18em; color: var(--dim); }

/* ─── SKILLS ─── */
.skill-rows {}
.skill-line {
  display: grid; grid-template-columns: 140px 1fr;
  gap: 32px; padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  transition: background 0.15s;
}
.skill-line:first-child { border-top: 1px solid var(--rule); }
.skill-line:hover { background: var(--bg1); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }

.sk-cat {
  font-size: 10px; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--dim); padding-top: 6px;
  align-self: flex-start;
}
.sk-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.sk-pill {
  font-size: 12px; font-weight: 400; color: var(--mid);
  padding: 5px 14px; border: 1px solid var(--rule);
  letter-spacing: 0.04em;
  transition: all 0.15s; cursor: default;
}
.sk-pill:hover { border-color: var(--lime); color: var(--lime); background: var(--lime-ghost); }

/* ─── CAREER ─── */
.job {
  padding: 44px 0;
  border-bottom: 1px solid var(--rule);
  display: grid; grid-template-columns: 144px 1fr;
  gap: 40px;
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.5s, transform 0.5s;
}
.job.vis { opacity: 1; transform: translateY(0); }
.job:first-child { border-top: 1px solid var(--rule); }

.job-left {}
.job-period {
  font-size: 12px; font-weight: 600; color: var(--dim);
  letter-spacing: 0.08em; line-height: 1.9;
}
.job-period .live {
  display: flex; align-items: center; gap: 7px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--lime); margin-bottom: 6px;
}
.job-period .live::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--lime); flex-shrink: 0;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(212,255,30,0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 5px rgba(212,255,30,0); }
}

.job-dur {
  font-size: 10px; font-weight: 400; color: var(--dim);
  margin-top: 6px; letter-spacing: 0.06em;
}

.job-right {}
.job-title {
  font-size: 22px; font-weight: 700; color: var(--text);
  letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 6px;
}
.job-co {
  font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--lime-dim); margin-bottom: 18px;
}
.job-body {
  font-size: 14px; font-weight: 400; color: var(--mid);
  line-height: 1.9; max-width: 560px; margin-bottom: 20px;
}
.job-tech { display: flex; flex-wrap: wrap; gap: 6px; }
.tech {
  font-size: 9px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--dim);
  padding: 4px 10px; border: 1px solid var(--rule);
}

/* ─── CREDENTIALS ─── */
.cred-pair { display: grid; grid-template-columns: 1fr 1fr; }
.cred-card {
  padding: 48px 40px;
  border: 1px solid var(--rule); border-collapse: collapse;
  margin: -1px 0 0 -1px;
  transition: background 0.2s;
  position: relative; overflow: hidden;
}
.cred-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--lime);
  transform: scaleY(0); transform-origin: top;
  transition: transform 0.3s ease;
}
.cred-card:hover { background: var(--bg1); }
.cred-card:hover::before { transform: scaleY(1); }
.cred-eyebrow {
  font-size: 9px; font-weight: 700; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--lime-dim); margin-bottom: 20px;
}
.cred-name {
  font-size: 28px; font-weight: 900; letter-spacing: -0.02em;
  color: var(--text); line-height: 1.1; margin-bottom: 14px;
  text-transform: uppercase;
}
.cred-body { font-size: 14px; font-weight: 300; color: var(--mid); line-height: 1.8; margin-bottom: 20px; }
.cred-id {
  font-size: 10px; font-weight: 600; color: var(--dim);
  letter-spacing: 0.12em; padding: 5px 12px;
  border: 1px solid var(--rule); display: inline-block;
}

/* ─── BIO WIDE ─── */
.bio-wide {
  padding: 88px 0;
}
.bio-headline {
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 100; font-style: italic;
  color: var(--text); letter-spacing: -0.01em;
  line-height: 1.35; max-width: 800px; margin-bottom: 48px;
}
.bio-headline strong {
  font-weight: 900; font-style: normal; color: var(--lime);
  letter-spacing: -0.03em;
}
.bio-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.bio-col { font-size: 14px; font-weight: 400; color: var(--mid); line-height: 1.95; }

/* ─── CONTACT ─── */
.contact-section {
  padding: 88px 0;
  border-bottom: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 40px;
}
.contact-left {}
.contact-sub {
  font-size: 10px; font-weight: 700; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--lime); margin-bottom: 16px;
}
.contact-cta {
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 900; letter-spacing: -0.03em;
  text-transform: uppercase; color: var(--text); line-height: 0.95;
}
.contact-cta .outline {
  display: block;
  color: var(--bg);
  -webkit-text-stroke: 2px #ffffff;
  paint-order: stroke fill;
}
.contact-btns { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 8px; }



/* ─── ANIMATIONS ─── */
@keyframes up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ─── SCROLL REVEAL BASE ─── */
.reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.vis { opacity: 1; transform: translateY(0); }

/* ─── RESPONSIVE ─── */
@media (max-width: 720px) {
  .page { padding: 0 24px; }
  .nav-inner, .footer-inner { padding: 0 24px; }
  .nav-links { display: none; }
  .hero-name { font-size: clamp(48px, 13vw, 96px); }
  .hero-strip { grid-template-columns: 1fr 1fr; }
  .strip-item:nth-child(3) { grid-column: 1 / -1; border-right: none; border-top: 1px solid var(--rule); padding-left: 0; }
  .job { grid-template-columns: 1fr; gap: 16px; }
  .cred-pair, .bio-cols { grid-template-columns: 1fr; }
  .cred-card { margin: -1px 0 0 0; }
  .skill-line { grid-template-columns: 1fr; gap: 10px; }
  .skill-line:hover { margin: 0; padding-left: 0; padding-right: 0; }
  .contact-section { flex-direction: column; align-items: flex-start; }
}

/* ─── PRINT ─── */
#cv-contact { display: none; }

@media print {
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  body::before { display: none; }
  body { background: #fff; color: #111; font-size: 9pt; line-height: 1.6; }

  nav,
  .hero-index,
  .hero-eyebrow,
  .hero-actions,
  .contact-section { display: none !important; }

  .page { max-width: 100%; padding: 0 16mm; }

  /* hero → CV header */
  .hero { min-height: unset; padding-top: 0; display: block; border-bottom: 2pt solid #111; margin-bottom: 14pt; }
  .hero-stage { padding: 12mm 0 8pt; display: block; }
  .hero-name {
    font-size: 22pt; line-height: 1; margin-bottom: 6pt;
    color: #111 !important;
    opacity: 1 !important; animation: none !important;
  }
  .hero-name .line2 { color: #111; -webkit-text-stroke: 0; }
  .hero-desc { display: flex; justify-content: space-between; align-items: flex-start; opacity: 1 !important; animation: none !important; }
  .hero-role { font-size: 8.5pt; color: #555; max-width: 60%; line-height: 1.6; }
  .hero-role strong { color: #111; }
  #cv-contact { display: block !important; font-size: 8pt; color: #555; line-height: 1.8; text-align: right; }

  /* force visible (animations start at opacity 0) */
  .reveal, .job { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }

  /* bio */
  .bio-wide { padding: 12pt 0 6pt; }
  .bio-wide::before {
    content: 'Profile';
    display: block;
    font-size: 7.5pt; font-weight: 700; letter-spacing: 0.22em;
    text-transform: uppercase; color: #aaa;
    border-bottom: 1px solid #e0e0e0; padding-bottom: 3pt; margin-bottom: 8pt;
  }
  .bio-headline { display: none; }
  .bio-cols { gap: 16pt; }
  .bio-col { font-size: 8.5pt; color: #333; line-height: 1.65; }

  /* sections */
  .section { padding: 12pt 0; }
  .sec-header { border-bottom: 1px solid #e0e0e0; margin-bottom: 10pt; padding-bottom: 3pt; }
  .sec-title { font-size: 7.5pt; color: #aaa; letter-spacing: 0.22em; }
  .sec-title::before { display: none; }
  .sec-count { display: none; }

  /* skills */
  .skill-line { padding: 4pt 0; border-bottom: 1px solid #f0f0f0; grid-template-columns: 90pt 1fr; }
  .skill-line:first-child { border-top: none; }
  .skill-line:hover { background: none; margin: 0; padding-left: 0; padding-right: 0; }
  .sk-cat { font-size: 7.5pt; color: #888; }
  .sk-pills { gap: 4pt; }
  .sk-pill { font-size: 8pt; color: #333; border-color: #ddd; padding: 1pt 6pt; }
  .sk-pill:hover { border-color: #ddd; color: #333; background: none; }

  /* jobs */
  .job { grid-template-columns: 72pt 1fr; gap: 0 12pt; padding: 10pt 0; border-bottom: 1px solid #f0f0f0; page-break-inside: avoid; }
  .job:first-child { border-top: none; }
  .job-period { font-size: 7.5pt; color: #888; line-height: 1.7; }
  .job-period .live { display: none; }
  .job-title { font-size: 10.5pt; color: #111; }
  .job-co { font-size: 7.5pt; color: #aaa; }
  .job-body { font-size: 8.5pt; color: #444; max-width: 100%; margin-bottom: 4pt; }
  .job-tech { gap: 3pt; }
  .tech { font-size: 7pt; color: #666; border-color: #ddd; padding: 1pt 5pt; }

  /* page breaks */
  #career { break-before: page; page-break-before: always; }
  #credentials { break-before: page; page-break-before: always; }

  /* credentials */
  .cred-pair { gap: 12pt; }
  .cred-card { padding: 12pt; border-color: #e0e0e0; }
  .cred-card::before { display: none; }
  .cred-card:hover { background: none; }
  .cred-eyebrow { color: #888; }
  .cred-name { font-size: 9pt; color: #111; }
  .cred-body { font-size: 8pt; color: #555; margin-bottom: 6pt; }
  .cred-id { color: #aaa; border-color: #ddd; font-size: 7.5pt; }
}