:root {
  --navy: #0b2c3d;
  --navy-soft: #163f52;
  --teal: #00a896;
  --teal-dark: #007f73;
  --gold: #f4b942;
  --ink: #17252d;
  --muted: #61737d;
  --surface: #ffffff;
  --surface-soft: #f2f7f6;
  --line: #dce8e5;
  --shadow: 0 20px 60px rgba(8, 44, 61, .11);
  --radius: 1.25rem;
}

[data-bs-theme="dark"] {
  --ink: #e9f2f1;
  --muted: #a8bab9;
  --surface: #102b37;
  --surface-soft: #0a222d;
  --line: #244653;
  --shadow: 0 20px 60px rgba(0, 0, 0, .26);
}

html { scroll-behavior: smooth; scroll-padding-top: 84px; overflow-x: hidden; }
body { font-family: "DM Sans", sans-serif; color: var(--ink); background: var(--surface); line-height: 1.7; overflow-x: hidden; }
h1, h2, h3, .navbar-brand { font-family: "Manrope", sans-serif; }
a { color: var(--teal-dark); }
[data-bs-theme="dark"] a { color: #63d8cd; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 2000; padding: .75rem 1rem; background: var(--gold); color: #111; border-radius: .5rem; font-weight: 700; }
.skip-link:focus { top: 1rem; }

.navbar { padding: 1rem 0; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(16px); border-bottom: 1px solid transparent; transition: .25s ease; }
.navbar.scrolled { padding: .65rem 0; border-color: var(--line); box-shadow: 0 8px 28px rgba(8, 44, 61, .06); }
.navbar-brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); font-weight: 800; font-size: 1rem; }
.brand-mark { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border-radius: .7rem; background: var(--navy); color: white; font-size: .82rem; letter-spacing: .06em; }
.nav-link { color: var(--muted); font-weight: 600; font-size: .92rem; }
.nav-link:hover, .nav-link.active { color: var(--teal-dark) !important; }
.icon-btn { width: 2.55rem; height: 2.55rem; display: grid; place-items: center; border: 1px solid var(--line); color: var(--ink); border-radius: 50%; }
.icon-btn:hover { background: var(--surface-soft); color: var(--teal-dark); }

