
:root {
  --bg: #fbf9f6;
  --surface: #ffffff;
  --tint: #f6efe6;
  --ink: #14243a;
  --navy: #173a63;
  --navy-deep: #0f2a4a;
  --muted: #4f5d6e;
  --line: #e7e1d8;
  --gold: #c8996b;
  --gold-ink: #8a5a2b;
  --gold-soft: #f3e8dc;
  --gold-on-navy: #e2b88d;
  --decode-flash: #d4a03c;

  --heading: var(--navy);
  --accent: var(--navy);
  --accent-strong: var(--navy-deep);
  --on-accent: #ffffff;
  --band: var(--navy);
  --chip-bg: #eef2f7;
  --client-ink: #64707f;
  --header-bg: rgba(251, 249, 246, .86);
  --hover-shadow: rgba(20, 36, 58, .16);
  --blob-1: rgba(200, 153, 107, .30);
  --blob-2: rgba(23, 58, 99, .16);
  --blob-3: rgba(68, 159, 246, .14);

  --font-head: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 22px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(20, 36, 58, .06), 0 12px 32px -12px rgba(20, 36, 58, .18);
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 9vw, 140px);
}

:root { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1520;
    --surface: #142030;
    --tint: #111b28;
    --ink: #e6ebf2;
    --muted: #a3b1c2;
    --line: #243346;
    --gold-ink: #e2b88d;
    --decode-flash: #ffc857;
    --gold-soft: #2a2218;
    --heading: #eef3f9;
    --accent: #2b5a8f;
    --accent-strong: #3567a3;
    --band: #13294a;
    --chip-bg: #1c2a3c;
    --client-ink: #8d9bad;
    --header-bg: rgba(13, 21, 32, .82);
    --hover-shadow: rgba(0, 0, 0, .55);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 34px -12px rgba(0, 0, 0, .65);
    --blob-1: rgba(200, 153, 107, .16);
    --blob-2: rgba(53, 103, 163, .22);
    --blob-3: rgba(68, 159, 246, .10);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1520;
  --surface: #142030;
  --tint: #111b28;
  --ink: #e6ebf2;
  --muted: #a3b1c2;
  --line: #243346;
  --gold-ink: #e2b88d;
  --decode-flash: #ffc857;
  --gold-soft: #2a2218;
  --heading: #eef3f9;
  --accent: #2b5a8f;
  --accent-strong: #3567a3;
  --band: #13294a;
  --chip-bg: #1c2a3c;
  --client-ink: #8d9bad;
  --header-bg: rgba(13, 21, 32, .82);
  --hover-shadow: rgba(0, 0, 0, .55);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 34px -12px rgba(0, 0, 0, .65);
  --blob-1: rgba(200, 153, 107, .16);
  --blob-2: rgba(53, 103, 163, .22);
  --blob-3: rgba(68, 159, 246, .10);
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.1875rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); color: var(--heading); margin: 0; line-height: 1.1; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 8px;
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 16px; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); height: 80px; }
.brand { margin-right: auto; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { display: block; width: 44px; height: 44px; flex: none; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--heading); }

