/* Layers: content 0, sticky navigation 10, keyboard skip link 20. */
:root {
  color-scheme: light;
  --bg: #f7f9f8; --surface: #edf2f1; --raised: #fcfdfc; --text: #182c30;
  --muted: #53676b; --accent: #0f706e; --accent-soft: #e0eeeb; --border: #d4dfdc;
  --button-text: #f5fcfa; --header: rgb(247 249 248 / .94);
  --radius: 16px; --space: clamp(64px, 8vw, 112px);
  font-family: 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101a1d; --surface: #17272b; --raised: #1a2c30; --text: #ebf2f0;
  --muted: #a8bcba; --accent: #74cfc3; --accent-soft: #203b3b; --border: #314548;
  --button-text: #102b2b; --header: rgb(16 26 29 / .94);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #101a1d; --surface: #17272b; --raised: #1a2c30; --text: #ebf2f0;
    --muted: #a8bcba; --accent: #74cfc3; --accent-soft: #203b3b; --border: #314548;
    --button-text: #102b2b; --header: rgb(16 26 29 / .94);
  }
}
* { box-sizing: border-box; }
html { scroll-padding-top: 100px; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.65; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
a, button, summary { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
::selection { background: var(--accent); color: var(--button-text); }
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.15; }
.container { width: min(1180px, calc(100% - 96px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 10px; left: 16px; z-index: 20; padding: 10px 16px; background: var(--text); color: var(--bg); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.site-header { position: sticky; top: 0; z-index: 10; background: var(--header); border-bottom: 1px solid var(--border); backdrop-filter: blur(16px); }
.nav-shell { min-height: 80px; display: flex; align-items: center; gap: 30px; }
.wordmark { font-size: 18px; font-weight: 650; letter-spacing: -.7px; white-space: nowrap; }
.wordmark span { color: var(--accent); padding-left: 6px; }
nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav-link { position: relative; font-size: 13px; font-weight: 550; color: var(--muted); padding-block: 28px; }
.nav-link.active, .nav-link:hover { color: var(--accent); }
.nav-link.active::after { content: ''; position: absolute; bottom: 18px; left: 0; right: 0; height: 2px; background: var(--accent); }
.nav-controls { display: flex; gap: 12px; align-items: center; }
.theme-toggle { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--border); background: transparent; border-radius: 50%; color: var(--text); }
.theme-toggle:hover { background: var(--accent-soft); }
.theme-symbol { font-size: 23px; line-height: 1; }
.menu-toggle { display: none; }
.hero { display: grid; grid-template-columns: 1.35fr 1fr; align-items: center; gap: clamp(40px, 7vw, 100px); padding-block: 68px 64px; }
.eyebrow, .small-label { font-size: 11px; font-weight: 650; letter-spacing: 1.7px; color: var(--accent); }
.hero .eyebrow { margin-bottom: 24px; }
h1 { font-size: clamp(46px, 5.8vw, 78px); line-height: 1.06; letter-spacing: -.065em; }
h1 span, .accent { color: var(--accent); }
.hero-description { color: var(--muted); max-width: 440px; font-size: 17px; line-height: 1.75; margin-block: 26px 30px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 30px; min-height: 50px; padding: 12px 21px; border-radius: 7px; font-size: 13px; font-weight: 600; white-space: nowrap; transition: transform .2s ease, background-color .2s ease; }
.button-primary { color: var(--button-text); background: var(--accent); border: 1px solid var(--accent); }
.button-secondary { background: transparent; border: 1px solid var(--border); }
.button:hover { transform: translateY(-3px); }
.button-secondary:hover { background: var(--accent-soft); }
.button span[aria-hidden] { font-size: 19px; }
.portrait-frame { border-radius: var(--radius); overflow: hidden; background: var(--surface); aspect-ratio: 1 / 1.08; }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.portrait figcaption { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 11px; color: var(--muted); }
.portrait figcaption span:first-child { color: var(--text); font-weight: 600; }
.overview { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--border); padding-block: 26px; gap: 24px; }
.overview > * { display: flex; flex-direction: column; gap: 3px; }
.overview strong { font-size: 17px; font-weight: 600; letter-spacing: -.4px; }
.overview span { font-size: 11px; color: var(--muted); }
.overview a strong { color: var(--accent); }
.overview a strong span { font-size: 18px; color: inherit; margin-left: 6px; }
.section { padding-block: var(--space); }
.section + .section { border-top: 1px solid var(--border); }
.section-heading { margin-bottom: 38px; }
h2 { font-size: clamp(30px, 3.3vw, 44px); letter-spacing: -.045em; }
h2 > span:not(.accent) { color: var(--muted); }
.section-heading p:not(.eyebrow) { margin-top: 15px; color: var(--muted); max-width: 560px; font-size: 14px; }
.section-heading .eyebrow { margin-bottom: 16px; }
h3 { font-size: 23px; letter-spacing: -.65px; }
.education-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 52px; }
.education-feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 34px; }
.education-feature h3 { margin-top: 24px; }
.institution { color: var(--accent); margin-top: 8px; font-size: 15px; }
.education-feature > p:not(.institution) { color: var(--muted); font-size: 14px; margin-top: 22px; max-width: 510px; }
.education-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.education-history { display: grid; align-content: center; gap: 34px; }
.date { font-size: 12px; color: var(--accent); }
.education-history h3 { margin-top: 8px; font-size: 20px; }
.education-history p { margin-top: 6px; color: var(--muted); font-size: 14px; }
.skills-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 72px; align-items: start; }
.technical-skills h3 { font-size: 16px; margin-bottom: 24px; }
.skill-list { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; }
.skill-list dt { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.skill-list dd { color: var(--muted); font-size: 12px; max-width: 230px; }
.professional-skills { padding: 30px; border-left: 2px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; }
.professional-skills h3 { margin-top: 17px; font-size: 25px; }
.professional-skills p { color: var(--muted); font-size: 13px; margin-top: 16px; }
.skill-tags, .tags { display: flex; flex-wrap: wrap; list-style: none; gap: 8px; padding: 0; margin: 22px 0 0; }
.skill-tags li { font-size: 11px; border: 1px solid var(--border); border-radius: 5px; padding: 5px 9px; }
.featured-project { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 44px; }
.project-main h3 { font-size: 38px; margin-top: 20px; letter-spacing: -1.5px; }
.project-main p { color: var(--muted); font-size: 14px; margin-top: 18px; max-width: 470px; }
.tags li { background: var(--accent-soft); color: var(--accent); padding: 4px 10px; border-radius: 4px; font-size: 11px; }
.project-main .button { margin-top: 30px; }
.project-notes { border-left: 1px solid var(--border); padding-left: 40px; align-self: center; }
.project-notes h4 { font-size: 22px; letter-spacing: -.6px; margin-bottom: 26px; }
.project-notes dl { display: grid; gap: 20px; }
.project-notes dt { font-size: 12px; font-weight: 650; color: var(--accent); margin-bottom: 5px; }
.project-notes dd { font-size: 13px; color: var(--muted); }
.academic-projects { margin-top: 24px; }
details { border-bottom: 1px solid var(--border); }
summary { display: flex; justify-content: space-between; align-items: center; gap: 22px; padding-block: 24px; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary .small-label { font-size: 9px; color: var(--muted); }
summary h3 { font-size: 19px; margin-top: 6px; }
.disclosure { font-size: 25px; color: var(--accent); transition: transform .2s ease; }
details[open] .disclosure { transform: rotate(45deg); }
summary:hover h3 { color: var(--accent); }
.project-details { max-width: 720px; padding-bottom: 28px; color: var(--muted); font-size: 14px; }
.project-details .tags { margin-top: 16px; }
.certifications-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.certificate { border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.certificate h3 { margin-top: 25px; font-size: 23px; }
.certificate p { color: var(--muted); font-size: 14px; margin-top: 15px; max-width: 390px; }
.certificate time { display: block; color: var(--muted); font-size: 12px; margin-top: 24px; }
.contact { display: grid; grid-template-columns: 1.45fr 1fr; gap: 70px; }
.contact h2 { margin-top: 20px; font-size: clamp(40px, 4.5vw, 60px); }
.contact-intro > p:not(.eyebrow) { max-width: 390px; margin-top: 22px; font-size: 14px; color: var(--muted); }
.contact-email { display: block; width: fit-content; max-width: 100%; overflow-wrap: anywhere; color: var(--accent); font-size: clamp(15px, 1.7vw, 21px); font-weight: 550; letter-spacing: -.5px; margin-top: 26px; }
.contact-email:hover { text-decoration: underline; text-underline-offset: 5px; }
.text-button { color: var(--muted); border: 0; padding: 10px 0; margin-top: 2px; background: transparent; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; min-height: 44px; }
.copy-status { display: block; color: var(--accent); min-height: 24px; font-size: 12px; }
.contact-links { align-self: center; }
.contact-links > a { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 22px 0; border-bottom: 1px solid var(--border); }
.contact-links .small-label { color: var(--muted); display: block; font-size: 9px; }
.contact-links strong { display: block; margin-top: 5px; font-size: 17px; font-weight: 550; }
.contact-links a > span[aria-hidden] { font-size: 22px; color: var(--accent); }
.contact-links a:hover strong { color: var(--accent); }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding-block: 25px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.site-footer a:hover { color: var(--accent); }
.site-footer a span { margin-left: 12px; }
@media (min-width: 1500px) { .hero { padding-block: 85px; } }
@media (max-width: 1023px) {
  .container { width: calc(100% - 64px); }
  .nav-shell { gap: 20px; }
  nav { gap: 18px; }
  .hero { gap: 36px; }
  h1 { font-size: clamp(43px, 5.8vw, 64px); }
  .hero-description { font-size: 15px; }
  .skills-layout { gap: 35px; }
  .education-layout { gap: 30px; }
  .featured-project { gap: 32px; padding: 32px; }
  .project-notes { padding-left: 28px; }
  .contact { gap: 35px; }
}
@media (max-width: 767px) {
  .container { width: calc(100% - 40px); }
  .nav-shell { min-height: 70px; flex-wrap: wrap; gap: 0; }
  .wordmark { font-size: 17px; }
  .nav-controls { margin-left: auto; }
  .theme-toggle { width: 40px; height: 40px; }
  .menu-toggle { display: flex; align-items: center; gap: 14px; background: transparent; border: 1px solid var(--border); border-radius: 6px; color: var(--text); padding: 9px 12px; font-size: 12px; min-height: 42px; }
  nav { width: 100%; order: 3; justify-content: space-between; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding-block: 4px 12px; }
  .js-ready nav:not(.is-open) { display: none; }
  .nav-link { padding-block: 12px; font-size: 12px; }
  .nav-link.active::after { bottom: 5px; }
  .hero { grid-template-columns: 1fr; gap: 36px; padding-block: 46px 36px; }
  h1 { font-size: clamp(44px, 9.6vw, 68px); }
  .hero .eyebrow { margin-bottom: 20px; font-size: 10px; }
  .hero-description { max-width: 460px; margin-block: 22px; }
  .actions .button { gap: 18px; padding-inline: 16px; font-size: 12px; }
  .portrait { width: min(100%, 460px); }
  .portrait-frame { aspect-ratio: 1.18; }
  .portrait img { object-position: center 38%; }
  .portrait figcaption { font-size: 10px; }
  .overview { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .overview strong { font-size: 16px; }
  .overview span { font-size: 10px; }
  .section-heading { margin-bottom: 28px; }
  .education-layout, .skills-layout, .featured-project, .certifications-grid, .contact { grid-template-columns: 1fr; }
  .education-feature, .professional-skills, .certificate { padding: 26px; }
  .education-history { gap: 28px; }
  .education-history h3 { font-size: 19px; }
  .education-layout { gap: 30px; }
  .skills-layout { gap: 32px; }
  .skill-list { gap: 25px 18px; }
  .skill-list dt { font-size: 13px; }
  .skill-list dd { font-size: 11px; }
  .featured-project { padding: 26px; gap: 32px; }
  .project-notes { padding: 26px 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .project-main h3 { font-size: 34px; }
  .contact { gap: 16px; }
  .contact h2 { font-size: 46px; }
  .contact-email { font-size: 16px; }
  .site-footer { font-size: 10px; }
}
@media (max-width: 374px) {
  .wordmark { font-size: 15px; }
  .nav-controls { gap: 8px; }
  .menu-toggle { gap: 8px; padding-inline: 8px; }
  .actions { gap: 10px; }
  .actions .button { gap: 12px; padding-inline: 12px; }
}
@media (prefers-reduced-transparency: reduce) { .site-header { background: var(--bg); backdrop-filter: none; } }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero-content { animation: enter .65s ease both; }
  .portrait { animation: enter .65s .12s ease both; }
  @keyframes enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
