:root {
  --navy: #0d1b2a;
  --navy-mid: #16283d;
  --blue: #1c4f82;
  --accent: #3b82c4;
  --accent-bright: #4fa3e3;
  --white: #ffffff;
  --off-white: #f7f8fa;
  --text-main: #1a1f2e;
  --text-sub: #4a5568;
  --border: #dde3ec;
  --shadow: 0 18px 50px rgba(13,27,42,0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'DM Sans', sans-serif; color: var(--text-main); background: var(--white); line-height: 1.6; overflow-x: hidden; }
a { color: inherit; }
button { font: inherit; }
.skip-link { position:absolute; left:-999px; top: 1rem; background: var(--navy); color: white; padding: .7rem 1rem; z-index: 9999; }
.skip-link:focus { left: 1rem; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 96px 0; }
.section--tinted { background: var(--off-white); }
.label { display: inline-block; color: var(--accent); font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 700; margin-bottom: .8rem; }
.section-title, h1, h2 { font-family: 'Libre Baskerville', serif; color: var(--navy); line-height: 1.14; letter-spacing: -0.02em; }
.section-title { font-size: clamp(2rem, 4vw, 2.8rem); }
.section-intro { max-width: 620px; color: var(--text-sub); font-weight: 300; margin-top: .9rem; font-size: 1.03rem; }
.divider { width: 48px; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-bright)); margin: 1.35rem 0; border-radius: 999px; }

.site-header { position: fixed; inset: 0 0 auto 0; height: 68px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--border); backdrop-filter: blur(14px); z-index: 1000; display: flex; align-items: center; justify-content: space-between; padding: 0 2rem; transition: box-shadow .25s ease; }
.site-header.scrolled { box-shadow: 0 8px 30px rgba(13,27,42,.08); }
.nav-logo { font-family: 'Libre Baskerville', serif; font-weight: 700; text-decoration: none; color: var(--navy); }
.nav-logo span { color: var(--accent); }
.nav-links { list-style: none; display: flex; align-items: center; gap: 2rem; }
.nav-links a { text-decoration: none; color: var(--text-sub); font-size: .88rem; font-weight: 600; }
.nav-links a:hover { color: var(--accent); }
.nav-cta { background: var(--navy); color: white !important; padding: .55rem 1.15rem; border-radius: 6px; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; }
.hamburger span { width: 25px; height: 2px; background: var(--navy); display: block; }
.mobile-nav { display: none; position: fixed; top: 68px; left: 0; right: 0; background: white; z-index: 999; padding: 1rem 2rem; border-bottom: 1px solid var(--border); box-shadow: 0 18px 40px rgba(13,27,42,.08); }
.mobile-nav.open { display: grid; gap: .8rem; }
.mobile-nav a { text-decoration: none; color: var(--text-sub); font-weight: 600; }

.hero-section { min-height: 100vh; position: relative; display: flex; align-items: center; padding: 110px 0 70px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-bg-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(28,79,130,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(28,79,130,.04) 1px, transparent 1px); background-size: 58px 58px; }
.hero-bg-shape { position: absolute; top: -120px; right: -150px; width: 650px; height: 650px; background: radial-gradient(circle, rgba(59,130,196,.13), transparent 68%); border-radius: 50%; }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); gap: 3rem; align-items: center; position: relative; }
.hero-tag { display: inline-flex; background: rgba(59,130,196,.09); border: 1px solid rgba(59,130,196,.2); color: var(--accent); padding: .35rem .9rem; border-radius: 999px; font-weight: 700; font-size: .8rem; margin-bottom: 1.7rem; }
h1 { font-size: clamp(3rem, 7vw, 5.3rem); }
.hero-sub { color: var(--accent); font-size: clamp(1.05rem, 2vw, 1.25rem); font-weight: 700; margin-top: .8rem; }
.hero-desc { max-width: 680px; color: var(--text-sub); margin-top: 1.2rem; font-size: 1.08rem; font-weight: 300; line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.2rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 45px; padding: .78rem 1.4rem; border-radius: 7px; text-decoration: none; font-weight: 700; font-size: .9rem; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--navy); color: white; box-shadow: 0 12px 30px rgba(13,27,42,.18); }
.btn-secondary { background: white; color: var(--navy); border: 1px solid var(--border); }
.hero-proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-top: 2rem; list-style: none; }
.hero-proof li { background: white; border: 1px solid var(--border); border-radius: 10px; padding: 1rem; }
.hero-proof strong { display: block; font-family: 'Libre Baskerville', serif; color: var(--navy); font-size: 1.4rem; }
.hero-proof span { color: var(--text-sub); font-size: .82rem; }
.hero-card { background: var(--navy); color: white; border-radius: 14px; padding: 2rem; box-shadow: var(--shadow); }
.hero-card h2 { color: white; font-size: 1.45rem; }
.hero-card p { color: rgba(255,255,255,.68); margin-top: 1rem; font-weight: 300; }
.mini-stack, .skill-tags, .project-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.mini-stack { margin-top: 1.3rem; }
.mini-stack span, .project-tags span { background: rgba(79,163,227,.12); border: 1px solid rgba(79,163,227,.24); color: var(--accent-bright); padding: .28rem .65rem; border-radius: 5px; font-size: .78rem; font-weight: 700; }