.brand-pending .brand-name { opacity: 0; }
.brand { position: relative; }
.brand-mark { position: relative; z-index: 1; will-change: transform; }
.brand-name { position: relative; white-space: nowrap; line-height: 1.2; }
.brand-char { position: relative; display: inline-block; color: transparent; clip-path: inset(0 -.4em); }
.brand-reel {
  position: absolute; top: 0; left: 50%; display: flex; flex-direction: column; align-items: center;
  color: var(--gold-ink); user-select: none; -webkit-user-select: none;
  transform: translate(-50%, calc(var(--k) * -1.2em));
  transition: transform calc(var(--k) * 55ms) steps(var(--k), end) calc(var(--i) * 30ms),
              opacity .12s linear calc(var(--i) * 30ms);
}
.brand-reel > span { display: block; line-height: 1.2; }
.brand-reel > .brand-final { position: relative; color: var(--heading); }
.brand-flash {
  position: absolute; inset: 0; color: var(--decode-flash); opacity: 0;
  transition: opacity .3s linear calc(var(--i) * 30ms + var(--k) * 55ms);
}
.brand.is-compact .brand-reel {
  transform: translate(-50%, 0); opacity: 0;
  transition: transform .3s steps(var(--k), end) calc(var(--r) * 40ms),
              opacity .15s linear calc(var(--r) * 40ms + .3s);
}
.brand.is-compact .brand-flash { opacity: 1; transition: opacity 0s linear calc(var(--r) * 40ms + .3s); }
@media (hover: hover) {
  .brand.is-compact:hover .brand-reel {
    transform: translate(-50%, calc(var(--k) * -1.2em)); opacity: 1;
    transition: transform calc(var(--k) * 55ms) steps(var(--k), end) calc(var(--i) * 30ms),
                opacity .12s linear calc(var(--i) * 30ms);
  }
  .brand.is-compact:hover .brand-flash {
    opacity: 0; transition: opacity .3s linear calc(var(--i) * 30ms + var(--k) * 55ms);
  }
}
.brand.is-instant .brand-reel, .brand.is-instant .brand-flash { transition: none !important; }

.site-nav ul { display: flex; align-items: center; gap: clamp(12px, 2vw, 32px); list-style: none; margin: 0; padding: 0; }
.site-nav a {
  white-space: nowrap;
  text-decoration: none; font-weight: 500; font-size: 1rem; color: var(--muted);
  padding: 6px 2px; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.site-nav a:hover, .site-nav a[aria-current="true"] { color: var(--heading); border-bottom-color: var(--gold); }
.site-nav a.nav-cta {
  color: var(--on-accent); background: var(--accent); padding: 10px 20px; border-radius: 999px; border: 0;
}
.site-nav a.nav-cta:hover,
.site-nav a.nav-cta[aria-current="true"] { color: var(--on-accent); background: var(--accent-strong); }

.nav-toggle {
  display: none; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); cursor: pointer; place-items: center;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 20px; height: 2px; background: var(--heading); border-radius: 2px; position: relative;
  transition: transform .2s ease, background .2s ease;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 28px;
  border-radius: 999px; font-weight: 600; font-size: 1.0625rem; text-decoration: none;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 24px -10px rgba(23, 58, 99, .6); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: var(--surface); color: var(--heading); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--gold); }
.btn-meta {
  font-size: .75rem; font-weight: 700; letter-spacing: .08em; color: var(--gold-ink);
  background: var(--gold-soft); padding: 3px 8px; border-radius: 6px;
}

.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 112px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 6vw, 88px); align-items: center; }

.eyebrow {
  font-family: var(--font-head); font-weight: 700; font-size: clamp(.95rem, .85rem + .35vw, 1.15rem);
  letter-spacing: .08em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(3.25rem, 1.6rem + 6.4vw, 7.5rem); font-weight: 800; letter-spacing: -.035em;
  line-height: .98; margin-bottom: 28px;
}
.lead { font-size: clamp(1.2rem, 1.05rem + .55vw, 1.5rem); line-height: 1.55; color: var(--muted); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 36px 0 32px; }

.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; list-style: none; margin: 0; padding: 0; color: var(--muted); font-size: 1rem; }
.hero-meta li { display: inline-flex; align-items: center; gap: 10px; }
.dot {
  width: 10px; height: 10px; border-radius: 50%; background: #2f9e6a;
  box-shadow: 0 0 0 4px rgba(47, 158, 106, .18);
}

