/* Warm editorial portfolio — responsive, accessible, dependency-free. */
:root {
  color-scheme: light;
  --bg: #f4f1e9; --surface: #eae7dd; --surface-2: #e1e5d9;
  --ink: #252b26; --muted: #73786f; --accent: #65745b; --terra: #b8795b;
  --border: #dad6cb; --white: #fffdf7; --shadow: 0 18px 55px rgba(37,43,38,.08);
  --serif: "Playfair Display", Georgia, serif; --sans: "DM Sans", Arial, sans-serif;
  --shell: min(1160px, calc(100% - 64px));
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #202521; --surface: #292f2a; --surface-2: #343d34;
  --ink: #f2eee4; --muted: #b0b4a9; --accent: #a8b99a; --terra: #d19a7c;
  --border: #424a42; --white: #292f2a; --shadow: 0 18px 55px rgba(0,0,0,.2);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.shell { width: var(--shell); margin-inline: auto; }
.section { padding-block: 112px; }
.skip-link { position: absolute; top: -50px; left: 16px; z-index: 1000; padding: 10px 14px; background: var(--ink); color: var(--bg); }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 100; background: color-mix(in srgb, var(--bg) 91%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--border) 75%, transparent); backdrop-filter: blur(14px); }
.nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: -.04em; white-space: nowrap; }
.brand i, .period { color: var(--terra); font-style: normal; }
.nav-links { display: flex; align-items: center; gap: clamp(15px, 2.3vw, 30px); }
.nav-links > a { position: relative; color: var(--muted); font-size: 12px; transition: color .2s; }
.nav-links > a:hover, .nav-links > a.active { color: var(--ink); }
.nav-links > a.active::after { position: absolute; content: ""; left: 0; right: 0; bottom: -9px; height: 1px; background: var(--terra); }
.theme-toggle, .menu-toggle { border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.theme-toggle { width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 50%; font-size: 18px; }
.menu-toggle { display: none; padding: 9px; }
.menu-toggle span { display: block; width: 22px; height: 1px; background: var(--ink); margin: 6px; }
.hero { min-height: 690px; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 8%; position: relative; padding-top: 78px; padding-bottom: 130px; }
.eyebrow { display: flex; align-items: center; gap: 11px; margin: 0 0 25px; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow-line { display: inline-block; width: 28px; height: 1px; background: var(--terra); }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { max-width: 650px; margin-bottom: 12px; font-family: var(--serif); font-size: clamp(54px, 7vw, 88px); font-weight: 500; letter-spacing: -.065em; line-height: 1.06; }
h1 em, h2 em { color: var(--accent); font-weight: 500; }
.hero-title { max-width: 560px; margin: 22px 0 12px; font-size: clamp(18px, 2.2vw, 25px); font-weight: 600; letter-spacing: -.03em; line-height: 1.35; }
.hero-description { max-width: 510px; color: var(--muted); font-size: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 31px; }
.button { min-height: 48px; display: inline-flex; justify-content: center; align-items: center; gap: 18px; padding: 0 20px; border: 1px solid var(--ink); font-size: 11px; font-weight: 600; transition: transform .2s, background .2s, color .2s; cursor: pointer; }
.button:hover { transform: translateY(-2px); }
.button-dark { background: var(--ink); color: var(--bg); }
.button-dark:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.button-outline { border-color: var(--border); }
.button-outline:hover { border-color: var(--ink); }
.text-link { color: var(--accent); font-size: 11px; font-weight: 700; }
.text-link:hover { color: var(--terra); }
.hero-meta { display: flex; align-items: center; gap: 20px; min-height: 24px; margin-top: 36px; color: var(--muted); font-size: 11px; }
.availability { display: inline-flex; align-items: center; gap: 8px; }
.availability i { width: 7px; height: 7px; border-radius: 50%; background: #7c9b69; box-shadow: 0 0 0 4px color-mix(in srgb, #7c9b69 15%, transparent); }
.hero-visual { width: min(100%, 410px); justify-self: end; position: relative; padding: 0 24px 32px 0; }
.portrait-frame { position: relative; aspect-ratio: 4 / 5; background: var(--surface); overflow: hidden; }
.portrait-frame::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 1px solid var(--terra); pointer-events: none; z-index: 2; }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.portrait-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 12px, var(--surface-2) 12px, var(--surface-2) 13px); font-family: var(--serif); font-size: 26px; line-height: 1.15; text-align: center; letter-spacing: .08em; }
.portrait-frame:not(.no-image) .portrait-placeholder { display: none; }
.image-caption { margin: 17px 0 0; color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.image-caption > span:first-child { color: var(--terra); padding-inline: 4px; }
.vertical-note { position: absolute; right: 0; top: 4%; writing-mode: vertical-rl; color: var(--muted); font-size: 9px; letter-spacing: .18em; }
.scroll-cue { position: absolute; bottom: 38px; left: 0; display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.scroll-cue i { color: var(--terra); font-size: 17px; font-style: normal; }
.about-section, .education-section { background: var(--surface); }
.section-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 12%; }
.section-intro h2, .section-heading h2, .contact-copy h2 { margin: 0; font-family: var(--serif); font-size: clamp(40px, 5vw, 61px); font-weight: 500; letter-spacing: -.055em; line-height: 1.12; }
.about-content { max-width: 670px; }
.lead { font-family: var(--serif); font-size: 25px; line-height: 1.5; letter-spacing: -.02em; }
.about-paragraphs p { color: var(--muted); font-size: 14px; }
.about-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.about-facts span { padding: 7px 12px; border: 1px solid var(--border); color: var(--muted); font-size: 10px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 35px; margin-bottom: 48px; }
.section-heading .eyebrow { margin-bottom: 16px; }
.section-note { max-width: 240px; margin: 0 0 7px; color: var(--muted); font-size: 12px; }
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.skill-group { min-height: 180px; padding: 27px; background: var(--bg); }
.skill-group h3 { margin-bottom: 21px; font-family: var(--serif); font-size: 21px; font-weight: 500; }
.skill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-chip { display: flex; flex-direction: column; gap: 1px; padding: 7px 10px; border: 1px solid var(--border); transition: background .2s, border-color .2s; }
.skill-chip:hover { background: var(--surface-2); border-color: var(--accent); }
.skill-name { font-size: 11px; }
.skill-level { color: var(--muted); font-size: 9px; }
.projects-section { background: var(--surface); }
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.project-card { min-width: 0; background: var(--bg); border: 1px solid var(--border); transition: transform .25s, box-shadow .25s; }
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.project-visual { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.project-visual img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.project-card:hover .project-visual img { transform: scale(1.035); }
.project-placeholder { display: grid; place-items: center; background: linear-gradient(135deg, var(--surface-2), var(--surface)); }
.project-placeholder span { color: color-mix(in srgb, var(--accent) 70%, transparent); font-family: var(--serif); font-size: 65px; }
.project-body { padding: 25px 27px 27px; }
.project-topline { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.project-category, .project-status { color: var(--muted); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.project-status { color: var(--accent); }
.project-body h3 { margin-bottom: 9px; font-family: var(--serif); font-size: 26px; font-weight: 500; }
.project-description { max-width: 570px; margin-bottom: 17px; color: var(--muted); font-size: 12px; }
.technology-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.technology-tags span { color: var(--muted); font-size: 9px; }
.technology-tags span:not(:last-child)::after { content: " /"; color: var(--terra); margin-left: 7px; }
.project-links { display: flex; gap: 18px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border); }
.project-links a { color: var(--accent); font-size: 10px; font-weight: 700; }
.empty-note { color: var(--muted); font-size: 12px; }
.empty-note code { color: var(--accent); }
.cert-list { border-top: 1px solid var(--border); }
.cert-year-group { display: grid; grid-template-columns: 150px 1fr; gap: 30px; padding: 25px 0; border-bottom: 1px solid var(--border); }
.cert-year { margin: 0; color: var(--terra); font-family: var(--serif); font-size: 25px; font-weight: 500; }
.cert-entry { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 8px 0; }
.cert-entry h4 { margin: 0 0 3px; font-size: 13px; font-weight: 600; }
.cert-entry p { margin: 0; color: var(--muted); font-size: 11px; }
.education-timeline { border-left: 1px solid var(--border); }
.education-entry { position: relative; display: flex; gap: 24px; padding: 0 0 38px 28px; }
.education-entry:last-child { padding-bottom: 0; }
.timeline-marker { position: absolute; top: 6px; left: -5px; width: 9px; height: 9px; border-radius: 50%; background: var(--terra); box-shadow: 0 0 0 5px var(--surface); }
.education-status { margin-bottom: 8px; color: var(--accent); font-size: 9px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.education-content h3 { margin-bottom: 7px; font-family: var(--serif); font-size: 24px; font-weight: 500; line-height: 1.3; }
.education-institution, .education-detail { margin: 0 0 4px; color: var(--muted); font-size: 12px; }
.interest-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.interest-tag { padding: 10px 16px; border: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.contact-section { background: var(--surface-2); }
.contact-layout { display: grid; grid-template-columns: 1fr .8fr; gap: 12%; }
.contact-copy h2 { font-size: clamp(42px, 5.4vw, 68px); }
.contact-copy > p:last-child { max-width: 400px; margin-top: 25px; color: var(--muted); font-size: 13px; }
.contact-details { padding-top: 14px; }
.email-link { display: inline-block; margin-bottom: 20px; font-family: var(--serif); font-size: clamp(19px, 2.5vw, 27px); border-bottom: 1px solid var(--terra); overflow-wrap: anywhere; }
.contact-meta, .social-links { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 14px; color: var(--muted); font-size: 11px; }
.social-links a { color: var(--accent); font-weight: 700; }
.contact-form { display: grid; grid-template-columns: 1fr; margin-top: 30px; padding-top: 24px; border-top: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.form-label { margin-bottom: 14px; font-family: var(--serif); font-size: 20px; }
.contact-form label { margin: 10px 0 5px; color: var(--muted); font-size: 10px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--ink) 25%, transparent); border-radius: 0; outline: none; background: transparent; color: var(--ink); font-size: 13px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); }
.contact-form button { justify-self: start; margin-top: 20px; }
.form-hint { margin: 10px 0 0; color: var(--muted); font-size: 10px; }
.site-footer { padding: 24px 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-inner .brand { font-size: 18px; }
.footer-inner p, .back-top { margin: 0; color: var(--muted); font-size: 10px; }
.back-top:hover { color: var(--accent); }
.noscript { padding: 20px; text-align: center; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 900px) {
  :root { --shell: min(100% - 44px, 720px); }
  .nav-links { gap: 14px; }
  .nav-links > a { font-size: 11px; }
  .hero { gap: 5%; min-height: 610px; }
  .section { padding-block: 86px; }
  .section-grid { gap: 7%; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  :root { --shell: calc(100% - 40px); }
  .nav { min-height: 68px; }
  .menu-toggle { display: block; z-index: 2; }
  .nav-links { position: absolute; top: 67px; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 12px 20px 20px; border-bottom: 1px solid var(--border); background: var(--bg); }
  .nav-links.is-open { display: flex; }
  .nav-links > a { padding: 11px 0; font-size: 13px; }
  .nav-links > a.active::after { display: none; }
  .theme-toggle { align-self: flex-start; margin-top: 8px; }
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 42px; padding-top: 68px; padding-bottom: 105px; }
  h1 { font-size: clamp(54px, 14vw, 76px); }
  .hero-visual { width: min(78%, 350px); justify-self: center; margin-right: 12px; }
  .scroll-cue { bottom: 34px; }
  .section { padding-block: 76px; }
  .section-grid, .contact-layout { grid-template-columns: 1fr; gap: 38px; }
  .section-intro h2, .section-heading h2 { font-size: 47px; }
  .section-heading { align-items: start; flex-direction: column; gap: 12px; margin-bottom: 32px; }
  .section-note { max-width: 330px; }
  .skills-grid, .projects-grid { grid-template-columns: 1fr; }
  .skill-group { min-height: 0; padding: 23px; }
  .cert-year-group { grid-template-columns: 70px 1fr; gap: 16px; }
  .cert-year { font-size: 20px; }
  .education-content h3 { font-size: 21px; }
  .contact-copy h2 { font-size: 48px; }
  .footer-inner { flex-wrap: wrap; }
  .footer-inner p { order: 3; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
