/* ============================================================
   MIRCEADRAGHICI.COM — Styles
   Dark palette · DM Serif Display + DM Sans · Bilingual EN/RO
   ============================================================ */

/* ── TOKENS & THEMES ── */

/* Carbon — warm near-black, champagne, Cormorant Garamond */
:root,
[data-theme="carbon"] {
  --bg:           #0e0d0c;
  --bg2:          #141311;
  --bg3:          #191714;
  --surface:      #201e1b;
  --surface2:     #272421;
  --border:       #353129;
  --accent:       #d4b896;
  --accent2:      #9b8a78;
  --text:         #ede9e4;
  --muted:        #8a7e74;
  --dim:          #524a43;
  --serif:        'Cormorant Garamond', Georgia, serif;
  --sans:         'DM Sans', system-ui, sans-serif;
  --nav-bg:       rgba(14,13,12,0.93);
  --btn-color:    #0e0d0c;
  --photo-filter: brightness(0.9) contrast(1.05) saturate(0.76);
  --ring-color:   rgba(212,184,150,0.2);
  --overlay-bg:   rgba(14,13,12,0.62);
  --radius:       8px;
  --max-w:        1200px;
}

/* Parchment — warm paper white, forest green + aged gold, Playfair Display */
[data-theme="parchment"] {
  --bg:           #f5f2ec;
  --bg2:          #eeebe3;
  --bg3:          #e8e4da;
  --surface:      #dedad0;
  --surface2:     #d4cfc4;
  --border:       #c8c1b4;
  --accent:       #1c3c2e;
  --accent2:      #9e7b35;
  --text:         #1a1915;
  --muted:        #524e47;
  --dim:          #9a9286;
  --serif:        'Playfair Display', Georgia, serif;
  --sans:         'Plus Jakarta Sans', system-ui, sans-serif;
  --nav-bg:       rgba(245,242,236,0.95);
  --btn-color:    #f5f2ec;
  --photo-filter: brightness(1.0) contrast(1.03) saturate(0.9);
  --ring-color:   rgba(28,60,46,0.22);
  --overlay-bg:   rgba(245,242,236,0.72);
  --radius:       8px;
  --max-w:        1200px;
}

/* Midnight — deep cool blue-black, sage green + pale blue, Space Grotesk */
[data-theme="midnight"] {
  --bg:           #080c14;
  --bg2:          #0c1220;
  --bg3:          #101828;
  --surface:      #162030;
  --surface2:     #1c283c;
  --border:       #243348;
  --accent:       #7db89a;
  --accent2:      #b8c4d8;
  --text:         #dce4f0;
  --muted:        #6a7e96;
  --dim:          #3a4e66;
  --serif:        'DM Serif Display', Georgia, serif;
  --sans:         'Space Grotesk', system-ui, sans-serif;
  --nav-bg:       rgba(8,12,20,0.93);
  --btn-color:    #080c14;
  --photo-filter: brightness(0.88) contrast(1.07) saturate(0.7);
  --ring-color:   rgba(125,184,154,0.18);
  --overlay-bg:   rgba(8,12,20,0.65);
  --radius:       8px;
  --max-w:        1200px;
}

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

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

img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }
a { color: inherit; }

/* ── BILINGUAL ── */
body.lang-en .ro { display: none !important; }
body.lang-ro .en { display: none !important; }

/* ── ACCESSIBILITY ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius);
  z-index: 9999;
  transition: top 0.15s;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 3rem;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(128,128,128,0.15);
}

.nav-logo {
  text-decoration: none;
  flex-shrink: 0;
  display: block;
  border-radius: 50%;
}

.nav-avatar {
  position: relative;
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(232,200,124,0.28);
  background: var(--surface);
  transition: border-color 0.22s;
}
.nav-logo:hover .nav-avatar { border-color: var(--accent); }

.nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: var(--photo-filter);
  display: block;
}

/* "MD" label — revealed on hover */
.nav-avatar-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--overlay-bg);
  opacity: 0;
  transition: opacity 0.22s;
}
.nav-logo:hover .nav-avatar-label { opacity: 1; }

