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

:root {
  --bg:        #1e2025;
  --surface:   #2c3038;
  --surface2:  #333740;
  --border:    #3a3f4a;
  --accent:    #4a9eff;
  --accent2:   #7bbfff;
  --text:      #e8eaed;
  --muted:     #9aa0ac;   /* lightened from #8b929e for better contrast */
  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;
}

html {
  scroll-behavior: smooth;
  /* Offset anchor scroll targets so fixed nav doesn't cover them */
  scroll-padding-top: 80px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── SKIP LINK (screen readers & keyboard users) ── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--accent);
  color: #000;
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 3px;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ── FOCUS STYLES ──
   Visible for keyboard navigation, hidden for mouse users */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
/* Remove default outline only when :focus-visible is supported */
:focus:not(:focus-visible) { outline: none; }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.2rem 4rem;
  background: rgba(30,32,37,0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  white-space: nowrap;
  text-decoration: none;
}
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--accent); }

/* ── HAMBURGER BUTTON ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.2s;
  z-index: 201;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.nav-hamburger:hover,
.nav-hamburger:focus-visible { border-color: var(--accent); outline-color: var(--accent); }

.nav-hamburger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.2s;
  transform-origin: center;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-hamburger[aria-expanded="true"] span { background: var(--accent); }

/* ── MOBILE DRAWER ── */
.nav-drawer {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(30,32,37,0.98);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 5rem 2rem 2.5rem;
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
  visibility: hidden;
}
.nav-drawer.open { transform: translateY(0); visibility: visible; }
.nav-drawer ul { list-style: none; display: flex; flex-direction: column; gap: 0; }
.nav-drawer ul li { border-bottom: 1px solid var(--border); }
.nav-drawer ul li:first-child { border-top: 1px solid var(--border); }
.nav-drawer ul a {
  display: block;
  padding: 1.1rem 0.5rem;
  text-decoration: none;
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: color 0.2s, padding-left 0.2s;
}
.nav-drawer ul a:hover,
.nav-drawer ul a:focus-visible { color: var(--accent); padding-left: 1rem; }

.nav-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}
.nav-overlay.open { opacity: 1; visibility: visible; }

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 8rem 4rem 4rem;
  position: relative;
  overflow: hidden;
}
#hero::after {
  content: '';
  position: absolute; top: -20%; right: -10%;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(74,158,255,0.07) 0%, transparent 70%);
  pointer-events: none; /* decorative element */
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  width: 100%; max-width: 1200px;
  margin: auto;           /* auto top/bottom centers within flex parent */
  align-items: center;
}
.hero-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: 0.8rem;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 2rem; height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7vw, 8rem);
  line-height: 0.92;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}
.hero-name .line2 { color: var(--accent); }
.hero-tagline {
  font-size: 1rem;
  color: var(--muted);
  max-width: 420px;
  margin-bottom: 2.5rem;
  line-height: 1.75;
}
.hero-cta {
  display: inline-flex; align-items: center; gap: 0.8rem;
  background: var(--accent); color: #000;
  text-decoration: none;
  font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 1rem 2rem; border-radius: 3px;
  touch-action: manipulation;
  transition: background 0.2s, transform 0.2s;
}
.hero-cta:hover,
.hero-cta:focus-visible { background: var(--accent2); transform: translateY(-2px); }

.hero-visual {
  display: flex; flex-direction: column; align-items: flex-end;
  overflow: hidden;
}

/* Hero stat block — three stacked stats with dividers */
.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid var(--border);
  padding-left: 2rem;
  margin-top: 1rem;
}
.hero-stat-item {
  padding: 1.2rem 0;
}
.hero-stat-divider {
  height: 1px;
  background: var(--border);
  width: 100%;
}
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 3.2rem;
  line-height: 1;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 0.3rem;
}
.hero-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

/* ── SHARED ── */
.section-wrap { padding: 6rem 4rem; max-width: 1200px; margin: 0 auto; }
.full-border { border-top: 1px solid var(--border); }
.section-label {
  font-size: 0.72rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 0.6rem;
}
.section-subtitle {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: -2rem;
  margin-bottom: 2.5rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1; margin-bottom: 3rem;
}

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 5rem; align-items: start;
}
.about-text { font-size: 1rem; line-height: 1.85; color: #c8cdd5; } /* lightened for contrast */
.about-text strong { color: var(--text); font-weight: 600; }
.about-text p + p { margin-top: 1.5rem; }

.about-facts { display: flex; flex-direction: column; gap: 1.2rem; }
.fact-row {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}
.fact-label {
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--muted);
  white-space: nowrap; padding-top: 0.15rem;
  flex-shrink: 0;
}
.fact-value {
  font-weight: 600; font-size: 0.88rem;
  text-align: right; line-height: 1.4;
}

