:root {
  --text: #1d1d1f;
  --muted: #6e6e73;
  --band: #f5f5f7;
  --blue: #0071e3;
  --blue-dark: #0077ed;
  --navy: #14304d;
  --border: #d2d2d7;
  --card: #ffffff;
  --bg: #ffffff;
  --nav-bg: rgba(251, 251, 253, 0.8);
  --nav-bg-scrolled: rgba(251, 251, 253, 0.94);
  --ticker-bg: #fbfbfd;
  --soft-text: #424245;
  --pill-bg: rgba(245, 245, 247, 0.9);
  --pill-border: #e8e8ed;
  --hover-bg: #e8e8ed;
  --feature-tint: #eef6ff;
  --radius: 18px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

:root[data-theme="dark"] {
  --text: #f2f4f7;
  --muted: #a7b0ba;
  --band: #141a23;
  --blue: #4da3ff;
  --blue-dark: #6db4ff;
  --navy: #14304d;
  --border: #2a3340;
  --card: #171e29;
  --bg: #0d1117;
  --nav-bg: rgba(13, 17, 23, 0.8);
  --nav-bg-scrolled: rgba(13, 17, 23, 0.94);
  --ticker-bg: #10161e;
  --soft-text: #c8cfd8;
  --pill-bg: rgba(23, 30, 41, 0.9);
  --pill-border: #2a3340;
  --hover-bg: #232b38;
  --feature-tint: #1a2a3d;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  line-height: 1.55;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.wrap { max-width: 980px; margin: 0 auto; padding: 0 22px; }

a { color: var(--blue); }
a:focus-visible, .btn:focus-visible { outline: 3px solid rgba(0, 113, 227, 0.45); outline-offset: 3px; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--text);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  z-index: 60;
}
.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blue), #64b5f6);
  transition: width 0.1s linear;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
.nav.scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08); background: var(--nav-bg-scrolled); }
.nav-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 22px;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo { font-weight: 700; color: var(--text); text-decoration: none; font-size: 1rem; letter-spacing: -0.01em; white-space: nowrap; }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { color: var(--text); text-decoration: none; font-size: 0.9rem; opacity: 0.85; }
.nav-links a:hover, .nav-links a.active { color: var(--blue); opacity: 1; }
.nav-cta {
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 7px 14px;
  border-radius: 980px;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--blue-dark); }
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 980px;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  padding: 7px 14px;
  white-space: nowrap;
  cursor: pointer;
}
.theme-toggle:hover { background: var(--hover-bg); }

.hero { position: relative; padding: 88px 0 64px; background: var(--bg); overflow: hidden; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.45;
  pointer-events: none;
  animation: blob-drift 14s ease-in-out infinite alternate;
}
.blob-1 { width: 420px; height: 420px; background: #a8d0f5; top: -120px; right: -80px; }
.blob-2 { width: 360px; height: 360px; background: #d6e8fa; bottom: -160px; left: -100px; animation-delay: 3s; }
@keyframes blob-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-24px, 28px) scale(1.08); } }

.hero-split {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
  text-align: left;
}
.hero-text { max-width: 600px; }
.eyebrow {
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 12px;
  font-size: 1rem;
}
.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(3rem, 8vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--text);
}
.hero-sub {
  margin: 0 0 28px;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  line-height: 1.5;
  color: var(--muted);
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 22px; }
.hero-split .hero-ctas { justify-content: flex-start; }
.btn {
  display: inline-block;
  text-decoration: none;
  border-radius: 980px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 500;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(0, 113, 227, 0.25); }
.btn-primary:hover { background: var(--blue-dark); box-shadow: 0 10px 26px rgba(0, 113, 227, 0.32); }
.btn-ghost { background: var(--band); color: var(--blue); }
.btn-ghost:hover { background: var(--hover-bg); }
.hero-meta { color: var(--muted); margin: 0 0 16px; }
.hero-pills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.hero-pills li {
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  border-radius: 980px;
  padding: 7px 13px;
  font-size: 0.88rem;
  color: var(--soft-text);
  backdrop-filter: blur(8px);
}

.photo-card { position: relative; margin: 0; perspective: 900px; }
.photo-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  background: linear-gradient(150deg, #0b2340 0%, var(--navy) 45%, #1f6fb8 100%);
  box-shadow: 0 24px 60px rgba(20, 48, 77, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  overflow: hidden;
  transition: transform 0.3s ease;
  will-change: transform;
}
.photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.28), transparent 45%);
}
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-card figcaption { margin-top: 14px; color: var(--muted); font-size: 0.92rem; text-align: center; }

.scroll-hint { color: var(--muted); font-size: 0.9rem; margin: 36px 0 0; text-align: center; }
.scroll-hint span { display: inline-block; animation: hint-bounce 2s ease-in-out infinite; }
@keyframes hint-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