/* Fallback: image failed — show "MD" always, hide broken img */
.nav-avatar--err img { display: none; }
.nav-avatar--err { background: var(--surface); }
.nav-avatar--err .nav-avatar-label {
  opacity: 1;
  background: transparent;
  font-size: 0.82rem;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.lang-btn {
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  color: var(--dim);
  padding: 0.1rem 0;
  transition: color 0.2s;
  line-height: 1;
}
.lang-btn:hover { color: var(--muted); }
.lang-btn.active { color: var(--accent); }

.lang-sep {
  font-size: 0.7rem;
  color: var(--dim);
  user-select: none;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
  margin-left: 0.5rem;
}

.ham-line {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--muted);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.nav-hamburger.open .ham-line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open .ham-line:nth-child(2) { opacity: 0; }
.nav-hamburger.open .ham-line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav overlay */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 190;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.nav-mobile.open { display: flex; }

.nav-mobile-lang {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.9rem;
}

.nav-mobile-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  text-align: center;
}

.nav-mobile-links a {
  font-family: var(--serif);
  font-size: 1.8rem;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-mobile-links a:hover { color: var(--accent); }

/* ── SECTION BASE ── */
section { padding: 6rem 3rem; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 0.9rem;
}
.section-label::before {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--accent2);
  flex-shrink: 0;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}
.section-title em { color: var(--accent); font-style: italic; }

.section-sub {
  font-size: 0.97rem;
  color: var(--muted);
  max-width: 580px;
  line-height: 1.72;
  margin-bottom: 3rem;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.82rem 1.7rem;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  font-family: var(--sans);
  line-height: 1;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--btn-color);
}
.btn-primary:hover { background: #f0d890; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent2); color: var(--accent2); }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 3rem;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 10rem 0 6rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 1.4rem;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--accent2);
  flex-shrink: 0;
}

.hero-name {
  font-family: var(--serif);
  font-size: clamp(3rem, 5.5vw, 4.8rem);
  line-height: 1.04;
  color: var(--text);
  margin-bottom: 1.1rem;
}
.hero-name em { color: var(--accent); font-style: italic; }

.hero-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.8rem;
}

.role-badge {
  padding: 0.28rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.76rem;
  color: var(--muted);
  background: var(--surface);
  transition: all 0.18s ease;
  user-select: none;
}
.role-badge.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(232,200,124,0.08);
}

.hero-tagline {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.76;
  max-width: 510px;
  margin-bottom: 2.4rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* ── ORBIT CONTAINER ── */
.hero-orbit-outer {
  position: relative;
  width: 420px;
  height: 420px;
  flex-shrink: 0;
}

.hero-avatar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 308px;
  height: 308px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid var(--ring-color);
  animation: spin-slow 22s linear infinite;
  pointer-events: none;
}
.hero-avatar-ring::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

@keyframes spin-slow { to { transform: rotate(360deg); } }

.hero-avatar {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 280px;
  height: 280px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--surface2);
  background: var(--surface);
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: var(--photo-filter);
}

.hero-avatar-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 4.5rem;
  color: var(--accent);
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
}

/* ── ORBIT CHIPS ── */
/* Positioned on a 175px-radius orbit around the avatar center.
   All chip corners verified to clear the 140px avatar radius. */
.orbit-chip {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 0.26rem 0.75rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg2);
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--dim);
  white-space: nowrap;
  letter-spacing: 0.07em;
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.35s ease, border-color 0.35s ease, color 0.35s ease, background 0.35s ease;
}

.orbit-chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface);
  opacity: 1;
}

/* top center */
.orbit-chip[data-idx="0"] { top:  8%; left: 50%;  }
/* upper right */
.orbit-chip[data-idx="1"] { top: 37%; left: 90%;  }
/* lower right */
.orbit-chip[data-idx="2"] { top: 84%; left: 74%;  }
/* lower left */
.orbit-chip[data-idx="3"] { top: 84%; left: 26%;  }
/* upper left */
.orbit-chip[data-idx="4"] { top: 37%; left: 10%;  }

