:root {
  --bg:     #f7f5f0;
  --bg2:    #f0ede6;
  --bg3:    #e8e4db;
  --ink:    #1a1917;
  --ink2:   #3d3b37;
  --ink3:   #7a776f;
  --ink4:   #b0ada5;
  --accent: #2d5be3;
  --rule:   #d8d4ca;
  --rule2:  #e8e4db;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Lora', Georgia, serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--ink4); }

/* NAV */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 64px;
  background: rgba(247,245,240,0.93);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--rule);
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-weight: 600; font-size: 17px; letter-spacing: 0.04em;
  color: var(--ink); text-decoration: none;
}
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  font-size: 11px; font-weight: 400; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink3); text-decoration: none;
  transition: color 0.18s;
}
.nav-links a:hover { color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 20px; }
.nav-cta {
  font-size: 11px; font-weight: 400; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); text-decoration: none;
  padding: 8px 18px; border: 1px solid var(--accent); border-radius: 2px;
  transition: all 0.18s;
}
.nav-cta:hover { background: var(--accent); color: #fff; }
.lang-toggle {
  font-size: 11px; font-weight: 400; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink3);
  background: none; border: 1px solid var(--rule);
  padding: 8px 14px; border-radius: 2px; cursor: pointer;
  transition: all 0.18s; font-family: inherit;
}
.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }
.cv-dl {
  font-size: 11px; font-weight: 400; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
  background: none; border: 1px solid var(--accent);
  padding: 8px 18px; border-radius: 2px; cursor: pointer;
  transition: all 0.18s; font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
}
.cv-dl:hover { background: var(--accent); color: #fff; }

/* HERO */
#hero {
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 400px;
  align-items: center; gap: 0;
  padding: 120px 64px 80px;
  border-bottom: 1px solid var(--rule);
}
.hero-left { padding-right: 80px; }
.hero-eyebrow {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 40px;
  opacity: 0; animation: rise 0.65s 0.1s ease forwards;
}
.ey-line { width: 28px; height: 1px; background: var(--accent); }
.ey-text { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.hero-name {
  font-family: 'Playfair Display', serif;
  font-weight: 400; font-size: clamp(46px, 5vw, 76px);
  line-height: 1.0; letter-spacing: -0.01em; color: var(--ink);
  margin-bottom: 6px;
  opacity: 0; animation: rise 0.65s 0.2s ease forwards;
}
.hero-name strong { font-weight: 600; }
.hero-role {
  font-family: 'Playfair Display', serif; font-style: italic;
  font-weight: 400; font-size: 21px; color: var(--ink3);
  margin-bottom: 36px;
  opacity: 0; animation: rise 0.65s 0.3s ease forwards;
}
.hero-desc {
  font-size: 14.5px; line-height: 1.78; color: var(--ink2);
  max-width: 510px; margin-bottom: 44px;
  opacity: 0; animation: rise 0.65s 0.4s ease forwards;
}
.hero-btns {
  display: flex; gap: 12px; flex-wrap: wrap;
  opacity: 0; animation: rise 0.65s 0.5s ease forwards;
}
.btn-dark {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; background: var(--ink); color: var(--bg);
  font-size: 11px; font-weight: 400; letter-spacing: 0.12em;
  text-transform: uppercase; text-decoration: none; border-radius: 2px;
  transition: all 0.18s;
}
.btn-dark:hover { background: var(--accent); box-shadow: 0 4px 14px rgba(45,91,227,0.22); transform: translateY(-1px); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border: 1px solid var(--rule); color: var(--ink2);
  font-size: 11px; font-weight: 400; letter-spacing: 0.12em;
  text-transform: uppercase; text-decoration: none; border-radius: 2px;
  transition: all 0.18s;
}
.btn-ghost:hover { border-color: var(--ink2); color: var(--ink); transform: translateY(-1px); }

/* HERO RIGHT */
.hero-right {
  display: flex; flex-direction: column; gap: 28px; align-items: center;
  border-left: 1px solid var(--rule); padding-left: 56px;
  opacity: 0; animation: rise 0.65s 0.35s ease forwards;
}
.photo-wrap img {
  width: 210px; height: 210px; object-fit: cover;
  border-radius: 3px; display: block; filter: grayscale(12%);
}
.stats-block {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--rule);
  border: 1px solid var(--rule); border-radius: 2px;
  overflow: hidden; width: 100%;
}
.stat { background: var(--bg); padding: 16px 10px; text-align: center; }
.stat-n {
  font-family: 'Playfair Display', serif;
  font-weight: 600; font-size: 30px;
  color: var(--ink); display: block; line-height: 1; margin-bottom: 4px;
}
.stat-l { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink4); }
.soc-row { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.soc {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 11px; border: 1px solid var(--rule);
  color: var(--ink3); font-size: 10px; letter-spacing: 0.09em;
  text-transform: uppercase; text-decoration: none; border-radius: 2px;
  transition: all 0.16s;
}
.soc:hover { border-color: var(--accent); color: var(--accent); }
.soc svg { width: 12px; height: 12px; flex-shrink: 0; }

/* SECTIONS */
.sec { padding: 96px 64px; border-bottom: 1px solid var(--rule); }
.sec.alt { background: var(--bg2); }
.sec-label {
  display: flex; align-items: center; gap: 14px; margin-bottom: 60px;
}
.sec-n { font-family: 'Courier Prime', monospace; font-size: 11px; color: var(--ink4); letter-spacing: 0.1em; }
.sec-rule { width: 32px; height: 1px; background: var(--rule); }
.sec-name { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink3); font-weight: 400; }