.hero-photo { position: relative; margin: 0; }
.hero-photo::before {
  content: ""; position: absolute; inset: 0; transform: translate(22px, 22px);
  border: 2px solid var(--gold); border-radius: calc(var(--radius) + 8px); z-index: 0;
}
.hero-photo img {
  position: relative; z-index: 1; width: 100%; aspect-ratio: 4 / 5; height: auto;
  object-fit: cover; object-position: 52% 28%; border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow);
}
.photo-card {
  position: absolute; z-index: 2; left: clamp(-36px, -3vw, -12px); bottom: 36px; max-width: 250px;
  background: var(--surface); border-radius: var(--radius-sm); padding: 18px 20px; box-shadow: var(--shadow);
  display: grid; gap: 2px; font-size: .95rem; line-height: 1.45; color: var(--muted);
}
.photo-card strong { font-family: var(--font-head); font-size: 1.6rem; color: var(--heading); }

.stats { padding-bottom: clamp(40px, 6vw, 80px); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { border-top: 2px solid var(--gold); padding-top: 18px; display: grid; gap: 4px; }
.stat-value { font-family: var(--font-head); font-weight: 800; font-size: clamp(2.5rem, 1.8rem + 2.4vw, 4rem); color: var(--heading); line-height: 1; letter-spacing: -.02em; }
.stat-label { color: var(--muted); font-size: 1rem; }

.clients { border-block: 1px solid var(--line); background: var(--surface); padding: 40px 0; }
.clients-title {
  font-family: var(--font-body); font-size: .85rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 18px;
}
.client-list { display: flex; flex-wrap: wrap; gap: 14px 34px; list-style: none; margin: 0; padding: 0; }
.client-list li {
  font-family: var(--font-head); font-weight: 700; font-size: clamp(1.05rem, .95rem + .4vw, 1.35rem);
  color: var(--client-ink); letter-spacing: -.01em;
}

.section { padding: var(--section) 0; }
.section-tint { background: var(--tint); }
.section-head { margin-bottom: clamp(36px, 5vw, 64px); }
.section-title {
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.75rem); font-weight: 800; letter-spacing: -.025em;
  position: relative; padding-bottom: 22px; margin-bottom: 20px;
}
.section-title::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 72px; height: 4px; border-radius: 4px; background: var(--gold);
}
.section-intro { color: var(--muted); font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); max-width: 52ch; margin: 0; }

.about-grid { display: grid; grid-template-columns: 1fr 1.8fr; gap: clamp(32px, 6vw, 96px); }
.about-hello { font-family: var(--font-head); font-size: clamp(1.4rem, 1.2rem + .8vw, 2rem); font-weight: 700; color: var(--gold-ink); }
.about-intro { font-family: var(--font-head); font-size: clamp(1.45rem, 1.2rem + 1vw, 2.1rem); line-height: 1.35; color: var(--heading); font-weight: 600; letter-spacing: -.01em; }
.about-text p { max-width: 62ch; }
.about-text p:not(.about-intro) { color: var(--muted); }
.facts { margin: 40px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 600; color: var(--heading); }
.facts dd { margin: 0; color: var(--muted); }

.focus-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 20px; }
.focus-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px 26px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.focus-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.focus-icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  background: var(--gold-soft); color: var(--gold-ink); font-weight: 700; font-size: 1.15rem; margin-bottom: 22px;
}
.focus-card h3 { font-size: 1.3rem; margin-bottom: 12px; }
.focus-card p { color: var(--muted); font-size: 1rem; margin: 0; }