.hero-open {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1.3rem;
  border: 1px solid rgba(92,191,170,0.26);
  border-radius: 100px;
  font-size: 0.76rem;
  color: var(--accent2);
  background: rgba(92,191,170,0.05);
}

.dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent2);
  flex-shrink: 0;
  animation: pulse 2.2s ease infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.45; transform:scale(0.8); }
}

.hero-location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--dim);
}
.hero-location svg { flex-shrink: 0; }

/* ── NUMBERS ── */
#numbers { background: var(--bg2); }

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.number-card {
  background: var(--bg2);
  padding: 2rem 1.2rem;
  text-align: center;
  transition: background 0.2s;
}
.number-card:hover { background: var(--surface); }

.number-val {
  font-family: var(--serif);
  font-size: 2.5rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
  display: block;
}

.number-label {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
  display: block;
}

/* ── STORY ── */
#story { background: var(--bg3); }

.story-body {
  max-width: 760px;
}

.story-body p {
  font-size: 1.01rem;
  color: var(--muted);
  line-height: 1.84;
  margin-bottom: 1.5rem;
}
.story-body p:last-child { margin-bottom: 0; }

/* ── EXPERIENCE / TIMELINE ── */
#experience { background: var(--bg); }

.timeline-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.tl-btn {
  padding: 0.46rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  transition: all 0.18s;
  white-space: nowrap;
}
.tl-btn:hover,
.tl-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(232,200,124,0.07);
}

.timeline-list {
  position: relative;
  padding-left: 2rem;
}
.timeline-list::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--accent2) 0%, var(--border) 65%, transparent 100%);
}

.tl-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  padding: 2.4rem 0;
  border-bottom: 1px solid rgba(42,66,80,0.26);
  position: relative;
  opacity: 0;
  animation: fadeUp 0.48s ease forwards;
  animation-play-state: paused;
}
.tl-item:last-child { border-bottom: none; }

.tl-item::before {
  content: '';
  position: absolute;
  left: -2.38rem;
  top: 2.7rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent2);
}
.tl-item.highlight::before {
  background: var(--accent);
  border-color: var(--accent);
}

@keyframes fadeUp {
  from { opacity:0; transform:translateY(16px); }
  to   { opacity:1; transform:none; }
}

.tl-meta { padding-top: 0.2rem; }

.tl-period {
  font-size: 0.74rem;
  color: var(--accent2);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  line-height: 1.4;
}

.tl-company {
  font-size: 0.8rem;
  color: var(--dim);
  line-height: 1.4;
}

.tl-company-sub {
  font-size: 0.72rem;
  color: var(--dim);
  display: block;
}

.tl-content { }

.tl-role {
  font-family: var(--serif);
  font-size: 1.18rem;
  color: var(--text);
  margin-bottom: 0.7rem;
  line-height: 1.3;
}

.tl-desc {
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.72;
  margin-bottom: 0.9rem;
}

.tl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  padding: 0.18rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--dim);
  letter-spacing: 0.04em;
}

/* ── CAPABILITIES ── */
#capabilities { background: var(--bg2); }

.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.cap-card {
  background: var(--bg2);
  padding: 2rem;
  transition: background 0.2s;
}
.cap-card:hover { background: var(--surface); }

.cap-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(232,200,124,0.1);
  border: 1px solid rgba(232,200,124,0.17);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.cap-title {
  font-family: var(--serif);
  font-size: 1.06rem;
  margin-bottom: 0.55rem;
  line-height: 1.3;
}

.cap-desc {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.62;
  margin-bottom: 0.8rem;
}

.cap-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cap-list li {
  font-size: 0.78rem;
  color: var(--dim);
  padding-left: 1.2rem;
  position: relative;
}
.cap-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent2);
}

