/* Design tokens: warm paper, midnight ink, and botanical green. */
:root {
  color-scheme: light;
  --paper: #f6f7f2; --white: #ffffff; --ink: #152b31; --muted: #5c696b;
  --green: #326545; --lime: #d4f08a; --line: #d9dfd7;
  --mono: 'DM Mono', Consolas, monospace; --sans: 'Manrope', 'Segoe UI', sans-serif; --max: 1200px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 104px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.75 var(--sans); }
::selection { background: var(--lime); color: #152b31; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
ul { margin: 0; padding: 0; list-style: none; }
.container { width: min(var(--max), 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; }
:focus-visible { outline: 3px solid #47795a; outline-offset: 6px; border-radius: 2px; }
.skip-link { position: fixed; top: 12px; left: 16px; z-index: 100; background: var(--ink); color: white; padding: 12px 20px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 100; background: var(--green); pointer-events: none; }
.header { position: sticky; top: 0; z-index: 50; background: rgb(246 247 242 / 96%); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.nav { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 22px; font-weight: 800; letter-spacing: -1px; white-space: nowrap; }
.brand-mark { width: 35px; height: 35px; display: flex; justify-content: center; align-items: center; background: var(--ink); color: var(--paper); border-radius: 50%; font-size: 25px; padding-bottom: 3px; }
.brand-mark span { color: var(--lime); font-size: 17px; margin: 6px 0 0 -1px; }
.brand-dot { color: var(--green); }
/* Rounded navigation inspired by the supplied header reference. */
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 12px; font-weight: 700; }
.nav-pill { display: flex; align-items: center; gap: 3px; padding: 6px; border: 1px solid var(--line); border-radius: 999px; background: #edf1e8; }
.nav-pill a { display: block; padding: 10px 17px; border: 1px solid transparent; border-radius: 999px; color: var(--muted); transition: background .2s, color .2s, border-color .2s; }
.nav-pill a:hover { background: #e1e9da; color: var(--ink); }
.nav-pill a[aria-current="location"] { background: var(--ink); border-color: var(--ink); color: var(--paper); box-shadow: 0 3px 9px #152b3115; }
.nav-cta { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 44px; padding: 9px 19px; border: 1px solid #aab8a3; border-radius: 999px; white-space: nowrap; transition: background .2s, color .2s; }
.nav-cta:hover { background: var(--ink); color: var(--paper); }
.nav-resume { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 10px 18px; border-radius: 999px; background: var(--green); color: white; white-space: nowrap; }
.nav-resume:hover { background: var(--ink); }
.has-resume .nav { gap: 18px; }
.has-resume .nav-links { gap: 12px; }
.has-resume .nav-pill a { padding-inline: 12px; }
.menu-toggle { display: none; }
.nav-controls { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav > .nav-links { margin-left: auto; }
.theme-toggle { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.theme-toggle:hover { border-color: var(--green); background: #eaf0e3; }
.theme-icon-sun { display: none; }
.hero { padding-block: 91px 0; display: grid; grid-template-columns: 1.1fr 1fr; column-gap: 35px; align-items: center; }
.eyebrow, .section-kicker, .small-label { font: 10px/1.7 var(--mono); letter-spacing: 1.25px; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--green); margin-bottom: 28px; letter-spacing: .65px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
h1 { font-size: clamp(52px, 5.7vw, 80px); font-weight: 800; letter-spacing: -.065em; line-height: 1.065; }
.hero-accent { color: var(--green); }
.hero-lede { max-width: 460px; margin-top: 27px; color: var(--muted); font-size: 15px; line-height: 1.85; }
.hero-lede strong { font-weight: 700; color: var(--ink); }
.hero-actions { display: flex; align-items: center; gap: 30px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 38px; padding: 15px 22px; border-radius: 4px; font-size: 13px; font-weight: 700; transition: background .2s, transform .2s; }
.button-primary { background: var(--ink); color: white; }
.button-primary:hover { background: var(--green); transform: translateY(-2px); }
.button span, .text-link span[aria-hidden] { font-size: 19px; line-height: 1; }
.text-link { display: inline-flex; align-items: center; gap: 18px; min-height: 44px; font-size: 13px; font-weight: 700; }
.text-link:hover { color: var(--green); text-decoration: underline; text-underline-offset: 6px; }
.hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 35px; font: 9px/1.7 var(--mono); letter-spacing: .8px; color: var(--muted); }
.meta-divider { height: 11px; width: 1px; background: #aab6ab; }
.hero-art { position: relative; min-width: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: center; background: radial-gradient(ellipse, #e4ecd8 0%, transparent 69%); }
.art-topline, .art-caption { display: flex; justify-content: space-between; align-items: center; gap: 16px; font: 8px/1.7 var(--mono); letter-spacing: .8px; color: #5a7161; }
.art-topline { padding: 16px 8px 0; }
.art-topline .status-dot { margin-right: 5px; }
.system-art { width: 100%; }
.profile-photo { width: min(100%, 320px); height: auto; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 28%; border-radius: 24px; border: 6px solid #fff; box-shadow: 0 15px 50px #152b3115; margin: 28px auto; }
.portrait-art .art-caption { margin-top: 0; }
.art-caption { border-top: 1px solid #ccd6c8; padding: 15px 8px; margin-top: -12px; }
.hero-bottom { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 20px; align-items: center; border-top: 1px solid var(--line); margin-top: 65px; padding-block: 23px; font: 9px/1.6 var(--mono); letter-spacing: 1px; color: var(--muted); }
.hero-bottom a { display: inline-flex; align-items: center; gap: 13px; min-height: 24px; }
.hero-bottom a span { font-size: 19px; color: var(--green); }
.interest-strip { background: #eaf0e3; border-block: 1px solid #d7e0d0; }
.interest-list { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; padding-block: 24px; font-size: 13px; font-weight: 600; }
.interest-list i { font-size: 19px; font-style: normal; color: var(--green); }
.section { padding-block: 108px; }
.section-kicker { color: var(--green); margin-bottom: 18px; }
h2 { font-size: clamp(32px, 3.3vw, 46px); line-height: 1.2; font-weight: 700; letter-spacing: -.05em; }
.accent { color: var(--green); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 43px; }
.section-heading > p { font-size: 13px; color: var(--muted); padding-bottom: 3px; }
.project { display: grid; grid-template-columns: 1.1fr 1fr; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--white); margin-top: 28px; transition: border-color .25s, box-shadow .25s; }
.project:hover { border-color: #a8b9a0; box-shadow: 0 16px 38px -26px #20332355; }
.project-visual { min-height: 452px; position: relative; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.rice-visual { background: #142e30; background-image: linear-gradient(#c3e6d106 1px, transparent 1px), linear-gradient(90deg, #c3e6d106 1px, transparent 1px); background-size: 32px 32px; color: #dce7dc; }
.visual-label, .visual-footer { position: absolute; left: 27px; right: 27px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 8px/1.6 var(--mono); letter-spacing: .7px; }
.visual-label { top: 26px; }
.visual-pill { border: 1px solid #a9c0ad55; padding: 5px 8px; border-radius: 3px; }
.visual-footer { bottom: 24px; opacity: .75; }
.leaf-frame { width: 76%; margin-inline: auto; position: relative; padding: 9px; }
.leaf-frame img { width: 100%; filter: drop-shadow(0 10px 15px #0003); }
.frame-corner { position: absolute; width: 20px; height: 20px; border-color: #d4f08a80; border-style: solid; }
.corner-tl { top: 0; left: 0; border-width: 1px 0 0 1px; }.corner-tr { top: 0; right: 0; border-width: 1px 1px 0 0; }.corner-bl { bottom: 0; left: 0; border-width: 0 0 1px 1px; }.corner-br { bottom: 0; right: 0; border-width: 0 1px 1px 0; }
.project-info { padding: 44px 44px 31px; display: flex; flex-direction: column; align-items: flex-start; }
.project-category { font: 9px/1.6 var(--mono); letter-spacing: 1px; color: var(--green); margin-bottom: 17px; }
.project h3 { font-size: clamp(28px, 2.9vw, 38px); font-weight: 700; letter-spacing: -.045em; line-height: 1.17; }
.project-fullname { font-size: 11px; line-height: 1.7; font-weight: 600; color: #526963; margin-top: 16px; }
.project-info > p:not([class]) { color: var(--muted); font-size: 13px; line-height: 1.85; margin-top: 13px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; margin-block: 22px 26px; }
.tag-list li { font: 9px/1.6 var(--mono); background: #f1f4ec; color: #425745; border: 1px solid #e2e8da; border-radius: 3px; padding: 5px 8px; }
.project-link { width: 100%; display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; border-top: 1px solid var(--line); padding-top: 18px; margin-top: auto; }
.project-link span { font-size: 23px; font-weight: 400; transition: transform .2s; }
.project-link:hover { color: var(--green); }
.project-link:hover span { transform: translate(3px, -3px); }
.project-reverse { grid-template-columns: 1fr 1.1fr; }
.project-reverse .project-visual { order: 2; }
.home-visual { background: #e6ebdf; color: #47604c; }
.home-art { width: 100%; }
.project-image-fallback { padding: 40px; text-align: center; font-size: 22px; line-height: 1.5; }
.projects-end { display: flex; align-items: center; justify-content: space-between; margin-top: 28px; font-size: 12px; color: var(--muted); }
.projects-end a { color: var(--ink); }
.about-section { background: var(--ink); color: var(--paper); }
.about-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; }
.about-section .section-kicker { color: var(--lime); }
.about-heading h2 { max-width: 440px; }
.about-heading h2 span { color: #aabcaf; }
.about-signature { font-size: 25px; letter-spacing: -1px; margin-top: 39px; }
.about-signature span { color: var(--lime); margin-left: 14px; }
.about-heading .small-label { color: #aabcaf; margin-top: 5px; font-size: 8px; }
.about-copy { padding-top: 37px; }
.large-copy { font-size: 23px; line-height: 1.65; letter-spacing: -.5px; }
.large-copy em { color: var(--lime); font-style: normal; }
.about-copy > p:not(.large-copy) { color: #b8c7c5; font-size: 14px; line-height: 1.9; margin-top: 21px; }
.light-link { margin-top: 24px; color: var(--lime); }
.light-link:hover { color: white; }
.about-section :focus-visible { outline-color: var(--lime); }
.toolkit-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; }
.section-intro > p:last-child { font-size: 14px; color: var(--muted); max-width: 280px; margin-top: 23px; }
.skill-group { display: flex; gap: 20px; padding-block: 26px; border-top: 1px solid var(--line); }
.skill-group:last-child { border-bottom: 1px solid var(--line); }
.skill-number { font: 10px/2.5 var(--mono); color: var(--green); }
.skill-group h3 { font-size: 19px; letter-spacing: -.5px; font-weight: 700; }
.skill-group p { font-size: 12px; color: var(--muted); margin-top: 6px; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 7px 16px; margin-top: 15px; font: 10px/1.9 var(--mono); color: #3f584a; }
.skill-symbol { margin-left: auto; font-size: 24px; color: var(--green); }
.education-section { padding-bottom: 100px; }
.education-layout { border-top: 1px solid var(--line); padding-top: 52px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; }
.education-layout h2 { font-size: 30px; }
.education-details { border-left: 2px solid var(--green); padding-left: 27px; }
.education-status { display: flex; align-items: center; gap: 8px; color: var(--green); font: 9px/1.7 var(--mono); letter-spacing: 1px; margin-bottom: 13px; }
.education-details h3 { font-size: 20px; letter-spacing: -.5px; }
.education-details p { font-size: 13px; color: var(--muted); margin-block: 6px 14px; }
.education-details .small-label { font-size: 8px; color: var(--muted); }
.contact-section { background: var(--lime); padding-block: 82px 65px; }
.contact-section .section-kicker { color: #36532d; }
.contact-heading { display: flex; align-items: center; justify-content: space-between; gap: 35px; }
.contact-heading h2 { font-size: clamp(39px, 5.1vw, 70px); line-height: 1.13; font-weight: 700; letter-spacing: -.055em; }
.contact-heading h2 > span { color: var(--green); }
.contact-arrow { flex-shrink: 0; width: 100px; height: 100px; border: 1px solid #152b3166; border-radius: 50%; display: grid; place-items: center; font-size: 61px; line-height: 1; transition: background .2s, color .2s; }
.contact-arrow:hover { background: var(--ink); color: var(--lime); }
.contact-bottom { border-top: 1px solid #152b3129; display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; margin-top: 38px; padding-top: 29px; }
.contact-bottom > p { font-size: 13px; color: #3a5433; }
.contact-links { display: flex; flex-direction: column; align-items: flex-start; }
.email-link { font-size: clamp(15px, 1.7vw, 22px); font-weight: 600; letter-spacing: -.5px; border-bottom: 1px solid #152b3166; padding-bottom: 5px; }
.email-link span { padding-left: 20px; }
.email-link:hover { border-bottom-color: var(--ink); }
.contact-links .text-link { font-size: 11px; margin-top: 5px; }
.footer { background: var(--paper); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding-block: 30px; }
.footer-inner .brand { font-size: 18px; }
.footer-inner .brand-mark { height: 30px; width: 30px; font-size: 22px; }
.footer-inner p { font-size: 10px; color: var(--muted); }
.back-top { font: 9px/1.7 var(--mono); display: inline-flex; gap: 20px; align-items: center; min-height: 44px; }
.back-top span { font-size: 20px; }
/* Content is visible by default, even when JavaScript is unavailable. */
.reveal.is-pending { opacity: 0; transform: translateY(18px); }
.reveal { transition: opacity .65s ease, transform .65s ease; }
/* Dark palette is screen-only, preserving the existing light print output. */
@media screen {
  :root[data-theme="dark"] {
    color-scheme: dark;
    --paper: #0d171b; --white: #15252b; --ink: #e8efec;
    --muted: #a8b8b2; --green: #a8d78a; --line: #2a3d3c;
  }
  [data-theme="dark"] .header { background: rgb(13 23 27 / 96%); }
  [data-theme="dark"] :focus-visible { outline-color: var(--lime); }
  [data-theme="dark"] .brand-mark { background: #233e31; color: #f6f7f2; }
  [data-theme="dark"] .nav-pill { background: #16272b; }
  [data-theme="dark"] .nav-pill a:hover,
  [data-theme="dark"] .theme-toggle:hover { background: #263e36; }
  [data-theme="dark"] .nav-pill a[aria-current="location"] { background: #a8d78a; border-color: #a8d78a; color: #102018; }
  [data-theme="dark"] .nav-cta,
  [data-theme="dark"] .menu-toggle { border-color: #40564c; }
  [data-theme="dark"] .nav-resume,
  [data-theme="dark"] .button-primary { background: #a8d78a; color: #102018; }
  [data-theme="dark"] .nav-resume:hover,
  [data-theme="dark"] .button-primary:hover { background: #d4f08a; color: #102018; }
  [data-theme="dark"] .theme-icon-moon { display: none; }
  [data-theme="dark"] .theme-icon-sun { display: block; }
  [data-theme="dark"] .hero-art { background: radial-gradient(ellipse, #263a28 0%, transparent 69%); }
  [data-theme="dark"] .art-topline,
  [data-theme="dark"] .art-caption { color: #a7b9a5; }
  [data-theme="dark"] .art-caption { border-color: var(--line); }
  [data-theme="dark"] .profile-photo { border-color: #2c4235; box-shadow: 0 15px 50px #0003; }
  [data-theme="dark"] .meta-divider { background: #4b6157; }
  [data-theme="dark"] .interest-strip { background: #192b24; border-color: var(--line); }
  [data-theme="dark"] .project:hover { border-color: #58734f; box-shadow: 0 16px 38px -26px #0008; }
  [data-theme="dark"] .project-fullname { color: #afc5b4; }
  [data-theme="dark"] .tag-list li { color: #c5dcb9; background: #20342c; border-color: #344b3b; }
  [data-theme="dark"] .about-section { background: #14272c; color: #e8efec; }
  [data-theme="dark"] .skill-chips { color: #b5cdaa; }
  [data-theme="dark"] .contact-section { background: #1d342b; color: #e8efec; }
  [data-theme="dark"] .contact-section .section-kicker { color: #a8d78a; }
  [data-theme="dark"] .contact-bottom { border-color: #425b4b; }
  [data-theme="dark"] .contact-bottom > p { color: #b8cbb9; }
  [data-theme="dark"] .contact-arrow,
  [data-theme="dark"] .email-link { border-color: #6e8b70; }
  [data-theme="dark"] .contact-arrow:hover { background: #d4f08a; color: #152b31; }
}
@media (min-width: 1440px) { .hero { padding-top: 100px; } }
@media (max-width: 1050px) {
  .container { width: calc(100% - 64px); }
  .nav-links { gap: 23px; }
  .hero { gap: 25px; padding-top: 65px; }
  h1 { font-size: clamp(48px, 6.1vw, 66px); }
  .hero-art { align-self: center; }
  .hero-bottom { margin-top: 40px; }
  .project-info { padding: 30px; }
  .project-visual { min-height: 440px; }
  .about-layout, .toolkit-layout { gap: 50px; }
  .interest-list { font-size: 11px; gap: 11px; }
}
@media (max-width: 1200px) {
  .nav { min-height: 73px; flex-wrap: wrap; gap: 0; }
  .nav-controls { margin-left: auto; }
  .nav > .nav-links { order: 3; margin-left: 0; }
  .header .brand { font-size: 20px; }
  .nav-links { width: 100%; flex-direction: column; align-items: stretch; gap: 12px; padding: 9px 0 20px; }
  .nav-pill { flex-wrap: wrap; border-radius: 18px; gap: 4px; }
  .nav-pill a { padding: 10px 15px; }
  /* Collapse the navigation only once its JavaScript handlers are ready. */
  .nav-ready .menu-toggle { display: flex; width: 44px; height: 44px; border: 1px solid #cad2c5; border-radius: 50%; background: transparent; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--ink); cursor: pointer; }
  .menu-toggle span { width: 18px; height: 1px; background: currentColor; transition: transform .2s; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .nav-ready .nav-links { display: none; }
  .nav-ready .nav-links.open { display: flex; }
  .nav-ready .nav-pill { flex-direction: column; align-items: stretch; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 90px; }
  .container { width: calc(100% - 40px); }
  .hero { grid-template-columns: 1fr; padding-top: 49px; }
  .eyebrow { font-size: 9px; margin-bottom: 23px; }
  h1 { font-size: clamp(48px, 10.5vw, 75px); }
  .hero-lede { font-size: 14px; max-width: 470px; }
  .hero-art { width: 100%; max-width: 490px; justify-self: center; margin-top: 16px; }
  .profile-photo { width: min(100%, 240px); margin-block: 22px; }
  .system-art { max-height: 380px; }
  .hero-meta { font-size: 8px; gap: 10px; }
  .hero-bottom { margin-top: 5px; font-size: 8px; padding-block: 17px; }
  .hero-bottom > span { display: none; }
  .interest-list { justify-content: center; gap: 10px 17px; padding-block: 19px; font-size: 10px; }
  .interest-list i { font-size: 12px; }
  .section { padding-block: 70px; }
  .section-heading { display: block; margin-bottom: 28px; }
  h2 { font-size: 35px; }
  .section-heading > p { margin-top: 18px; }
  .section-heading > p br { display: none; }
  .project, .project-reverse { grid-template-columns: 1fr; margin-top: 24px; }
  .project-reverse .project-visual { order: 0; }
  .project-visual { min-height: 340px; }
  .leaf-frame { width: 76%; max-width: 370px; }
  .home-art { height: 320px; width: 100%; object-fit: contain; }
  .visual-label, .visual-footer { left: 21px; right: 21px; font-size: 7px; }
  .project-info { padding: 28px; }
  .project h3 { font-size: 33px; }
  .project-info > p:not([class]) { font-size: 14px; }
  .project-fullname { font-size: 12px; }
  .tag-list li { font-size: 9px; }
  .projects-end { flex-wrap: wrap; gap: 4px 18px; }
  .about-layout, .toolkit-layout, .education-layout { grid-template-columns: 1fr; gap: 35px; }
  .about-copy { padding-top: 0; }
  .about-signature { margin-top: 25px; }
  .large-copy { font-size: 22px; }
  .toolkit-layout .section-intro > p:last-child { max-width: 330px; }
  .skill-group { gap: 14px; }
  .skill-symbol { font-size: 20px; }
  .education-section { padding-bottom: 70px; }
  .education-layout { padding-top: 35px; }
  .education-details { padding-left: 20px; }
  .contact-section { padding-block: 65px 45px; }
  .contact-heading { gap: 15px; }
  .contact-heading h2 { font-size: clamp(34px, 7.8vw, 52px); }
  .contact-arrow { width: 56px; height: 56px; font-size: 35px; }
  .contact-bottom { flex-direction: column; gap: 22px; margin-top: 28px; }
  .email-link { font-size: 19px; }
  .footer-inner { flex-wrap: wrap; gap: 15px; padding-block: 23px; }
  .footer-inner p { order: 3; width: 100%; }
}
@media (max-width: 380px) {
  .container { width: calc(100% - 32px); }
  .eyebrow { font-size: 8px; letter-spacing: .2px; }
  h1 { font-size: 44px; }
  .hero-actions { gap: 22px; }
  .button { padding-inline: 16px; gap: 21px; }
  .hero-meta { font-size: 7px; }
  .project-info { padding: 24px; }
  .project-visual { min-height: 285px; }
  .visual-label, .visual-footer { left: 16px; right: 16px; letter-spacing: 0; }
  .visual-pill { padding-inline: 5px; }
  .contact-arrow { width: 43px; height: 43px; font-size: 28px; }
  .contact-heading h2 { font-size: 31px; }
  .email-link { font-size: 17px; }
  .email-link span { padding-left: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal.is-pending { opacity: 1; transform: none; }
}
@media print {
  .header, .hero-art, .hero-bottom, .interest-strip, .scroll-progress, .back-top, .contact-arrow { display: none; }
  body { background: white; color: black; }
  .container { width: 100%; }
  .section, .hero, .contact-section { padding-block: 25px; }
  .about-section { background: white; color: black; }
  .about-copy p, .about-heading h2 span { color: black !important; }
  .reveal.is-pending { opacity: 1; transform: none; }
  .project, .education-layout { break-inside: avoid; }
}

/* Certificates: image/PDF previews, three cards per row, expandable collection. */
.cv-section { padding-block: 0 90px; }
.cv-card { display: flex; align-items: center; gap: 30px; padding: 40px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.cv-card .certificate-file-icon { flex-shrink: 0; }
.cv-copy { flex: 1; min-width: 0; }
.cv-copy .section-kicker { margin-bottom: 10px; }
.cv-copy h2 { font-size: clamp(28px, 3vw, 38px); }
.cv-copy > p:last-child { margin-top: 12px; color: var(--muted); font-size: 14px; }
.cv-actions { flex-shrink: 0; }
.cv-status { color: var(--muted); font-size: 13px; }
@media (max-width: 760px) {
  .cv-section { padding-bottom: 65px; }
  .cv-card { flex-wrap: wrap; gap: 20px; padding: 26px; }
  .cv-actions { width: 100%; }
}
.certificates-section { border-top: 1px solid var(--line); }
.certificates-heading { text-align: center; margin-bottom: 44px; }
.certificates-heading .section-kicker { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px; }
.certificates-heading > p:last-child { margin-top: 17px; color: var(--muted); font-size: 14px; }
.certificate-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.certificate-card { position: relative; min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--white); overflow: hidden; transition: border-color .2s, transform .2s; }
.certificate-card:has(a):hover { border-color: var(--green); transform: translateY(-4px); }
.certificate-card:focus-within { outline: 3px solid var(--green); outline-offset: 4px; }
.certificate-preview { position: relative; aspect-ratio: 3 / 2; background: var(--paper); border-bottom: 1px solid var(--line); }
.certificate-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: white; }
.certificate-document { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 11px; height: 100%; padding: 25px; }
.certificate-file-icon { position: relative; display: inline-grid; place-items: center; width: 46px; height: 58px; background: #fce5e9; color: #a92646; border: 1px solid #e3a8b5; border-radius: 5px 13px 5px 5px; font: 700 13px var(--mono); }
.certificate-file-icon::after { content: ''; position: absolute; right: 0; top: 0; width: 11px; height: 11px; background: #e3a8b5; border-radius: 0 10px 0 3px; }
.certificate-file-label { font-size: 13px; font-weight: 800; }
.certificate-filename { color: var(--muted); font: 10px/1.6 var(--mono); max-width: 100%; overflow-wrap: anywhere; text-align: center; }
.certificate-body { padding: 22px; }
.certificate-body h3 { font-size: 16px; line-height: 1.5; letter-spacing: -.3px; overflow-wrap: anywhere; }
.certificate-link { display: flex; justify-content: space-between; gap: 16px; }
.certificate-link::after { content: ''; position: absolute; inset: 0; }
.certificate-link > span[aria-hidden] { flex-shrink: 0; color: var(--green); }
.certificate-issuer { font-size: 12px; margin-top: 8px; color: var(--muted); }
.certificate-meta { font-size: 11px; margin-top: 8px; color: var(--muted); }
.certificate-actions { display: flex; justify-content: center; }
.certificate-more { display: inline-flex; align-items: center; gap: 22px; padding: 13px 23px; margin-top: 34px; border: 1px solid var(--green); border-radius: 999px; background: transparent; color: var(--ink); font-size: 12px; font-weight: 800; cursor: pointer; }
.certificate-more > span[aria-hidden] { color: var(--green); font-size: 20px; line-height: 1; }
.certificate-more:hover { background: var(--white); }
.certificates-empty { border: 1px dashed var(--line); border-radius: 14px; text-align: center; padding: 48px 24px; max-width: 600px; margin-inline: auto; }
.certificates-empty h3 { font-size: 18px; margin-top: 20px; }
.certificates-empty p { color: var(--muted); font-size: 13px; margin-top: 8px; }
@media (max-width: 950px) { .certificate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .certificate-grid { grid-template-columns: 1fr; gap: 20px; }
  .certificates-heading { margin-bottom: 30px; }
  .certificates-heading h2 { font-size: 32px; }
}