/* ── TIMELINE ── */
.timeline-hint {
  font-size: 0.82rem; color: var(--muted);
  margin-bottom: 2rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.timeline-hint::before {
  content: '';
  display: inline-block;
  width: 1rem; height: 1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a9eff' stroke-width='2'%3E%3Cpath d='M8 9l-5 3 5 3M16 9l5 3-5 3'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

.tl-bar-wrap {
  position: relative;
  height: 110px;
  margin-bottom: 0.5rem;
  user-select: none;
}
.tl-track {
  position: absolute; left: 0; right: 0;
  top: 52px; height: 4px;
  background: var(--border); border-radius: 2px;
}
.tl-year-row {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: 0.65rem; color: var(--muted); letter-spacing: 0.04em;
}
.tl-year-tick { position: absolute; transform: translateX(-50%); }

/* Segments — keyboard focusable via tabindex, touch-action for mobile */
.tl-seg {
  position: absolute;
  top: 42px; height: 24px;
  border-radius: 12px; cursor: pointer;
  touch-action: manipulation; /* prevents 300ms tap delay on mobile */
  -webkit-tap-highlight-color: transparent; /* removes tap flash on iOS */
  transition: height 0.25s ease, top 0.25s ease, opacity 0.2s, box-shadow 0.25s;
  opacity: 0.5;
}
.tl-seg:hover, .tl-seg.active,
.tl-seg:focus-visible {
  opacity: 1; height: 30px; top: 39px;
  box-shadow: 0 0 20px rgba(74,158,255,0.35);
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.tl-seg-label {
  position: absolute; top: -24px; left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem; letter-spacing: 0.06em;
  text-transform: uppercase; white-space: nowrap;
  color: var(--muted); transition: color 0.2s;
  pointer-events: none;
}
.tl-seg:hover .tl-seg-label,
.tl-seg.active .tl-seg-label,
.tl-seg:focus-visible .tl-seg-label { color: var(--accent2); }

.tl-dot {
  position: absolute; left: 0; top: 50%;
  transform: translate(-50%, -50%);
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2px solid currentColor;
  transition: transform 0.2s;
}
.tl-seg:hover .tl-dot,
.tl-seg.active .tl-dot,
.tl-seg:focus-visible .tl-dot { transform: translate(-50%, -50%) scale(1.5); }

/* Detail card */
.tl-detail-wrap { position: relative; margin-top: 1.5rem; }

.tl-card {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 2rem 2.5rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
/* cards shown/hidden via JS inline styles */
.tl-card-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: start;
}
.tl-card-date {
  font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 0.4rem;
}
.tl-card-company {
  font-family: var(--font-display);
  font-size: 2.2rem; letter-spacing: 0.04em;
  line-height: 1; margin-bottom: 0.3rem;
}
.tl-card-role {
  font-size: 0.78rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 1rem;
}
.tl-card-desc {
  font-size: 0.95rem; color: #c0c8d4; /* lightened for contrast */
  line-height: 1.75;
}
.tl-card-highlights {
  display: flex; flex-direction: column;
  gap: 0.6rem; min-width: 200px; max-width: 220px;
}
.tl-highlight {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.5rem 0.9rem;
  font-size: 0.78rem; color: var(--accent2);
  white-space: normal; line-height: 1.4;
  word-break: break-word;
}

/* Nav dots */
.tl-nav {
  display: flex; gap: 0.6rem;
  margin-top: 1.5rem; align-items: center;
}
/* Dot buttons — proper button element for keyboard access */
.tl-nav-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--border);
  border: none; cursor: pointer;
  /* 44px minimum tap target via padding (WCAG 2.5.5) */
  padding: 16px;
  margin: -16px;
  transition: background 0.2s, transform 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.tl-nav-dot:hover,
.tl-nav-dot:focus-visible {
  background: var(--accent2);
  transform: scale(1.3);
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.tl-nav-dot.active { background: var(--accent); transform: scale(1.3); }


/* ── SKILLS ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.skill-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 1.6rem;
  transition: border-color 0.3s, transform 0.3s;
}
.skill-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.skill-category {
  font-size: 0.65rem; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 0.6rem;
}
.skill-name {
  font-family: var(--font-display);
  font-size: 1.5rem; letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}
.skill-desc { font-size: 0.83rem; color: var(--muted); line-height: 1.5; }

/* ── CONTACT ── */
#contact { text-align: center; }
.contact-big {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 1; margin-bottom: 1.2rem;
}
.contact-big span { color: var(--accent); }
.contact-sub {
  color: var(--muted); font-size: 1rem;
  margin-bottom: 2.5rem; max-width: 460px;
  margin-left: auto; margin-right: auto; line-height: 1.7;
}
.contact-links { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.contact-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  text-decoration: none; border: 1px solid var(--border);
  color: var(--text); padding: 0.85rem 1.7rem; border-radius: 4px;
  font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  touch-action: manipulation;
  transition: border-color 0.2s, color 0.2s;
}
.contact-link:hover,
.contact-link:focus-visible { border-color: var(--accent); color: var(--accent); }
.contact-link.primary {
  background: var(--accent); color: #000;
  border-color: var(--accent); font-weight: 600;
}
.contact-link.primary:hover,
.contact-link.primary:focus-visible { background: var(--accent2); border-color: var(--accent2); color: #000; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 4rem;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.75rem; color: var(--muted);
}

/* ── REDUCED MOTION ──
   Respects users who have turned off animations in OS settings */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .fade-up { opacity: 1; transform: none; }
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { opacity: 0; animation: fadeUp 0.75s ease forwards; }
.d1 { animation-delay: 0.1s; }
.d2 { animation-delay: 0.25s; }
.d3 { animation-delay: 0.4s; }
.d4 { animation-delay: 0.55s; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .section-wrap { padding: 5rem 2.5rem; }
  nav { padding: 1.2rem 2.5rem; }
  #hero { padding: 7rem 2.5rem 4rem; }
  .about-grid { gap: 3rem; }
  .tl-card-highlights { min-width: 160px; max-width: 180px; }
  /* Stats block gets tight on tablet — scale it down gracefully */
  .hero-stats { padding-left: 1.5rem; }
  .hero-stat-num { font-size: 2.4rem; }
  .hero-stat-item { padding: 0.9rem 0; }
}
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }          /* desktop links hidden */
  .nav-hamburger { display: flex; }      /* hamburger shown */
  #hero { padding: 6rem 1.5rem 3rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 0; }
  .hero-visual { display: none; }
  .section-wrap { padding: 3.5rem 1.5rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .fact-value { text-align: left; }
  .tl-card { padding: 1.5rem; }
  .tl-card-inner { grid-template-columns: 1fr; gap: 1.2rem; }
  .tl-card-highlights { flex-direction: row; flex-wrap: wrap; min-width: 0; max-width: 100%; gap: 0.5rem; }
  .tl-highlight { font-size: 0.75rem; }
  .tl-seg-label { font-size: 0.55rem; }
  .skills-grid { grid-template-columns: 1fr 1fr; gap: 0.8rem; }
  footer { flex-direction: column; gap: 1rem; text-align: center; padding: 1.5rem; }
}
@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
  .tl-bar-wrap { height: 90px; }
  .tl-track { top: 42px; }
  .tl-seg { top: 32px; }
  .tl-seg:hover, .tl-seg.active { top: 29px; }
}
/* ── HEADSHOT ── */
.hero-headshot {
  width: 160px; height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 6px rgba(74,158,255,0.12), 0 8px 32px rgba(0,0,0,0.4);
  display: block;
  margin-bottom: 2rem;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .hero-headshot { width: 120px; height: 120px; }
}

/* ── FAQ ── */
.faq-list { display: flex; flex-direction: column; gap: 0; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-question {
  width: 100%; display: flex; justify-content: space-between;
  align-items: center; gap: 1rem;
  background: none; border: none; cursor: pointer;
  padding: 1.4rem 0; text-align: left;
  color: var(--text); font-family: var(--font-body);
  font-size: 1rem; font-weight: 600; line-height: 1.4;
  transition: color 0.2s;
}
.faq-question:hover { color: var(--accent); }
.faq-question[aria-expanded="true"] { color: var(--accent); }
.faq-icon {
  font-size: 1.4rem; font-weight: 300; color: var(--accent);
  flex-shrink: 0; transition: transform 0.25s ease;
  line-height: 1;
}
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease, padding 0.25s ease;
  padding-bottom: 0;
}
.faq-answer:not([hidden]) {
  max-height: 400px;
  padding-bottom: 1.4rem;
}
.faq-answer[hidden] { display: block !important; }
.faq-answer p {
  font-size: 0.95rem; color: #a0a8b4; line-height: 1.85;
  list-style: none;
}
@media (max-width: 768px) {
  .faq-question { font-size: 0.9rem; }
}

/* ── SCREEN-READER ONLY UTILITY ── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