.split-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 4rem; align-items: start; }
.text-block p { color: var(--text-sub); font-weight: 300; font-size: 1.04rem; line-height: 1.85; margin-bottom: 1rem; }
.section-heading { max-width: 720px; }
.skills-grid { margin-top: 3rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.skill-category { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; transition: transform .25s ease, box-shadow .25s ease; }
.skill-category:hover, .project-card:hover, .evidence-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.skill-category h3 { color: var(--navy); font-size: 1rem; margin-bottom: 1rem; }
.skill-tags span { background: var(--off-white); border: 1px solid var(--border); border-radius: 5px; color: var(--text-main); padding: .28rem .62rem; font-size: .8rem; }

.projects-header { display: flex; justify-content: space-between; align-items: end; gap: 2rem; flex-wrap: wrap; }
.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
.filter-btn { border: 1px solid var(--border); background: white; color: var(--text-sub); border-radius: 999px; padding: .45rem .9rem; cursor: pointer; font-weight: 700; font-size: .84rem; }
.filter-btn.active, .filter-btn:hover { background: var(--navy); color: white; border-color: var(--navy); }
.projects-grid { margin-top: 2rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.project-card { background: white; border: 1px solid var(--border); border-radius: 14px; padding: 1.6rem; transition: transform .25s ease, box-shadow .25s ease; display: flex; flex-direction: column; min-height: 100%; }
.project-card.hide { display: none; }
.project-topline { display: flex; justify-content: space-between; gap: 1rem; color: var(--accent); text-transform: uppercase; font-size: .68rem; letter-spacing: .12em; font-weight: 800; margin-bottom: 1rem; }
.project-card h3 { font-family: 'Libre Baskerville', serif; color: var(--navy); font-size: 1.24rem; line-height: 1.32; }
.project-card p, .project-bullets { color: var(--text-sub); font-weight: 300; margin-top: .9rem; }
.project-bullets { padding-left: 1.1rem; }
.project-bullets li { margin: .28rem 0; }
.project-tags { margin: 1.1rem 0 1.4rem; }
.btn-ghost { background: none; border: 0; color: var(--navy); font-weight: 800; cursor: pointer; margin-top: auto; padding: .2rem 0; text-align: left; }
.btn-ghost:hover { color: var(--accent); }

.evidence-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 3rem; }
.evidence-card { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; transition: transform .25s ease, box-shadow .25s ease; }
.evidence-card h3 { color: var(--navy); margin-bottom: .45rem; }
.evidence-card p { color: var(--text-sub); font-weight: 300; font-size: .92rem; }
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: stretch; }
.edu-card, .timeline { border-radius: 14px; padding: 2rem; }
.edu-card { background: var(--navy); color: white; }
.edu-card h2 { color: white; font-size: 1.55rem; }
.edu-card p, .edu-card li { color: rgba(255,255,255,.7); font-weight: 300; }
.edu-card ul { margin-top: 1.3rem; padding-left: 1.2rem; }
.timeline { background: var(--off-white); border: 1px solid var(--border); }
.timeline h3 { color: var(--navy); margin-bottom: 1.2rem; }
.timeline-item { border-left: 3px solid var(--accent); padding: 0 0 1.2rem 1rem; }
.timeline-item span { color: var(--accent); text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; font-weight: 800; }
.timeline-item p { color: var(--text-sub); }
.contact-section { background: var(--navy); }
.contact-section .section-title { color: white; }
.contact-section .section-intro { color: rgba(255,255,255,.68); }
.contact-layout { display: grid; grid-template-columns: 1fr .8fr; gap: 2rem; align-items: center; }
.contact-cards { display: grid; gap: .8rem; }
.contact-cards a { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); color: white; text-decoration: none; border-radius: 10px; padding: 1rem 1.1rem; font-weight: 700; }
footer { background: #08131f; color: rgba(255,255,255,.4); text-align: center; padding: 1.5rem; font-size: .84rem; }

.modal { position: fixed; inset: 0; background: rgba(5,13,22,.72); display: none; align-items: center; justify-content: center; padding: 1rem; z-index: 2000; }
.modal.open { display: flex; }
.modal-panel { background: white; border-radius: 16px; width: min(760px, 100%); max-height: 88vh; overflow-y: auto; padding: 2rem; position: relative; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.modal-close { position: absolute; top: 1rem; right: 1rem; width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--border); background: white; cursor: pointer; font-size: 1.4rem; }
.modal-panel h2 { font-size: 1.7rem; margin-bottom: 1rem; padding-right: 2rem; }
.modal-panel h3 { margin: 1.2rem 0 .35rem; color: var(--navy); }
.modal-panel p, .modal-panel li { color: var(--text-sub); font-weight: 300; }
.modal-panel ul { padding-left: 1.15rem; }

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

@media (max-width: 960px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero-layout, .split-grid, .edu-grid, .contact-layout { grid-template-columns: 1fr; }
  .skills-grid, .evidence-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 650px) {
  .container { padding: 0 1.2rem; }
  .section { padding: 72px 0; }
  .hero-proof, .skills-grid, .projects-grid, .evidence-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .site-header { padding: 0 1.2rem; }
}

.modal-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.modal-actions .btn { text-align: center; }
@media (max-width: 560px) { .modal-actions .btn { width: 100%; justify-content: center; } }