/* ── PHILOSOPHY ── */
#philosophy { background: var(--bg3); }

.phil-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.phil-quote {
  font-family: var(--serif);
  font-size: 1.42rem;
  line-height: 1.46;
  color: var(--text);
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin-bottom: 1.8rem;
  font-style: italic;
}

.phil-body {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.82;
  margin-bottom: 1rem;
}
.phil-body:last-child { margin-bottom: 0; }

.principles {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.principle {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  padding: 1.15rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.principle:hover { border-color: var(--accent2); }

.principle-num {
  font-family: var(--serif);
  font-size: 1.22rem;
  color: var(--accent);
  min-width: 2rem;
  line-height: 1;
  padding-top: 0.12rem;
  flex-shrink: 0;
}

.principle-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.principle-text strong {
  font-size: 0.87rem;
  color: var(--text);
  display: block;
}

.principle-text span {
  font-size: 0.79rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ── PATENTS ── */
#patents { background: var(--bg); }

.patents-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.patent-card {
  display: block;
  padding: 1.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
}
.patent-card:hover { border-color: var(--accent); transform: translateY(-2px); }

/* External link arrow */
.patent-card::after {
  content: '↗';
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  font-size: 0.78rem;
  color: var(--dim);
  transition: color 0.2s;
  line-height: 1;
}
.patent-card:hover::after { color: var(--accent); }

.patent-badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 0.7rem;
}

.patent-title {
  font-family: var(--serif);
  font-size: 0.98rem;
  line-height: 1.4;
  margin-bottom: 0.6rem;
  font-weight: normal;
}

.patent-num {
  font-size: 0.76rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.patent-date {
  font-size: 0.74rem;
  color: var(--dim);
}

/* ── EDUCATION ── */
#education { background: var(--bg2); }

.edu-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.edu-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 1.4rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.edu-item:hover { border-color: var(--accent2); }

.edu-year {
  font-family: var(--serif);
  font-size: 0.87rem;
  color: var(--accent);
  line-height: 1.4;
  padding-top: 0.15rem;
}

.edu-degree {
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}

.edu-school {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.edu-note {
  font-size: 0.74rem;
  color: var(--accent2);
  font-style: italic;
}

/* ── CONTACT ── */
#contact { background: var(--bg3); }

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-intro {
  font-size: 0.97rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 2rem;
  max-width: 480px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}
.contact-link:hover { border-color: var(--accent); background: var(--surface2); }

.contact-link-icon {
  font-size: 1rem;
  color: var(--accent);
  width: 26px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}

.contact-link-icon--li {
  font-weight: 700;
  font-size: 0.85rem;
}

.contact-link-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.contact-link-label {
  font-size: 0.7rem;
  color: var(--dim);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.contact-link-val {
  font-size: 0.87rem;
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.form-field label {
  font-size: 0.73rem;
  color: var(--muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.form-field input,
.form-field textarea,
.form-field select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.7rem 1rem;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.88rem;
  transition: border-color 0.18s;
  outline: none;
  appearance: none;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--accent2);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--dim);
}

.form-field textarea {
  resize: vertical;
  min-height: 100px;
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-field select option { background: var(--bg2); color: var(--text); }

.form-actions { display: flex; align-items: center; }

/* Spinner inside button */
.form-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(11,26,32,0.3);
  border-top-color: #0b1a20;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 0.4rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

.btn--loading .btn-label { opacity: 0.6; }
.btn--loading .form-spinner { display: inline-block; }

.form-feedback {
  font-size: 0.87rem;
  padding: 0.5rem 0;
  margin-top: 0.2rem;
}

.form-success { color: var(--accent2); }
.form-error   { color: #e07070; }

/* CV downloads */
.cv-downloads {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.4rem;
}

.cv-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s;
}
.cv-link:hover { color: var(--accent2); }

.cv-link-icon {
  font-size: 0.85rem;
  line-height: 1;
}

/* ── FOOTER ── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 1.8rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--accent);
}

.footer-copy {
  font-size: 0.77rem;
  color: var(--dim);
}

/* Theme switcher */
.theme-switcher {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.theme-switcher-label {
  font-size: 0.68rem;
  color: var(--dim);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.theme-opts {
  display: flex;
  align-items: center;
}

.theme-opt {
  background: none;
  border: none;
  font-family: var(--sans);
  font-size: 0.73rem;
  color: var(--dim);
  padding: 0.15rem 0.55rem;
  cursor: pointer;
  transition: color 0.2s;
  letter-spacing: 0.02em;
  line-height: 1;
}
.theme-opt:not(:last-child) {
  border-right: 1px solid var(--border);
}
.theme-opt.active,
.theme-opt:hover { color: var(--accent); }

/* ── CORMORANT GARAMOND DISPLAY WEIGHT (Carbon theme) ── */
/* Cormorant renders beautifully at 400 but needs a size bump at display scale */
[data-theme="carbon"] .hero-name {
  font-size: clamp(3.4rem, 6vw, 5.4rem);
  letter-spacing: -0.01em;
}
[data-theme="carbon"] .section-title {
  font-size: clamp(2rem, 3.8vw, 3.1rem);
}
[data-theme="carbon"] .phil-quote {
  font-size: 1.55rem;
}

/* Playfair Display sits slightly smaller optically — compensate */
[data-theme="parchment"] .hero-name {
  font-size: clamp(2.9rem, 5.2vw, 4.6rem);
}

/* Plus Jakarta Sans has tighter line-height at body size */
[data-theme="parchment"] .story-body p,
[data-theme="parchment"] .tl-desc,
[data-theme="parchment"] .cap-desc,
[data-theme="parchment"] .phil-body,
[data-theme="parchment"] .contact-intro {
  line-height: 1.78;
}

/* Space Grotesk needs slightly looser tracking for body copy */
[data-theme="midnight"] body {
  letter-spacing: 0.008em;
}
[data-theme="midnight"] .section-label,
[data-theme="midnight"] .tl-period,
[data-theme="midnight"] .patent-badge,
[data-theme="midnight"] .edu-note,
[data-theme="midnight"] .contact-link-label {
  letter-spacing: 0.12em;
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  .tl-item { opacity: 1 !important; animation-play-state: running !important; }
  .hero-avatar-ring { animation: none; }
  .dot-pulse { animation: none; }
}

/* ── RESPONSIVE ── */

/* 1100px: Numbers collapse to 3 cols */
@media (max-width: 1100px) {
  .numbers-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 900px: Collapse two-column layouts */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  section { padding: 4.5rem 1.5rem; }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 8rem 0 4rem;
    gap: 3rem;
  }
  .hero-orbit-outer { width: 280px; height: 280px; }
  .orbit-chip { display: none; }
  .hero-avatar { width: 240px; height: 240px; }
  .hero-avatar-ring { width: 268px; height: 268px; }

  .cap-grid { grid-template-columns: 1fr 1fr; }
  .phil-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .patents-grid { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 3rem; }

  .timeline-list { padding-left: 0; }
  .timeline-list::before { display: none; }
  .tl-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1.8rem 0;
  }
  .tl-item::before { display: none; }

  footer { flex-direction: column; text-align: center; align-items: center; }
  .theme-switcher { justify-content: center; }
}

/* 600px: Single column everything */
@media (max-width: 600px) {
  nav { padding: 0.9rem 1.2rem; }
  section { padding: 4rem 1.2rem; }
  .cap-grid { grid-template-columns: 1fr; }
  .numbers-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .hero-orbit-outer { width: 220px; height: 220px; }
  .hero-avatar { width: 200px; height: 200px; }
  .hero-avatar-ring { width: 228px; height: 228px; }
  .hero-name { font-size: clamp(2.6rem, 10vw, 3.5rem); }
}

/* 380px: Very small screens */
@media (max-width: 380px) {
  .numbers-grid { grid-template-columns: 1fr; }
  footer { padding: 1.5rem 1.2rem; }
}