.ticker {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--ticker-bg);
  padding: 14px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 64s linear infinite;
  font-weight: 600;
  color: var(--soft-text);
  white-space: nowrap;
  will-change: transform;
}
.ticker-track span { padding-right: 36px; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.section { padding: 84px 0; }
.band { background: var(--band); }
.dark-band { background: #0b1f33; color: #fff; }
.dark-band h2 { color: #fff; }
.dark-band .section-intro { color: #b9c9da; }
.section h2 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-align: center;
}
.section-intro {
  text-align: center;
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto 40px;
  font-size: 1.1rem;
}

.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-tile {
  background: var(--band);
  border-radius: 24px;
  padding: 28px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stat-num { margin: 0 0 8px; font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; color: var(--blue); }
.stat-tile p:last-child { margin: 0; color: var(--soft-text); }

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.cert-card {
  background: var(--card);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.cert-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(0, 113, 227, 0.35); }
.cert-feature { grid-column: span 2; background: linear-gradient(135deg, var(--feature-tint), var(--card)); border-color: rgba(0, 113, 227, 0.25); }
.cert-card h3 { margin: 0 0 6px; font-size: 1.02rem; line-height: 1.35; letter-spacing: -0.01em; }
.cert-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.job {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.job:first-of-type { border-top: 0; padding-top: 8px; }
.job h3 { margin: 0 0 8px; font-size: 1.3rem; letter-spacing: -0.015em; }
.role { color: var(--muted); margin: 0 0 8px; }
.role strong { color: var(--text); }
.job ul { margin: 8px 0 18px; padding-left: 20px; }
.job li { margin-bottom: 6px; max-width: 820px; }

.project {
  background: var(--card);
  color: var(--text);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.project-feature {
  background: linear-gradient(135deg, #0b2340 0%, var(--navy) 55%, #1b4a73 100%);
  color: #fff;
  margin-bottom: 20px;
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.project-feature .project-meta { color: #cfe0ee; }
.project-feature li { color: #eef3f8; }
.project-eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.project-feature .project-eyebrow { color: #8ec2f5; }
.project h3 { margin: 0 0 6px; font-size: 1.55rem; letter-spacing: -0.02em; line-height: 1.2; }
.project-meta { color: var(--muted); margin: 0 0 14px; }
.project ul { margin: 0; padding-left: 20px; }
.project li { margin-bottom: 7px; }
.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.project-grid .project { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.12); color: #fff; backdrop-filter: blur(10px); }
.project-grid .project-meta { color: #b9c9da; }
.project-grid .project h3 { font-size: 1.3rem; }
.project-link { display: inline-block; margin-top: 14px; color: #9ec8f5; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.project-link:hover, .project-link:focus-visible { color: #fff; }

.skill-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 36px;
}
.skill-card {
  background: var(--band);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.skill-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.skill-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.skill-card p { margin: 0; color: var(--soft-text); }
.education { border-top: 1px solid var(--border); padding-top: 24px; }
.education h3 { margin: 0 0 8px; }
.education p { margin: 0; color: var(--muted); }

.contact { background: var(--band); text-align: center; }
.contact-inner { max-width: 680px; }
.contact .hero-ctas { justify-content: center; }
.contact h2 { margin-bottom: 12px; }
.contact p { color: var(--muted); font-size: 1.1rem; margin: 0 0 28px; }

footer { padding: 28px 0 36px; background: var(--bg); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.footer-inner p { margin: 0; }

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 860px) {
  .hero-split { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .hero-text { margin: 0 auto; }
  .hero-split .hero-ctas, .hero-pills { justify-content: center; }
  .photo-card { max-width: 420px; margin: 0 auto; width: 100%; }
  .about-grid { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .cert-feature { grid-column: span 2; }
  .project-grid, .skill-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .hero { padding: 72px 0 56px; }
}
@media (max-width: 620px) {
  .nav-links { display: none; }
  .nav-inner { gap: 16px; }
  .nav-cta { margin-left: auto; }
  .cert-grid { grid-template-columns: 1fr; }
  .cert-feature { grid-column: span 1; }
  .project, .project-feature { padding: 26px; }
  .footer-inner { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint span, .blob, .ticker-track { animation: none; }
  .btn, .cert-card, .project, .stat-tile, .skill-card, .photo-frame { transition: none; }
}
@media print {
  :root, :root[data-theme="dark"] {
    --text: #1d1d1f;
    --muted: #6e6e73;
    --band: #f5f5f7;
    --card: #ffffff;
    --bg: #ffffff;
    --border: #d2d2d7;
    --soft-text: #424245;
  }
  .nav, .progress, .scroll-hint, .hero-ctas, .blob, .ticker { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .section, .hero { padding: 24px 0; }
  body { background: #fff; }
}