.project-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.project {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(26px, 3vw, 40px); display: flex; flex-direction: column;
  border-top: 4px solid var(--navy);
}
.project-meta { display: grid; gap: 2px; font-size: .95rem; margin-bottom: 14px; }
.period { font-weight: 600; color: var(--gold-ink); }
.client { color: var(--muted); }
.project h3 { font-size: clamp(1.4rem, 1.2rem + .7vw, 1.8rem); margin-bottom: 18px; }
.project-points { margin: 0 0 24px; padding: 0; list-style: none; display: grid; gap: 10px; color: var(--muted); font-size: 1rem; }
.project-points li { position: relative; padding-left: 26px; }
.project-points li::before { content: "›"; position: absolute; left: 4px; top: -1px; color: var(--gold); font-weight: 700; font-size: 1.25rem; line-height: 1.4; }
.project .chips { margin-top: auto; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips li {
  font-size: .875rem; font-weight: 500; color: var(--heading); background: var(--chip-bg); border-radius: 999px; padding: 6px 13px;
}
.chips-lg li { font-size: 1rem; padding: 9px 16px; background: var(--surface); border: 1px solid var(--line); }
.chips-lg b { color: var(--gold-ink); font-weight: 700; margin-left: 4px; }

.more-projects { margin-top: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.more-projects summary {
  cursor: pointer; list-style: none; padding: 22px 28px; font-family: var(--font-head); font-weight: 700;
  font-size: 1.15rem; color: var(--heading); display: flex; justify-content: space-between; align-items: center;
}
.more-projects summary::-webkit-details-marker { display: none; }
.more-projects summary::after { content: "+"; font-size: 1.6rem; color: var(--gold-ink); transition: transform .2s; }
.more-projects[open] summary::after { transform: rotate(45deg); }
.more-list { list-style: none; margin: 0; padding: 0 28px 20px; }
.more-list li { display: grid; grid-template-columns: 190px 1fr; gap: 4px 20px; padding: 14px 0; border-top: 1px solid var(--line); color: var(--ink); }
.more-list span { color: var(--gold-ink); font-weight: 600; font-size: .95rem; }
.more-list em { grid-column: 2; font-style: normal; color: var(--muted); font-size: .95rem; }

.career-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.text-link { color: var(--heading); font-weight: 600; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 172px; top: 12px; bottom: 12px; width: 2px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 44px; padding: 0 0 36px; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: 166px; top: 9px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--gold);
}
.timeline li:first-child::before { background: var(--gold); }
.when { font-family: var(--font-head); font-weight: 700; color: var(--gold-ink); font-size: 1.05rem; text-align: right; padding-top: 2px; }
.timeline h3 { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.55rem); margin-bottom: 6px; }
.timeline p { color: var(--muted); margin: 0; }

.skill-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 48px; }
.skill-group h3 { font-size: 1.2rem; margin-bottom: 16px; }

.contact { background: var(--band); color: #fff; padding: var(--section) 0; position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%;
  border: 2px solid rgba(226, 184, 141, .35);
}
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: end; position: relative; }
.eyebrow-light { color: var(--gold-on-navy); }
.contact h2 { color: #fff; font-size: clamp(2.4rem, 1.5rem + 3.6vw, 4.5rem); font-weight: 800; letter-spacing: -.03em; margin-bottom: 24px; }
.contact-lead { color: #c9d5e3; font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); max-width: 44ch; margin: 0; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; }
.contact-list li { display: grid; gap: 2px; padding: 18px 0; border-bottom: 1px solid rgba(255, 255, 255, .16); font-size: clamp(1.15rem, 1rem + .5vw, 1.45rem); }
.contact-list li > span { font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-on-navy); font-weight: 600; }
.contact-list a { color: #fff; text-decoration: none; font-weight: 600; }
.contact-list a:hover { text-decoration: underline; text-decoration-color: var(--gold-on-navy); text-underline-offset: 6px; }
.contact-list .socials { display: flex; flex-wrap: wrap; gap: 12px; border-bottom: 0; padding-top: 24px; }
.socials a {
  font-size: 1rem; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; padding: 10px 20px;
}
.socials a:hover { background: rgba(255, 255, 255, .1); text-decoration: none; }

.site-footer { padding: 28px 0; font-size: .95rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 24px; }
.site-footer a { color: var(--muted); }

.legal { padding: clamp(48px, 7vw, 96px) 0 var(--section); }
.legal .container { max-width: 860px; }
.legal h1 { font-size: clamp(2.4rem, 1.6rem + 3vw, 3.75rem); font-weight: 800; letter-spacing: -.025em; margin-bottom: 40px; }
.legal h2 { font-size: clamp(1.3rem, 1.15rem + .5vw, 1.6rem); margin: 44px 0 14px; }
.legal p, .legal li { color: var(--muted); max-width: 70ch; }
.legal address { font-style: normal; color: var(--ink); font-size: 1.15rem; line-height: 1.7; }
.legal a { color: var(--heading); text-decoration-color: var(--gold); text-underline-offset: 4px; }
.legal .stand { margin-top: 48px; font-size: .95rem; }
.back-link { font-weight: 600; text-decoration: none; color: var(--heading); }
.back-link:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 6px; }

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .focus-card { transition: none; }
}