/* ABOUT */
.about-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 80px; align-items: start; }
.about-body {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 400; line-height: 1.65; color: var(--ink2);
}
.about-body b { font-weight: 500; color: var(--ink); }
.skills-col { display: flex; flex-direction: column; gap: 26px; }
.sg-t {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink4); margin-bottom: 9px; font-weight: 400;
  display: flex; align-items: center; gap: 10px;
}
.sg-t::after { content: ''; flex: 1; height: 1px; background: var(--rule2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11px; padding: 4px 10px;
  background: var(--bg); border: 1px solid var(--rule);
  color: var(--ink2); border-radius: 2px;
}
.tag.hi { background: #eef1fb; border-color: #c5cef5; color: var(--accent); }

/* PROJECT */
.proj-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.proj-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.proj-kicker {
  display: inline-block;
  font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
  font-weight: 400; padding: 4px 10px; border-radius: 2px;
  color: #b45309; background: #fffbf0; border: 1px solid #f6d787;
}
.proj-kicker.suc {
  color: var(--accent); background: #eef1fb; border-color: #c5cef5;
}
.proj-h {
  font-family: 'Playfair Display', serif;
  font-weight: 600; font-size: 46px; letter-spacing: -0.02em;
  color: var(--ink); line-height: 1.0; margin-bottom: 8px;
}
.proj-sub {
  font-family: 'Playfair Display', serif; font-style: italic;
  font-size: 18px; color: var(--ink3); margin-bottom: 22px;
}
.proj-body { font-size: 13.5px; line-height: 1.8; color: var(--ink2); margin-bottom: 24px; }
.feats { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; }
.feat { display: flex; align-items: baseline; gap: 12px; font-size: 13px; color: var(--ink2); line-height: 1.5; }
.feat::before { content: '—'; color: var(--accent); font-size: 11px; flex-shrink: 0; }
.proj-links { display: flex; gap: 10px; flex-wrap: wrap; }

/* Video card */
.vid-card {
  border: 1px solid var(--rule); border-radius: 4px; overflow: hidden;
  background: var(--bg); box-shadow: 0 2px 18px rgba(26,25,23,0.06);
}
.vid-card-label {
  padding: 12px 18px; display: flex; align-items: center; gap: 8px;
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink3); border-bottom: 1px solid var(--rule);
  background: var(--bg2);
}
.vid-embed { position: relative; padding-bottom: 56.25%; }
.vid-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vid-card-footer {
  padding: 12px 18px; display: flex; align-items: center; gap: 10px;
  border-top: 1px solid var(--rule); background: var(--bg2);
}
/* legacy aliases kept for safety */
.vid-foot { padding: 13px 16px; display: flex; align-items: center; gap: 10px; }
.vid-lnk {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); text-decoration: none; font-weight: 400;
  display: inline-flex; align-items: center; gap: 6px; transition: gap 0.18s;
}
.vid-lnk:hover { gap: 10px; }
.co-tags { display: flex; gap: 6px; margin-left: auto; }
.co-tag {
  font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 4px 10px; border: 1px solid var(--rule); color: var(--ink3);
  text-decoration: none; border-radius: 2px; transition: all 0.16s;
}
.co-tag:hover { border-color: var(--accent); color: var(--accent); }