.hero { position: relative; min-height: 760px; display: flex; align-items: center; padding: 9rem 0 6rem; overflow: hidden; background: linear-gradient(135deg, var(--surface-soft) 0%, var(--surface) 68%); }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .35; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 54px 54px; mask-image: linear-gradient(to bottom, black, transparent 82%); }
.hero-orb { position: absolute; border-radius: 50%; filter: blur(3px); opacity: .9; }
.hero-orb-one { width: 360px; height: 360px; right: -120px; top: 90px; background: radial-gradient(circle, rgba(0,168,150,.26), rgba(0,168,150,0) 70%); }
.hero-orb-two { width: 260px; height: 260px; left: -120px; bottom: 20px; background: radial-gradient(circle, rgba(244,185,66,.2), rgba(244,185,66,0) 70%); }
.eyebrow, .section-kicker { margin-bottom: .9rem; color: var(--teal-dark); font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.display-title { font-size: clamp(3.6rem, 8vw, 7.4rem); line-height: .94; letter-spacing: -.07em; font-weight: 800; color: var(--navy); }
[data-bs-theme="dark"] .display-title { color: #eefafa; }
.display-title span { color: transparent; -webkit-text-stroke: 2px var(--teal); }
.hero-lead { max-width: 720px; margin: 2rem 0; font-size: clamp(1.15rem, 2vw, 1.5rem); color: var(--muted); }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.btn { border-radius: .75rem; font-weight: 700; padding: .75rem 1.15rem; }
.btn-primary { --bs-btn-bg: var(--teal-dark); --bs-btn-border-color: var(--teal-dark); --bs-btn-hover-bg: var(--navy); --bs-btn-hover-border-color: var(--navy); }
.btn-outline-primary { --bs-btn-color: var(--navy); --bs-btn-border-color: var(--navy); --bs-btn-hover-bg: var(--navy); --bs-btn-hover-border-color: var(--navy); }
[data-bs-theme="dark"] .btn-outline-primary { --bs-btn-color: #d9f5f1; --bs-btn-border-color: #75cfc6; }
.contact-card { position: relative; background: var(--navy); color: #fff; padding: 2rem; border-radius: 1.75rem; box-shadow: 0 28px 80px rgba(5, 36, 49, .28); transform: rotate(1.5deg); }
.contact-card::after { content: ""; position: absolute; inset: 10px -10px -10px 10px; border: 1px solid rgba(0,168,150,.45); border-radius: inherit; z-index: -1; }
.avatar { width: 5.5rem; height: 5.5rem; display: grid; place-items: center; margin-bottom: 1.3rem; border-radius: 1.35rem; background: linear-gradient(135deg, var(--teal), var(--gold)); color: var(--navy); font: 800 1.65rem "Manrope", sans-serif; }
.availability { display: flex; align-items: center; gap: .55rem; color: #b9d9d6; font-size: .87rem; }
.availability span { width: .58rem; height: .58rem; border-radius: 50%; background: #65e6a5; box-shadow: 0 0 0 5px rgba(101,230,165,.12); }
.contact-list { display: grid; gap: .9rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.13); }
.contact-list li { display: flex; align-items: flex-start; gap: .8rem; }
.contact-list i { color: var(--gold); }
.contact-list a { color: #fff; text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--gold); }

.section-pad { padding: 7rem 0; }
.section-tint { background: var(--surface-soft); }
.section-title { font-size: clamp(2.15rem, 4vw, 3.5rem); line-height: 1.08; letter-spacing: -.04em; font-weight: 800; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 3rem; }
.section-heading > p { max-width: 440px; margin: 0 0 .5rem; color: var(--muted); }
.profile-copy { font-size: 1.11rem; }
.profile-copy > p:first-child { font-size: 1.42rem; line-height: 1.55; color: var(--ink); }
.profile-copy p { color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-top: 2rem; }
.stat { padding: 1rem .65rem; border-top: 2px solid var(--teal); }
.stat strong { display: block; font: 800 1.7rem "Manrope", sans-serif; color: var(--navy); }
[data-bs-theme="dark"] .stat strong { color: #fff; }
.stat span { color: var(--muted); font-size: .78rem; line-height: 1.25; display: block; }
.focus-callout { display: flex; gap: 1rem; margin-top: 2rem; padding: 1.25rem; border-left: 4px solid var(--gold); border-radius: 0 .9rem .9rem 0; background: var(--surface-soft); }
.focus-callout i { color: var(--teal-dark); font-size: 1.4rem; }
.focus-callout p { margin: 0; }

.brand-showcase { padding: 0 0 7rem; }
.brand-banner { position: relative; overflow: hidden; margin: 0; border: 1px solid rgba(0,168,150,.24); border-radius: 1.5rem; background: var(--navy); box-shadow: var(--shadow); }
.brand-banner::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); pointer-events: none; }
.brand-banner img { display: block; width: 100%; height: auto; }

.projects-section { background: var(--surface); }
.project-card { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.project-card:hover { transform: translateY(-7px); border-color: rgba(0,168,150,.48); box-shadow: var(--shadow); }
.project-number { position: absolute; top: 1rem; right: 1.25rem; color: color-mix(in srgb, var(--muted) 24%, transparent); font: 800 3.2rem "Manrope", sans-serif; line-height: 1; }
.project-icon { width: 3.2rem; height: 3.2rem; display: grid; place-items: center; margin-bottom: 1.5rem; border-radius: .9rem; background: var(--navy); color: var(--gold); font-size: 1.35rem; }
.project-type { margin-bottom: .55rem; color: var(--teal-dark); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.project-card h3 { font-size: 1.35rem; font-weight: 800; }
.project-card > p:not(.project-type) { color: var(--muted); }
.project-stack { display: flex; flex-wrap: wrap; gap: .45rem; margin: auto 0 1.35rem; padding: 1rem 0 0; list-style: none; }
.project-stack li { padding: .3rem .58rem; border: 1px solid var(--line); border-radius: 2rem; color: var(--muted); font-size: .74rem; font-weight: 700; }
.project-card a { color: var(--teal-dark); font-weight: 800; text-decoration: none; }
.project-card a:hover { text-decoration: underline; }
.project-links { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }

.skill-card { padding: 1.8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.skill-card:hover { transform: translateY(-7px); border-color: rgba(0,168,150,.45); box-shadow: var(--shadow); }
.skill-icon { width: 3rem; height: 3rem; display: grid; place-items: center; margin-bottom: 1.4rem; border-radius: .85rem; background: rgba(0,168,150,.12); color: var(--teal-dark); font-size: 1.3rem; }
.skill-card h3 { font-size: 1.18rem; font-weight: 800; }
.skill-card p { color: var(--muted); }
.skill-tag { display: inline-block; padding: .35rem .65rem; border-radius: 2rem; background: var(--surface-soft); color: var(--teal-dark); font-size: .76rem; font-weight: 700; }
.languages { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 2rem; margin-top: 2rem; padding: 1.2rem 1.5rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); }
.languages span { font-weight: 800; color: var(--teal-dark); }
.languages p { margin: 0; font-size: .9rem; color: var(--muted); }

.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 25%; width: 1px; background: var(--line); }
.timeline-item { display: grid; grid-template-columns: 25% 75%; }
.timeline-meta { position: relative; padding: .5rem 2.5rem 4rem 0; text-align: right; }
.timeline-meta::after { content: ""; position: absolute; right: -7px; top: .75rem; width: 14px; height: 14px; border: 3px solid var(--surface); border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.timeline-meta span, .timeline-meta small { display: block; }
.timeline-meta span { font-weight: 800; color: var(--teal-dark); }
.timeline-meta small { color: var(--muted); }
.timeline-content { padding: 0 0 4rem 3rem; }
.timeline-content .org { margin-bottom: .3rem; color: var(--teal-dark); font-size: .88rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.timeline-content h3 { max-width: 680px; font-size: 1.55rem; font-weight: 800; }
.timeline-content ul { color: var(--muted); padding-left: 1.2rem; }
.timeline-content li { margin-bottom: .45rem; }

.education-section { background: var(--navy); color: white; }
.section-kicker-light { color: #70d9cf; }
.education-intro { color: #b5cbd3; font-size: 1.08rem; }
.education-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.education-card { padding: 1.5rem; border: 1px solid rgba(255,255,255,.13); border-radius: 1rem; background: rgba(255,255,255,.055); }
.education-card-wide { grid-column: 1 / -1; }
.education-card span { color: var(--gold); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.education-card h3 { margin: .65rem 0; font-size: 1.13rem; }
.education-card p { margin-bottom: .2rem; color: #d8e5e8; }
.education-card small { color: #97b1ba; }

.cert-list { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.cert-item { display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; padding: 1.5rem .5rem; border-bottom: 1px solid var(--line); }
.cert-item:nth-child(odd) { padding-right: 2rem; border-right: 1px solid var(--line); }
.cert-item:nth-child(even) { padding-left: 2rem; }
.cert-item > span { color: var(--teal-dark); font-weight: 800; }
.cert-item h3 { margin: 0 0 .3rem; font-size: 1.05rem; font-weight: 800; }
.cert-item p { margin: 0; color: var(--muted); font-size: .9rem; }

.contact-cta { padding: 2rem 0 7rem; }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 2rem; padding: 3.2rem; border-radius: 1.6rem; background: linear-gradient(120deg, var(--teal-dark), var(--navy)); color: white; box-shadow: var(--shadow); }
.cta-inner h2 { max-width: 760px; margin: 0; font-size: clamp(1.8rem, 4vw, 3.2rem); font-weight: 800; letter-spacing: -.04em; }
footer { padding: 1.7rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--teal-dark); }
.back-to-top { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 100; width: 3rem; height: 3rem; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--teal-dark); color: white; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(10px); transition: .25s ease; }
.back-to-top.visible { opacity: 1; visibility: visible; transform: none; }
.animations-ready .reveal { opacity: 0; transform: translateY(24px); transition: opacity .65s ease, transform .65s ease; }
.animations-ready .reveal.visible { opacity: 1; transform: none; }

@media (max-width: 991.98px) {
  .navbar-collapse { margin-top: .8rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; box-shadow: var(--shadow); }
  .hero { min-height: auto; }
  .contact-card { transform: none; }
  .contact-card::after { inset: 10px 0 -10px 10px; }
  .section-heading { align-items: start; flex-direction: column; }
  .timeline::before { left: 0; }
  .timeline-item { grid-template-columns: 1fr; padding-left: 2rem; }
  .timeline-meta { padding: 0 0 .8rem; text-align: left; }
  .timeline-meta::after { left: -2.42rem; right: auto; }
  .timeline-content { padding: 0 0 3.5rem; }
  .cta-inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 767.98px) {
  .hero { padding: 7.5rem 0 4.5rem; }
  .display-title { font-size: clamp(3.25rem, 17vw, 5.3rem); }
  .section-pad { padding: 5rem 0; }
  .brand-showcase { padding: 0 0 5rem; }
  .brand-banner { border-radius: 1rem; }
  .stat-grid, .education-grid, .cert-list { grid-template-columns: 1fr; }
  .education-card-wide { grid-column: auto; }
  .cert-item:nth-child(odd), .cert-item:nth-child(even) { padding: 1.35rem .25rem; border-right: 0; }
  .cta-inner { padding: 2rem; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  @page { margin: 1.2cm; }
  .navbar, .hero-orb, .hero::before, .hero-actions, .back-to-top, .contact-cta, footer { display: none !important; }
  body, .hero, .section-tint, .education-section { background: white !important; color: #111 !important; }
  .hero { display: block; min-height: 0; padding: 0 0 1cm; }
  .display-title, .display-title span, .section-title, .education-section .section-title { color: #111 !important; -webkit-text-stroke: 0; }
  .contact-card { box-shadow: none; background: white; color: #111; border: 1px solid #aaa; transform: none; }
  .contact-list a, .education-card p, .education-intro { color: #222 !important; }
  .section-pad { padding: .7cm 0; }
  .skill-card, .education-card { break-inside: avoid; border-color: #aaa; background: white; color: #111; }
  .timeline-item, .cert-item { break-inside: avoid; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