@media (max-width: 1060px) {
  .nav-toggle { display: grid; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 80px; background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px; display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { display: block; padding: 14px 0; font-size: 1.15rem; border-bottom: 1px solid var(--line); }
  .site-nav .nav-cta { margin-top: 16px; text-align: center; padding: 14px 20px; }
}

@media (max-width: 1080px) {
  .skill-groups { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { max-width: 520px; margin-right: 22px; }
  .lead { max-width: none; }
  .about-grid, .career-grid, .contact-grid { grid-template-columns: 1fr; }
  .project-list { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
}

@media (max-width: 640px) {
  .header-inner { height: 68px; }
  .site-nav { top: 68px; }
  .brand-name { font-size: 1.05rem; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .photo-card { left: 12px; bottom: 16px; max-width: 220px; padding: 14px 16px; }
  .skill-groups { grid-template-columns: 1fr; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .more-list li { grid-template-columns: 1fr; }
  .more-list em { grid-column: 1; }
  .timeline::before { left: 6px; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; padding-left: 34px; }
  .timeline li::before { left: 0; }
  .when { text-align: left; }
  .contact::before { display: none; }
}

.theme-toggle {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--heading);
  cursor: pointer; transition: border-color .2s, color .2s;
}
.theme-toggle:hover { border-color: var(--gold); color: var(--gold-ink); }
.theme-toggle svg { grid-area: 1 / 1; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
.theme-toggle.is-switching svg { animation: theme-spin .5s cubic-bezier(.2, .7, .2, 1); }
@keyframes theme-spin { from { transform: rotate(-120deg) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .theme-toggle.is-switching svg { animation: none; } }
@media (max-width: 1060px) {
  .theme-toggle { order: 2; }
  .nav-toggle { order: 3; }
}

.lang-switch {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--heading);
  font-family: var(--font-head); font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-decoration: none;
  transition: border-color .2s, color .2s;
}
.lang-switch:hover { border-color: var(--gold); color: var(--gold-ink); }
@media (max-width: 1060px) { .lang-switch { order: 2; } }
@media (max-width: 640px) {
  .header-inner { gap: 8px; }
  .lang-switch, .theme-toggle { width: 40px; height: 40px; }
  .back-link { display: none; }
}

.legal .error-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.legal .error-actions .btn-primary { color: var(--on-accent); }

.mail-btn, .tel-btn {
  appearance: none; border: 0; padding: 0; margin: 0; background: none; cursor: pointer;
  font: inherit; color: inherit; text-align: left;
}
.mail-text::before {
  content: attr(data-d) "\40" attr(data-u);
  display: inline-block; direction: rtl; unicode-bidi: bidi-override;
}
.tel-text::before {
  content: attr(data-a) attr(data-b);
  display: inline-block; direction: rtl; unicode-bidi: bidi-override; white-space: pre;
}
.contact-list .mail-btn, .contact-list .tel-btn { color: #fff; font-weight: 600; }
.contact-list .mail-btn:hover .mail-text, .contact-list .tel-btn:hover .tel-text { text-decoration: underline; text-decoration-color: var(--gold-on-navy); text-underline-offset: 6px; }
.legal .mail-btn, .legal .tel-btn { color: var(--heading); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