/* EXPERIENCE */
.exp-list { display: flex; flex-direction: column; }
.exp-item {
  display: grid; grid-template-columns: 175px 1fr; gap: 40px;
  padding: 40px 0; border-bottom: 1px solid var(--rule2);
}
.exp-item:first-child { padding-top: 0; }
.exp-item:last-child { border-bottom: none; padding-bottom: 0; }
.exp-period { font-family: 'Courier Prime', monospace; font-size: 11px; color: var(--ink4); line-height: 1.7; }
.exp-badge {
  display: inline-block; margin-top: 6px;
  font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent); padding: 3px 8px;
  border: 1px solid rgba(45,91,227,0.3); background: #eef1fb; border-radius: 2px;
}
.exp-role {
  font-family: 'Playfair Display', serif;
  font-weight: 500; font-size: 21px; color: var(--ink);
  margin-bottom: 3px; line-height: 1.2;
}
.exp-org { font-size: 12px; color: var(--ink3); margin-bottom: 14px; }
.exp-pts { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.exp-pts li {
  font-size: 13px; color: var(--ink2); line-height: 1.65;
  padding-left: 16px; position: relative;
}
.exp-pts li::before { content: '·'; position: absolute; left: 0; color: var(--accent); font-size: 18px; top: -3px; }

/* PUBLICATIONS */
.pub-group { margin-bottom: 44px; }
.pub-type {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink4); padding-bottom: 10px; margin-bottom: 4px;
  border-bottom: 1px solid var(--rule2);
}
.pub-row {
  display: grid; grid-template-columns: 50px 1fr 100px;
  gap: 20px; align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--rule2);
  text-decoration: none; color: var(--ink);
  transition: padding-left 0.15s;
}
.pub-row:last-child { border-bottom: none; }
.pub-row:hover { padding-left: 10px; }
.pub-yr { font-family: 'Courier Prime', monospace; font-size: 11px; color: var(--ink4); }
.pub-t { font-size: 13px; line-height: 1.5; }
.pub-a { font-size: 11px; color: var(--ink4); margin-top: 2px; }
.pub-venue { font-size: 10px; letter-spacing: 0.07em; color: var(--accent); text-align: right; }
.pub-more {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 20px; font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); text-decoration: none;
  transition: gap 0.18s;
}
.pub-more:hover { gap: 14px; }

