/* Inter (self-hosted, SIL Open Font License, see assets/fonts/OFL.txt) */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Fallback with Inter's metrics, so text doesn't shift when the web font arrives */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial'), local('Helvetica Neue'), local('Helvetica');
  size-adjust: 107.12%; ascent-override: 90.44%; descent-override: 22.52%; line-gap-override: 0%;
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #5b6474;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-soft: #eff4ff;
  --on-accent: #ffffff;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --radius: 14px;
  --max: 1080px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0f17;
  --bg-soft: #111723;
  --surface: #121926;
  --text: #e6e9ef;
  --text-muted: #98a2b3;
  --border: #222b3a;
  --accent: #6c9cff;
  --accent-soft: #16213a;
  --on-accent: #0b0f17;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: 'Inter', 'Inter Fallback', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; }
section + section { border-top: 1px solid var(--border); }
.section-label {
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
}
.section-title { font-size: 32px; font-weight: 700; margin-bottom: 40px; }

/* Skip link: visible only when focused with the keyboard */
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  padding: 10px 16px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-weight: 600;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; text-decoration: none; }
main:focus { outline: none; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 700; color: var(--text); font-size: 17px; }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--text-muted); font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--text-muted); }
.menu-btn { display: none; }
.lang-switch { display: inline-flex; height: 38px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.lang-switch button {
  border: none; background: transparent; color: var(--text-muted); font: inherit; font-size: 13px; font-weight: 600;
  padding: 0 10px; border-radius: 7px; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--text); color: var(--bg); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-outline { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-outline:hover { border-color: var(--text-muted); }

/* Hero */
.hero { padding: 96px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 56px; align-items: center; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; margin-bottom: 24px;
}
.dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
@keyframes ping { 0% { transform: scale(1); opacity: .55; } 75%, 100% { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #22c55e; animation: ping 2.4s cubic-bezier(0, 0, .2, 1) infinite; }
}
.hero h1 { font-size: 52px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; }
.hero h1 span { color: var(--text-muted); font-weight: 600; display: block; font-size: 30px; margin-top: 8px; letter-spacing: -0.01em; }
.hero p.lead { font-size: 18px; color: var(--text-muted); max-width: 600px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.social-btn { width: 44px; height: 44px; border-radius: 10px; }
.social-btn:hover { text-decoration: none; color: var(--accent); }
.hero-photo {
  width: 240px; height: 240px; border-radius: 28px; overflow: hidden;
  background: var(--bg-soft); border: 1px solid var(--border);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero h1 .wave {
  display: inline-block; font-size: inherit; color: inherit; margin: 0; letter-spacing: 0;
  transform-origin: 70% 70%; animation: wave 3s ease-in-out .6s infinite;
}
@keyframes wave {
  /* wave during the first half, then rest */
  0%, 50%, 100% { transform: rotate(0deg); }
  8%, 24% { transform: rotate(14deg); }
  16% { transform: rotate(-8deg); }
  32% { transform: rotate(-4deg); }
  40% { transform: rotate(10deg); }
}
.offline { margin-top: 28px; }
.offline h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.offline ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.offline li { font-size: 14px; padding: 6px 12px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 56px; }
.stat { padding: 20px 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.stat b { display: block; font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 4px; line-height: 1.4; color: var(--text-muted); font-size: 14px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; }
.about-grid p { color: var(--text-muted); font-size: 17px; }
.about-grid p + p { margin-top: 16px; }
.facts { align-self: start; list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.facts li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 20px; font-size: 15px; }
.facts li + li { border-top: 1px solid var(--border); }
.facts li span:first-child { color: var(--text-muted); white-space: nowrap; }
.facts li span:last-child { font-weight: 500; text-align: right; overflow-wrap: anywhere; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { display: grid; grid-template-columns: 200px 1fr; gap: 32px; padding: 24px 0; }
.tl-item + .tl-item { border-top: 1px solid var(--border); }
.tl-item[hidden] { display: none; }
.tl-date { color: var(--text-muted); font-size: 14px; font-weight: 500; padding-top: 2px; }
.tl-role { font-size: 18px; font-weight: 600; }
.tl-org { color: var(--accent); font-weight: 500; font-size: 15px; margin: 2px 0 8px; }
.tl-org a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.tl-org a:hover { border-bottom-color: currentColor; text-decoration: none; }
.tl-org a::after { content: " \2197"; font-size: .85em; opacity: .7; }
.modal-note { font-size: 14px; color: var(--text-muted); font-style: italic; margin-bottom: 14px; }
.tl-desc { color: var(--text-muted); font-size: 15px; }
.tl-tags { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tl-tags li { font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.tl-dur { display: block; font-size: 13px; font-weight: 400; opacity: .8; margin-top: 2px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.two-col .tl-item { grid-template-columns: 1fr; gap: 4px; }
.certs { margin-top: 56px; }
.cert-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cert-list li { padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.cert-name { font-weight: 600; }
.cert-meta { font-size: 14px; color: var(--text-muted); margin: 2px 0 6px; }
.cert-list a { font-size: 14px; font-weight: 500; }
@media (max-width: 720px) { .cert-list { grid-template-columns: 1fr; } }
.sub-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }

/* Projects */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: -16px 0 32px; }
.chip {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
}
.chip:hover { color: var(--text); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  display: flex; flex-direction: column; text-align: left;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); cursor: pointer; padding: 0; font: inherit; color: inherit;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card-img { aspect-ratio: 3 / 2; background: var(--bg-soft); border-bottom: 1px solid var(--border); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px 20px 20px; }
.card-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.card h3 { font-size: 17px; margin-bottom: 6px; }
.card p {
  font-size: 14px; color: var(--text-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card[hidden] { display: none; }
.card-tags { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.card-tags li { font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 6px; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-muted); }
.more-row { display: flex; justify-content: center; margin-top: 32px; }
.more-row .btn[hidden] { display: none; }

/* Modal */
.modal { border: none; padding: 0; border-radius: 18px; max-width: 760px; width: calc(100% - 32px); background: var(--surface); color: var(--text); }
.modal::backdrop { background: rgba(10, 14, 22, .6); backdrop-filter: blur(2px); }
.modal-img { background: var(--bg-soft); }
.modal-body { padding: 28px 32px 32px; }
.modal-body h3 { font-size: 24px; margin-bottom: 4px; }
.modal-role { color: var(--text-muted); font-size: 15px; margin-bottom: 16px; }
.modal-body p { color: var(--text-muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 24px; padding: 0; list-style: none; }
.tags li { font-size: 13px; padding: 4px 10px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.modal-links { display: flex; flex-wrap: wrap; gap: 10px; }
.modal-close { position: absolute; top: 14px; right: 14px; background: var(--surface); }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.skill-group { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.skill-group h3 { font-size: 16px; margin-bottom: 14px; }
.skill-group ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.skill-group li { font-size: 14px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-soft); }

/* Contact */
.contact-box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start;
  padding: 48px; border-radius: 20px; background: var(--bg-soft); border: 1px solid var(--border);
}
.contact-box h2 { font-size: 30px; margin-bottom: 12px; }
.contact-box p { color: var(--text-muted); font-size: 17px; }
.contact-list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
.contact-form {
  --form-gap: 16px;
  position: relative;
  padding: 28px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border);
  display: grid; gap: var(--form-gap);
}
.contact-form h3 { font-size: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; }
.field input, .field textarea {
  font: inherit; font-size: 15px; color: var(--text); background: var(--bg);
  padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border); width: 100%;
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #dc2626; }
.field .error { font-size: 13px; color: #dc2626; min-height: 0; }
.field .error:empty { display: none; }
.contact-form .btn { justify-content: center; width: 100%; }
.contact-box .reply-time { margin-top: 16px; font-size: 14px; color: var(--text-muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg); pointer-events: none;
}
.field select {
  appearance: none; -webkit-appearance: none; width: 100%; cursor: pointer;
  font: inherit; font-size: 15px; color: var(--text); background: var(--bg);
  padding: 11px 40px 11px 14px; border-radius: 10px; border: 1px solid var(--border);
}
.field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.turnstile:empty { display: none; }
/* Invisible Turnstile is taken out of the grid (no extra gap) until it needs the visitor to interact */
.turnstile.is-idle { position: absolute; left: 0; right: 0; height: 0; overflow: hidden; pointer-events: none; }
.form-status { font-size: 14px; text-align: center; }
.form-status:empty { display: none; }
.form-status.error { color: #dc2626; }
.form-status a { font-weight: 600; }
.contact-form .btn[disabled] { opacity: .7; cursor: progress; transform: none; }
.form-sent {
  padding: 36px 28px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border);
  display: grid; gap: 10px; justify-items: center; text-align: center; align-content: center;
}
.form-sent[hidden], .contact-form[hidden] { display: none; }
.form-sent-icon {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: #dcfce7; color: #15803d; font-size: 24px; font-weight: 700;
}
.form-sent h3 { font-size: 20px; }
.form-sent p { color: var(--text-muted); font-size: 15px; max-width: 320px; }
.form-sent .btn { margin-top: 8px; }
.contact-list a, .contact-list div {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 500; overflow-wrap: anywhere;
}
.contact-list a:hover { border-color: var(--accent); text-decoration: none; }
.contact-list svg { flex: none; color: var(--accent); }

footer { padding: 32px 0; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 14px; }
footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.socials { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.socials a { color: var(--text-muted); }
.socials a:hover { color: var(--text); }
.socials .private-link { display: inline-flex; align-items: center; opacity: .35; }
.socials .private-link:hover { opacity: 1; }

/* ---- Motion: hero entrance + reveal on scroll (disabled for reduced motion) ---- */
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { transform: scale(.96); } to { transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .hero .eyebrow, .hero h1, .hero p.lead, .hero-actions, .stats { animation: fade-up .6s cubic-bezier(.2, .7, .2, 1) both; }
  .hero h1 { animation-delay: .08s; }
  .hero p.lead { animation-delay: .16s; }
  .hero-actions { animation-delay: .24s; }
  .stats { animation-delay: .32s; }
  /* The photo is the largest paint, so it only settles in scale (no fade) */
  .hero-photo { animation: settle .7s cubic-bezier(.2, .7, .2, 1) both; }

  .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--reveal-delay, 0ms); }
  .reveal.in { opacity: 1; transform: none; }
}

/* ---- Nav: active section, shadow on scroll; theme icon swap ---- */
.nav { transition: box-shadow .25s ease, background-color .3s ease; }
.nav.scrolled { box-shadow: 0 6px 20px -12px rgba(15, 23, 42, .25); }
.nav-links a { position: relative; transition: color .2s ease; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px;
  background: var(--accent); transform: scaleX(0); transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}
.nav-links a.active { color: var(--text); }
.nav-links a.active::after { transform: scaleX(1); }
#themeBtn { position: relative; overflow: hidden; }
#themeBtn svg { position: absolute; transition: transform .4s cubic-bezier(.2, .7, .2, 1), opacity .3s ease; }
#themeBtn .icon-sun { transform: rotate(-90deg) scale(.5); opacity: 0; }
:root[data-theme="dark"] #themeBtn .icon-moon { transform: rotate(90deg) scale(.5); opacity: 0; }
:root[data-theme="dark"] #themeBtn .icon-sun { transform: none; opacity: 1; }
/* Smooth colour change only while switching theme */
:root.theme-anim, :root.theme-anim *, :root.theme-anim *::before, :root.theme-anim *::after {
  transition: background-color .35s ease, border-color .35s ease, color .35s ease, fill .35s ease !important;
}
@media (prefers-reduced-motion: reduce) {
  .nav-links a::after, #themeBtn svg { transition: none; }
}

/* ---- Cards, project modal and the "sent" check ---- */
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .card-img img { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
  .card:hover .card-img img { transform: scale(1.04); }
  .modal[open] { animation: modal-in .28s cubic-bezier(.2, .7, .2, 1); }
  .modal[open]::backdrop { animation: backdrop-in .28s ease; }
  .form-sent:not([hidden]) .form-sent-icon { animation: pop .45s cubic-bezier(.2, .7, .2, 1) both; }
  .form-sent:not([hidden]) .check { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .45s .2s ease-out forwards; }
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .about-grid, .two-col, .contact-box { grid-template-columns: 1fr; }
  .hero-photo { order: -1; width: 120px; height: 120px; border-radius: 20px; }
  .projects, .skills { grid-template-columns: repeat(2, 1fr); }
  .tl-item { grid-template-columns: 150px 1fr; gap: 20px; }
}
@media (max-width: 720px) {
  .hero-actions { gap: 8px; }
  .hero-actions .btn { padding: 11px 13px; font-size: 14px; }
  .social-btn { width: 40px; height: 40px; }
  .menu-btn { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 16px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 8px; font-size: 16px; }
  .nav-links a::after { display: none; }
  section { padding: 44px 0; }
  .container { padding: 0 16px; }
  .hero { padding: 28px 0 40px; }
  .hero-grid { gap: 20px; }
  .hero-photo { width: 84px; height: 84px; border-radius: 18px; }
  .hero .eyebrow { margin-bottom: 16px; }
  .hero h1 { font-size: 34px; margin-bottom: 12px; }
  .hero p.lead { margin-bottom: 24px; }
  .hero h1 span { font-size: 22px; }
  .hero p.lead { font-size: 16px; }
  .section-title { font-size: 24px; margin-bottom: 20px; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 28px; }
  .stat { padding: 14px; }
  .stat b { font-size: 22px; }
  .stat span { font-size: 12px; }
  .tl-item { grid-template-columns: 1fr; gap: 4px; padding: 16px 0; }
  .tl-dur { display: inline; margin: 0 0 0 6px; }
  .tl-dur::before { content: "· "; }
  .tl-org { margin-bottom: 6px; }
  .more-row { margin-top: 16px; }
  .about-grid { gap: 24px; }
  .about-grid p { font-size: 16px; }
  .about-grid p + p { display: none; }
  .offline { margin-top: 20px; }
  .facts { display: grid; grid-template-columns: 1fr 1fr; }
  .facts li { flex-direction: column; justify-content: flex-start; gap: 2px; padding: 12px 14px; font-size: 14px; border-bottom: 1px solid var(--border); }
  .facts li + li { border-top: none; }
  .facts li:nth-child(-n+4):nth-child(odd) { border-right: 1px solid var(--border); }
  .facts li:nth-child(n+5) { grid-column: 1 / -1; }
  .facts li:last-child { border-bottom: none; }
  .facts li span:first-child { font-size: 13px; }
  .facts li span:last-child { text-align: left; }
  .contact-list li:not(:first-child) { display: none; }
  .contact-box h2 { font-size: 24px; }
  .contact-box p { font-size: 16px; }
  .contact-list { margin-top: 20px; gap: 8px; }
  .contact-list a, .contact-list div { padding: 10px 14px; }
  .contact-form { padding: 20px; --form-gap: 12px; }
  .field-row { grid-template-columns: 1fr; }

  /* Horizontal sliders on phones: less vertical scrolling */
  .slider {
    display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding: 0 16px;
    margin: 0 -16px; padding: 4px 16px 12px;
    scrollbar-width: none;
  }
  .slider::-webkit-scrollbar { display: none; }
  .slider > * { scroll-snap-align: start; }
  .projects.slider > .card { flex: 0 0 82%; }
  .skills.slider > .skill-group { flex: 0 0 85%; padding: 20px; }
  .two-col.slider > div {
    flex: 0 0 88%; padding: 4px 20px 8px;
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  }
  .two-col.slider .sub-title { font-size: 17px; margin: 16px 0 0; }
  .two-col.slider .tl-item { padding: 14px 0; }
  #education .tl-desc { display: none; }
  .card:hover { transform: none; box-shadow: none; }
  .card:hover .card-img img { transform: none; }
  .filters {
    flex-wrap: nowrap; overflow-x: auto; margin: -8px -16px 16px; padding: 0 16px;
    scrollbar-width: none;
  }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  /* Phones: no box-in-a-box; the form is the only card */
  .contact-box { padding: 0; gap: 20px; background: none; border: 0; border-radius: 0; }
  .contact-box .reply-time { margin-top: 12px; }
  .contact-form { --form-gap: 14px; padding: 18px 16px; border-radius: 14px; box-shadow: var(--shadow); }
  .field { gap: 5px; }
  /* 16px prevents iOS Safari from zooming in when a field is focused */
  .field input, .field textarea, .field select { font-size: 16px; padding: 10px 12px; }
  .field select { padding-right: 38px; }
  .field textarea { min-height: 88px; }
  .modal-body { padding: 22px 20px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn { transition: none; }
  .hero h1 .wave { animation: none; }
}