/* GRANTS */
.grants-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 2px; background: var(--rule);
  border: 1px solid var(--rule); border-radius: 3px; overflow: hidden;
}
.gc { background: var(--bg); padding: 22px 26px; transition: background 0.15s; }
.gc:hover { background: var(--bg2); }
.gc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 7px; }
.gc-id { font-family: 'Courier Prime', monospace; font-size: 11px; color: var(--accent); }
.gc-yr { font-family: 'Courier Prime', monospace; font-size: 10px; color: var(--ink4); white-space: nowrap; }
.gc-name { font-size: 13px; line-height: 1.55; color: var(--ink2); }
.gc.award { background: #fffbf0; }
.gc.award .gc-id { color: #b45309; }

/* CONTACT */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.contact-h {
  font-family: 'Playfair Display', serif;
  font-weight: 400; font-size: 48px; line-height: 1.0;
  letter-spacing: -0.02em; color: var(--ink); margin-bottom: 14px;
}
.contact-h em { font-style: italic; color: var(--ink3); }
.contact-sub { font-size: 14px; color: var(--ink3); line-height: 1.7; margin-bottom: 36px; }
.c-list { display: flex; flex-direction: column; gap: 2px; }
.c-item {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 18px; background: var(--bg2);
  text-decoration: none; color: var(--ink);
  border: 1px solid transparent; border-radius: 2px;
  transition: all 0.15s;
}
.c-item:hover { background: var(--bg); border-color: var(--rule); padding-left: 24px; }
.c-ico { width: 30px; height: 30px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--ink3); }
.c-ico svg { width: 15px; height: 15px; }
.c-lbl { font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink4); }
.c-val { font-size: 13px; color: var(--ink); margin-top: 1px; }
.prof-block { display: flex; flex-direction: column; gap: 24px; }
.pg-t {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink4); margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px;
}
.pg-t::after { content: ''; flex: 1; height: 1px; background: var(--rule2); }
.prof-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.prof-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pc {
  padding: 16px; background: var(--bg); border: 1px solid var(--rule);
  border-radius: 3px; text-decoration: none; color: var(--ink);
  transition: all 0.18s; display: block;
}
.pc:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(45,91,227,0.1); }
.pc-ico { width: 28px; height: 28px; color: var(--ink4); margin-bottom: 10px; }
.pc-ico svg { width: 100%; height: 100%; }
.pc-accent .pc-ico { color: var(--accent); }
.pc-company .pc-ico { color: var(--ink3); }
.pc-cat { font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink4); margin-bottom: 3px; }
.pc-name { font-size: 12px; font-weight: 500; color: var(--ink); }
.rev-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rev-tag { font-size: 10px; padding: 4px 10px; background: var(--bg); border: 1px solid var(--rule); color: var(--ink3); border-radius: 2px; }

/* FOOTER */
footer {
  padding: 28px 64px; display: flex; justify-content: space-between;
  align-items: center; background: var(--bg2);
}
.f-mark { font-family: 'Playfair Display', serif; font-weight: 500; font-size: 15px; color: var(--ink); }
.f-copy { font-size: 11px; color: var(--ink4); letter-spacing: 0.05em; }

/* ANIMATIONS */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.ap { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.ap.in { opacity: 1; transform: none; }

/* PRINT / DOWNLOAD CV */
@media print {
  @page { margin: 16mm 20mm; size: A4; }

  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Reveal all animated elements */
  .ap,
  .hero-eyebrow, .hero-name, .hero-role, .hero-desc, .hero-btns, .hero-right {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Hide interactive / web-only elements */
  nav, .hero-btns, .soc-row, .vid-card, .proj-links,
  .pub-more, footer, .cv-dl, .lang-toggle, .nav-cta { display: none !important; }

  body { background: #fff; color: #111; }
  .sec.alt { background: #f8f7f5; }
  .gc.award { background: #fffbf0; }

  #hero {
    min-height: auto;
    padding: 24px 40px 32px;
    grid-template-columns: 1fr 260px;
    border-bottom: 1px solid #d8d4ca;
  }
  .hero-left { padding-right: 36px; }
  .hero-right { border-left: 1px solid #d8d4ca; padding-left: 30px; }

  .photo-wrap img { width: 160px; height: 160px; }

  .sec { padding: 32px 40px; border-bottom: 1px solid #d8d4ca; }

  .about-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .proj-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .exp-item { grid-template-columns: 140px 1fr; gap: 20px; }
  .grants-grid { grid-template-columns: repeat(2, 1fr); }
  .pub-row { padding-left: 0 !important; }

  section { page-break-inside: avoid; }
  .exp-item, .pub-group, .gc { page-break-inside: avoid; }

  a { color: inherit; text-decoration: none; }
}

/* RESPONSIVE */
@media (max-width: 900px) {
  nav { padding: 18px 24px; }
  .nav-links, .nav-cta { display: none; }
  .lang-toggle { display: block; }
  #hero { grid-template-columns: 1fr; padding: 100px 24px 60px; min-height: auto; }
  .hero-left { padding-right: 0; }
  .hero-right { border-left: none; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 36px; align-items: center; }
  .sec { padding: 64px 24px; }
  .about-grid, .proj-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .exp-item { grid-template-columns: 1fr; gap: 6px; }
  .pub-row { grid-template-columns: 44px 1fr; }
  .pub-venue { display: none; }
  .grants-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 8px; padding: 24px; text-align: center; }
}
