:root {
  --navy-950: #04111d;
  --navy-900: #071827;
  --navy-850: #0a2032;
  --navy-800: #0e2b42;
  --navy-700: #0e3a5a;
  --teal-500: #159a9c;
  --teal-400: #35b4b5;
  --gold-500: #c8a45d;
  --gold-400: #d7bb82;
  --warm-white: #f6f8fa;
  --blue-gray: #aab7c4;
  --ink: #102231;
  --danger: #cf5454;
  --success: #4ca97a;
  --header-height: 82px;
  --container: 1320px;
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-lg: 0 32px 80px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 18px 45px rgba(0, 0, 0, 0.18);
  --font-display: "Aptos Display", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Aptos", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html[data-theme="dark"] {
  --bg: var(--navy-950);
  --bg-deep: #020b13;
  --surface: #0a1d2e;
  --surface-strong: #0d263a;
  --surface-soft: rgba(255, 255, 255, 0.055);
  --surface-softer: rgba(255, 255, 255, 0.035);
  --text: var(--warm-white);
  --text-strong: #ffffff;
  --muted: var(--blue-gray);
  --line: rgba(205, 224, 238, 0.14);
  --line-strong: rgba(205, 224, 238, 0.24);
  --header-bg: rgba(4, 17, 29, 0.72);
  --header-solid: rgba(4, 17, 29, 0.96);
  --input: rgba(255, 255, 255, 0.055);
  --focus-ring: rgba(53, 180, 181, 0.38);
}

html[data-theme="light"] {
  --teal-500: #0e747c;
  --teal-400: #0e747c;
  --gold-500: #876625;
  --gold-400: #76591f;
  --bg: #f4f7f9;
  --bg-deep: #e7eef3;
  --surface: #ffffff;
  --surface-strong: #eef3f6;
  --surface-soft: rgba(14, 58, 90, 0.06);
  --surface-softer: rgba(14, 58, 90, 0.035);
  --text: #203441;
  --text-strong: #071827;
  --muted: #536978;
  --line: rgba(14, 58, 90, 0.14);
  --line-strong: rgba(14, 58, 90, 0.24);
  --header-bg: rgba(246, 248, 250, 0.78);
  --header-solid: rgba(246, 248, 250, 0.97);
  --input: #ffffff;
  --focus-ring: rgba(21, 154, 156, 0.26);
  --shadow-lg: 0 32px 80px rgba(14, 58, 90, 0.13);
  --shadow-md: 0 18px 45px rgba(14, 58, 90, 0.11);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 22px); }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 90% 8%, rgba(21, 154, 156, 0.11), transparent 26rem),
    radial-gradient(circle at 8% 15%, rgba(200, 164, 93, 0.08), transparent 24rem),
    var(--bg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.nav-open { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
address { font-style: normal; }
::selection { color: #06151f; background: var(--gold-400); }

:focus-visible {
  outline: 3px solid var(--teal-400);
  outline-offset: 3px;
  border-radius: 5px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 9999;
  transform: translateY(-160%);
  padding: 12px 18px;
  color: #071827;
  background: var(--warm-white);
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); }

.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.section { position: relative; padding: clamp(84px, 8vw, 132px) 0; }
.section-compact { padding: clamp(58px, 6vw, 88px) 0; }
.section-alt {
  background: linear-gradient(180deg, var(--surface-softer), transparent 18%, transparent 82%, var(--surface-softer));
  border-block: 1px solid var(--line);
}
section[id] { scroll-margin-top: calc(var(--header-height) + 18px); }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--header-height);
  color: var(--text);
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.is-scrolled {
  background: var(--header-solid);
  border-bottom-color: var(--line);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.12);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 18px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: max-content;
  text-decoration: none;
}
.brand-icon { width: 42px; height: 42px; color: var(--teal-400); }
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { color: var(--text-strong); font-size: 0.93rem; letter-spacing: 0.01em; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 0.7rem; }

.primary-nav { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 1.35vw, 22px); margin-inline: auto; }
.primary-nav a {
  position: relative;
  padding: 10px 1px;
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 5px;
  left: 0;
  height: 2px;
  background: var(--teal-400);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}
.primary-nav a:hover, .primary-nav a.is-active { color: var(--text-strong); }
.primary-nav a:hover::after, .primary-nav a.is-active::after { transform: scaleX(1); transform-origin: left; }

.header-actions { display: flex; align-items: center; gap: 8px; min-width: max-content; }
.control-button, .icon-button {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.control-button:hover, .icon-button:hover { background: var(--surface-strong); border-color: var(--line-strong); transform: translateY(-1px); }
.control-button svg, .icon-button svg { width: 18px; height: 18px; }
.control-button.icon-only { padding: 0; width: 44px; }
.theme-icon { width: 18px; height: 18px; }
html[data-theme="dark"] .theme-icon-moon, html[data-theme="light"] .theme-icon-sun { display: none; }
.nav-toggle { display: none; }

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.91rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.button:hover { transform: translateY(-2px); }
.button svg { width: 18px; height: 18px; flex: 0 0 auto; }
.button-primary { color: #f9ffff; background: linear-gradient(135deg, var(--teal-500), #0c747c); box-shadow: 0 14px 30px rgba(21, 154, 156, 0.2); }
.button-primary:hover { box-shadow: 0 18px 40px rgba(21, 154, 156, 0.3); }
.button-secondary { color: var(--text-strong); background: var(--surface-soft); border-color: var(--line); }
.button-secondary:hover { border-color: var(--teal-500); background: var(--surface-strong); }
.button-ghost { color: var(--text); background: transparent; border-color: var(--line); }
.button-ghost:hover { border-color: var(--gold-500); }
.button-gold { color: #17130c; background: linear-gradient(135deg, #d7bb82, #c8a45d); box-shadow: 0 16px 35px rgba(200, 164, 93, 0.2); }
.button-compact { min-height: 42px; padding: 10px 15px; font-size: 0.78rem; }

.hero {
  min-height: min(900px, 100svh);
  display: grid;
  align-items: center;
  padding-top: calc(var(--header-height) + clamp(46px, 6vw, 92px));
  padding-bottom: clamp(70px, 8vw, 110px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: var(--header-height) 0 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(53, 180, 181, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 180, 181, 0.045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}
.hero::after {
  content: "";
  position: absolute;
  width: 44rem;
  height: 44rem;
  top: 3rem;
  right: -15rem;
  border: 1px solid rgba(53, 180, 181, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 7rem rgba(53, 180, 181, 0.018), 0 0 0 14rem rgba(53, 180, 181, 0.012);
  pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr); gap: clamp(44px, 7vw, 104px); align-items: center; }
.eyebrow, .section-kicker {
  margin: 0 0 16px;
  color: var(--teal-400);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ""; width: 42px; height: 2px; background: linear-gradient(90deg, var(--gold-500), var(--teal-400)); }
h1, h2, h3 { color: var(--text-strong); font-family: var(--font-display); text-wrap: balance; }
h1 { margin: 0; max-width: 920px; font-size: clamp(2.7rem, 5.15vw, 5.7rem); line-height: 0.98; letter-spacing: -0.057em; }
.hero-role { margin: 24px 0 8px; color: var(--gold-400); font-size: clamp(1rem, 1.65vw, 1.32rem); font-weight: 850; letter-spacing: 0.015em; }
.hero-fields { margin: 0 0 22px; color: var(--text); font-size: clamp(0.98rem, 1.4vw, 1.12rem); font-weight: 650; }
.hero-value { max-width: 820px; margin: 0; color: var(--muted); font-size: clamp(1rem, 1.35vw, 1.18rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.social-links { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 26px; }
.social-links a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.84rem; font-weight: 750; text-decoration: none; transition: color 0.2s ease; }
.social-links a:hover { color: var(--text-strong); }
.social-links svg { width: 18px; height: 18px; color: var(--teal-400); }

.radar-card {
  position: relative;
  min-height: 580px;
  padding: 52px 42px 36px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(14, 58, 90, 0.82), rgba(6, 25, 40, 0.95));
  border: 1px solid rgba(120, 199, 207, 0.24);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}
html[data-theme="light"] .radar-card { color: #f6f8fa; background: linear-gradient(145deg, #0e3a5a, #071827); }
.radar-grid {
  position: absolute;
  width: 620px;
  height: 620px;
  top: -150px;
  left: 50%;
  z-index: -1;
  transform: translateX(-50%);
  border: 1px solid rgba(53, 180, 181, 0.2);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 49.7%, rgba(53, 180, 181, 0.13) 50%, transparent 50.3%),
    linear-gradient(transparent 49.7%, rgba(53, 180, 181, 0.13) 50%, transparent 50.3%),
    repeating-radial-gradient(circle, transparent 0 74px, rgba(53, 180, 181, 0.13) 75px 76px);
}
.radar-grid::after {
  content: "";
  position: absolute;
  inset: 50% 50% 0 0;
  background: linear-gradient(35deg, transparent 48%, rgba(53, 180, 181, 0.2));
  transform-origin: 100% 0;
}
.photo-frame { position: relative; width: min(100%, 390px); aspect-ratio: 1 / 1; margin-inline: auto; overflow: hidden; border: 1px solid rgba(246, 248, 250, 0.22); border-radius: 38% 38% 28px 28px; box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34); }
.photo-frame::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); pointer-events: none; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.identity-card { display: flex; align-items: flex-start; gap: 12px; margin-top: 26px; padding: 17px 18px; color: #f6f8fa; background: rgba(4, 17, 29, 0.56); border: 1px solid rgba(246, 248, 250, 0.14); border-radius: 16px; backdrop-filter: blur(14px); }
.identity-card strong, .identity-card span { display: block; }
.identity-card strong { font-size: 0.94rem; }
.identity-card span { margin-top: 3px; color: #b8c7d3; font-size: 0.77rem; }
.status-dot { width: 10px; height: 10px; margin-top: 6px; flex: 0 0 auto; background: #62d6af; border-radius: 50%; box-shadow: 0 0 0 6px rgba(98, 214, 175, 0.12); }
.coordinate { position: absolute; color: rgba(246, 248, 250, 0.48); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.68rem; letter-spacing: 0.08em; }
.coordinate-top { top: 24px; left: 28px; }
.coordinate-bottom { right: 28px; bottom: 13px; }
.scroll-indicator { position: absolute; left: 50%; bottom: 22px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-size: 0.65rem; font-weight: 800; letter-spacing: 0.14em; text-decoration: none; text-transform: uppercase; transform: translateX(-50%); }
.scroll-line { width: 1px; height: 30px; background: linear-gradient(var(--teal-400), transparent); }

.section-heading { max-width: 850px; margin-bottom: clamp(34px, 4vw, 58px); }
.section-heading h2 { margin: 0; font-size: clamp(2rem, 3.7vw, 4.1rem); line-height: 1.05; letter-spacing: -0.045em; }
.section-lead { margin: 20px 0 0; color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.13rem); }
.section-heading-row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 34px; }
.section-heading-row > div { max-width: 850px; }
.text-link { display: inline-flex; align-items: center; gap: 9px; color: var(--teal-400); font-weight: 850; text-decoration: none; white-space: nowrap; }
.text-link svg { width: 18px; height: 18px; transition: transform 0.2s ease; }
.text-link:hover svg { transform: translateX(4px); }

.strength-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.strength-card { min-height: 238px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); transition: transform 0.25s ease, border-color 0.25s ease; }
.strength-card:hover { transform: translateY(-6px); border-color: rgba(53, 180, 181, 0.46); }
.strength-card > svg { width: 36px; height: 36px; color: var(--teal-400); }
.strength-card:nth-child(3) > svg { color: var(--gold-400); }
.strength-card h3 { margin: 44px 0 10px; font-size: 1.15rem; }
.strength-card p { margin: 0; color: var(--muted); font-size: 0.93rem; }

.profile-layout { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(48px, 7vw, 100px); align-items: start; }
.sticky-heading { position: sticky; top: calc(var(--header-height) + 34px); margin-bottom: 0; }
.profile-pillars { display: grid; gap: 16px; }
.editorial-card { position: relative; min-height: 220px; padding: 34px 34px 32px 110px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.editorial-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: linear-gradient(var(--teal-400), var(--gold-500)); }
.editorial-card > svg { width: 34px; height: 34px; color: var(--teal-400); }
.editorial-card h3 { margin: 20px 0 8px; font-size: 1.35rem; }
.editorial-card p { margin: 0; color: var(--muted); }
.card-index { position: absolute; top: 27px; left: 28px; color: var(--gold-400); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.12em; }

.timeline { position: relative; max-width: 1120px; margin-inline: auto; }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 18px; width: 1px; background: linear-gradient(var(--teal-400), var(--line), var(--gold-500)); }
.timeline-item { display: grid; grid-template-columns: 36px minmax(170px, 0.28fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 42px); padding-bottom: 72px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker { position: relative; z-index: 1; display: flex; justify-content: center; padding-top: 4px; }
.timeline-marker span { width: 16px; height: 16px; background: var(--teal-400); border: 4px solid var(--bg); border-radius: 50%; box-shadow: 0 0 0 1px var(--teal-400), 0 0 0 8px rgba(21,154,156,.09); }
.timeline-meta { padding-top: 1px; }
.timeline-meta time { display: block; color: var(--gold-400); font-weight: 850; }
.timeline-type { display: inline-block; margin-top: 10px; padding: 5px 9px; color: var(--muted); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; font-size: 0.72rem; font-weight: 800; }
.timeline-content { padding: clamp(26px, 3vw, 42px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.timeline-content h3 { margin: 0; font-size: clamp(1.35rem, 2.15vw, 2rem); line-height: 1.18; }
.timeline-company { margin: 9px 0 24px; color: var(--teal-400); font-weight: 800; }
.clean-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.clean-list li { position: relative; padding-left: 22px; color: var(--muted); }
.clean-list li::before { content: ""; position: absolute; top: 0.72em; left: 0; width: 7px; height: 7px; background: var(--teal-500); border-radius: 50%; }
.clean-list-dense { gap: 8px; }
.experience-details { margin-top: 24px; border-top: 1px solid var(--line); }
.experience-details summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 15px; color: var(--text-strong); font-weight: 800; cursor: pointer; list-style: none; }
.experience-details summary::-webkit-details-marker { display: none; }
.summary-icon { width: 28px; height: 28px; display: grid; place-items: center; color: var(--teal-400); background: var(--surface-soft); border-radius: 50%; transition: transform 0.2s ease; }
.experience-details[open] .summary-icon { transform: rotate(45deg); }
.details-body { padding: 8px 0 4px; }

.specialty-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.specialty-card { padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.specialty-wide { grid-column: 1 / -1; }
.specialty-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 25px; }
.specialty-heading svg { width: 30px; height: 30px; color: var(--teal-400); }
.specialty-heading h3 { margin: 0; font-size: 1.3rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 9px; }
.tag-list span { padding: 8px 12px; color: var(--muted); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; font-size: 0.83rem; font-weight: 700; }

.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.project-card { display: grid; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); transition: transform 0.25s ease, border-color 0.25s ease; }
.project-card:hover { transform: translateY(-7px); border-color: rgba(53, 180, 181, 0.42); }
.project-featured { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
.project-media { overflow: hidden; background: var(--navy-900); aspect-ratio: 16 / 10; }
.project-featured .project-media { aspect-ratio: auto; min-height: 430px; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s ease; }
.project-card:hover .project-media img { transform: scale(1.025); }
.project-body { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(26px, 3vw, 40px); }
.project-category { display: inline-flex; margin-bottom: 14px; padding: 6px 10px; color: var(--teal-400); background: rgba(21, 154, 156, 0.08); border: 1px solid rgba(21, 154, 156, 0.2); border-radius: 999px; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.05em; text-transform: uppercase; }
.project-body h3 { margin: 0 0 12px; font-size: clamp(1.55rem, 2.6vw, 2.55rem); }
.project-body > p { margin: 0; color: var(--muted); }
.project-problem { margin: 22px 0 26px; padding-top: 19px; color: var(--muted); border-top: 1px solid var(--line); font-size: 0.9rem; }
.project-problem strong { color: var(--text-strong); }
.project-body .button, .project-body .text-link { margin-top: auto; }

.education-layout { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: clamp(50px, 8vw, 112px); align-items: start; }
.education-list { display: grid; }
.education-item { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 28px; padding: 32px 0; border-top: 1px solid var(--line); }
.education-item:last-child { border-bottom: 1px solid var(--line); }
.education-year { color: var(--gold-400); font-size: 0.88rem; font-weight: 900; letter-spacing: 0.04em; }
.education-item h3 { margin: 0 0 7px; font-size: clamp(1.18rem, 2vw, 1.6rem); }
.education-school { margin: 0 0 10px !important; color: var(--teal-400) !important; font-weight: 800; }
.education-item p { margin: 0; color: var(--muted); }

.cert-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cert-card { min-height: 250px; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.cert-card > svg { width: 32px; height: 32px; color: var(--gold-400); }
.cert-card h3 { margin: 30px 0 12px; font-size: 1.2rem; }
.cert-card p { margin: 0; color: var(--muted); }
.cert-wide { grid-column: 1 / -1; min-height: auto; display: grid; grid-template-columns: 48px minmax(220px, 0.55fr) minmax(0, 1fr); align-items: center; gap: 24px; }
.cert-wide h3 { margin: 0; }

.proposal-section { padding-top: clamp(74px, 7vw, 110px); padding-bottom: clamp(74px, 7vw, 110px); }
.proposal-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 44px; align-items: end; padding: clamp(38px, 6vw, 74px); overflow: hidden; color: #f6f8fa; background: linear-gradient(125deg, #0e3a5a, #071827 65%, #102a35); border: 1px solid rgba(53, 180, 181, 0.28); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); }
.proposal-copy { position: relative; z-index: 1; }
.proposal-card .section-kicker { color: #35b4b5; }
.proposal-card .section-lead { color: #c8d4de; }
.proposal-copy h2 { max-width: 970px; margin: 0; color: #f6f8fa; font-size: clamp(1.85rem, 3.6vw, 3.8rem); line-height: 1.08; letter-spacing: -0.04em; }
.proposal-list { display: flex; flex-wrap: wrap; gap: 14px 24px; margin: 34px 0 0; padding: 0; list-style: none; }
.proposal-list li { display: inline-flex; align-items: center; gap: 9px; color: #c8d4de; font-size: 0.88rem; }
.proposal-list svg { width: 17px; height: 17px; color: var(--teal-400); }
.proposal-card .button { position: relative; z-index: 1; max-width: 290px; }
.proposal-radar { position: absolute; width: 590px; height: 590px; right: -220px; top: -250px; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 66px, rgba(53,180,181,.13) 67px 68px); opacity: 0.8; }

.languages-section { padding-top: 20px; }
.language-layout { display: grid; grid-template-columns: minmax(250px, 1.2fr) repeat(2, minmax(220px, 0.6fr)); gap: 16px; align-items: stretch; }
.language-layout h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 3rem); }
.language-card { display: flex; align-items: center; gap: 18px; padding: 25px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.language-code { width: 52px; height: 52px; display: grid; place-items: center; flex: 0 0 auto; color: var(--text-strong); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 15px; font-weight: 900; }
.language-card h3 { margin: 0; font-size: 1.06rem; }
.language-card p { margin: 3px 0 0; color: var(--muted); font-size: 0.9rem; }

.contact-layout { display: grid; grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr); gap: clamp(44px, 7vw, 100px); align-items: start; }
.contact-copy .section-lead { max-width: 650px; }
.contact-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 34px; }
.contact-detail { display: flex; align-items: flex-start; gap: 13px; min-width: 0; padding: 17px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.contact-detail > svg { width: 22px; height: 22px; flex: 0 0 auto; margin-top: 2px; color: var(--teal-400); }
.contact-detail span, .contact-detail strong, .contact-detail a { display: block; min-width: 0; overflow-wrap: anywhere; }
.contact-detail span { color: var(--muted); font-size: 0.74rem; }
.contact-detail strong, .contact-detail a { margin-top: 3px; color: var(--text-strong); font-size: 0.88rem; font-weight: 800; text-decoration: none; }
.contact-detail a:hover { color: var(--teal-400); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.contact-actions .button { min-height: 44px; padding: 10px 14px; font-size: 0.78rem; }
.copy-status { min-height: 24px; margin-top: 9px; color: var(--teal-400); font-size: 0.83rem; }

.contact-form { padding: clamp(28px, 4vw, 46px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); }
.form-heading h3 { margin: 0; font-size: 1.65rem; }
.form-heading p { margin: 8px 0 28px; color: var(--muted); font-size: 0.91rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label { margin-bottom: 7px; color: var(--text-strong); font-size: 0.84rem; font-weight: 800; }
.field input, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--text);
  caret-color: var(--teal-400);
  background: var(--input);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
html[data-theme="light"] .field input, html[data-theme="light"] .field textarea { color: var(--text-strong); }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--teal-500); box-shadow: 0 0 0 4px var(--focus-ring); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-error { min-height: 20px; padding-top: 4px; color: var(--danger); font-size: 0.74rem; }
.checkbox-field { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 10px; align-items: start; }
.checkbox-field input { width: 20px; min-height: 20px; margin: 3px 0 0; accent-color: var(--teal-500); }
.checkbox-field label { margin: 0; color: var(--muted); font-weight: 600; }
.checkbox-field label a { color: var(--teal-400); }
.checkbox-field .field-error { grid-column: 2; }
.honeypot { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; }
.submit-button { margin-top: 8px; }
.submit-button[disabled] { cursor: wait; opacity: 0.68; transform: none; }
.form-note { margin: 14px 0 0; color: var(--muted); font-size: 0.73rem; }
.form-status { min-height: 24px; margin-top: 10px; padding: 0; border-radius: 10px; font-size: 0.84rem; }
.form-status.is-success, .form-status.is-error { padding: 11px 13px; }
.form-status.is-success { color: #dff8ea; background: rgba(76, 169, 122, 0.18); border: 1px solid rgba(76, 169, 122, 0.38); }
html[data-theme="light"] .form-status.is-success { color: #195c3a; }
.form-status.is-error { color: #ffe3e3; background: rgba(207, 84, 84, 0.16); border: 1px solid rgba(207, 84, 84, 0.38); }
html[data-theme="light"] .form-status.is-error { color: #8f2828; }

.site-footer { padding: 54px 0 24px; background: var(--bg-deep); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 0.7fr 0.8fr; gap: 40px; align-items: start; }
.footer-brand { display: flex; gap: 16px; }
.footer-brand > svg { width: 44px; height: 44px; flex: 0 0 auto; color: var(--teal-400); }
.footer-brand strong { color: var(--text-strong); }
.footer-brand p { max-width: 470px; margin: 7px 0 0; color: var(--muted); font-size: 0.86rem; }
.footer-nav { display: grid; gap: 8px; }
.footer-nav a { color: var(--muted); font-size: 0.84rem; text-decoration: none; }
.footer-nav a:hover { color: var(--text-strong); }
.footer-actions { display: grid; justify-items: start; gap: 8px; }
.text-button { display: inline-flex; align-items: center; gap: 8px; padding: 4px 0; color: var(--muted); background: none; border: 0; cursor: pointer; font-size: 0.84rem; text-decoration: none; }
.text-button:hover { color: var(--text-strong); }
.text-button svg { width: 17px; height: 17px; color: var(--teal-400); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; margin-top: 42px; padding-top: 20px; color: var(--muted); border-top: 1px solid var(--line); font-size: 0.76rem; }

.back-to-top { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 800; width: 48px; height: 48px; display: grid; place-items: center; color: #fff; background: var(--navy-700); border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: var(--shadow-md); cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(16px); transition: opacity .2s ease, transform .2s ease; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top svg { width: 20px; height: 20px; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 1100; max-width: min(420px, calc(100% - 32px)); padding: 11px 16px; color: #fff; background: #0e3a5a; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; box-shadow: var(--shadow-md); font-size: 0.84rem; font-weight: 750; opacity: 0; pointer-events: none; transform: translate(-50%, 18px); transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.65s cubic-bezier(.2,.65,.25,1), transform 0.65s cubic-bezier(.2,.65,.25,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Portfolio */
.subpage-hero { min-height: 550px; display: grid; align-items: end; padding: calc(var(--header-height) + 90px) 0 76px; background: linear-gradient(130deg, rgba(14,58,90,.52), transparent 60%); border-bottom: 1px solid var(--line); }
.subpage-hero h1 { max-width: 1000px; font-size: clamp(2.55rem, 5vw, 5.4rem); }
.subpage-hero .section-lead { max-width: 820px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; color: var(--muted); font-size: 0.82rem; }
.breadcrumb a { color: var(--teal-400); text-decoration: none; }
.filter-toolbar { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 32px; }
.filter-button { min-height: 44px; padding: 9px 14px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 800; font-size: 0.8rem; }
.filter-button:hover, .filter-button.is-active { color: #fff; background: var(--navy-700); border-color: var(--teal-500); }
.portfolio-grid { display: grid; gap: 28px; }
.case-study { display: grid; grid-template-columns: minmax(360px, .92fr) minmax(0, 1.08fr); gap: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); }
.case-study[hidden] { display: none; }
.case-media { min-height: 100%; background: var(--navy-900); }
.case-media img { width: 100%; height: 100%; object-fit: cover; }
.case-content { padding: clamp(30px, 4.5vw, 58px); }
.case-content h2 { margin: 10px 0 10px; font-size: clamp(2rem, 3.5vw, 3.3rem); }
.case-intro { margin: 0 0 28px; color: var(--muted); font-size: 1.02rem; }
.case-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.case-block { padding-top: 16px; border-top: 1px solid var(--line); }
.case-block h3 { margin: 0 0 8px; color: var(--teal-400); font-size: .79rem; letter-spacing: .08em; text-transform: uppercase; }
.case-block p, .case-block ul { margin: 0; color: var(--muted); font-size: .9rem; }
.case-block ul { padding-left: 18px; }
.case-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.filter-status { min-height: 24px; margin-bottom: 12px; color: var(--muted); font-size: .82rem; }

/* Privacy / 404 */
.content-page { padding: calc(var(--header-height) + 74px) 0 100px; }
.content-shell { max-width: 900px; padding: clamp(28px, 5vw, 58px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); }
.content-shell h1 { font-size: clamp(2.4rem, 5vw, 4.7rem); }
.content-shell h2 { margin-top: 38px; font-size: 1.45rem; }
.content-shell p, .content-shell li { color: var(--muted); }
.error-page { min-height: 100svh; display: grid; place-items: center; padding: 36px 0; }
.error-code { color: var(--teal-400); font-size: clamp(5rem, 18vw, 13rem); font-weight: 900; line-height: .8; letter-spacing: -.07em; }
.error-page h1 { margin: 24px 0 12px; font-size: clamp(2rem, 4vw, 4rem); }
.error-page p { max-width: 640px; margin: 0 auto 28px; color: var(--muted); }

@media (max-width: 1240px) {
  .header-cv span { display: none; }
  .header-cv { width: 42px; padding: 0; }
  .primary-nav { gap: 12px; }
}

@media (max-width: 1120px) {
  :root { --header-height: 74px; }
  .nav-toggle { display: inline-flex; order: 3; margin-left: auto; }
  .header-actions { order: 2; margin-left: auto; }
  .nav-toggle { order: 3; margin-left: 0; }
  .primary-nav {
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: 0;
    max-height: calc(100svh - var(--header-height));
    display: grid;
    align-content: start;
    gap: 0;
    padding: 18px 20px 28px;
    overflow-y: auto;
    background: var(--header-solid);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 26px 50px rgba(0,0,0,.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  }
  .primary-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .primary-nav a { min-height: 48px; display: flex; align-items: center; padding: 10px 4px; font-size: .92rem; border-bottom: 1px solid var(--line); }
  .primary-nav a::after { display: none; }
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(330px, .9fr); gap: 42px; }
  .strength-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-layout, .education-layout { grid-template-columns: 1fr; }
  .sticky-heading { position: static; }
  .contact-layout { grid-template-columns: 1fr; }
  .contact-copy { max-width: 900px; }
  .language-layout { grid-template-columns: 1fr 1fr; }
  .language-layout > div:first-child { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { max-width: 780px; }
  .hero-visual { max-width: 570px; width: 100%; margin-inline: auto; }
  .radar-card { min-height: auto; }
  .scroll-indicator { display: none; }
  .project-featured { grid-template-columns: 1fr; }
  .project-featured .project-media { min-height: 0; aspect-ratio: 16 / 10; }
  .timeline-item { grid-template-columns: 36px 1fr; gap: 18px; }
  .timeline-meta { grid-column: 2; }
  .timeline-content { grid-column: 2; }
  .proposal-card { grid-template-columns: 1fr; align-items: start; }
  .proposal-card .button { max-width: none; justify-self: start; }
  .case-study { grid-template-columns: 1fr; }
  .case-media { aspect-ratio: 16 / 9; }
}

@media (max-width: 720px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  .header-inner { gap: 8px; }
  .brand-copy { display: none; }
  .header-actions { gap: 6px; }
  .header-contact { display: none; }
  .control-button { padding: 0; width: 42px; }
  .control-button > span:not([data-language-label]) { display: none; }
  .hero { padding-top: calc(var(--header-height) + 42px); }
  h1 { font-size: clamp(2.55rem, 13vw, 4.35rem); }
  .hero-actions .button { flex: 1 1 calc(50% - 10px); }
  .social-links { gap: 10px 14px; }
  .radar-card { padding: 46px 22px 28px; border-radius: 26px; }
  .photo-frame { border-radius: 33% 33% 22px 22px; }
  .strength-grid, .specialty-grid, .projects-grid, .cert-grid, .contact-details, .form-grid { grid-template-columns: 1fr; }
  .specialty-wide, .project-featured, .cert-wide, .field-full { grid-column: auto; }
  .strength-card { min-height: 210px; }
  .editorial-card { padding: 78px 24px 26px; }
  .card-index { top: 24px; left: 24px; }
  .editorial-card > svg { position: absolute; top: 22px; right: 24px; }
  .timeline::before { left: 10px; }
  .timeline-item { grid-template-columns: 21px 1fr; gap: 12px; }
  .timeline-marker { justify-content: flex-start; }
  .timeline-marker span { width: 14px; height: 14px; }
  .timeline-content { padding: 24px; }
  .cert-wide { display: block; }
  .cert-wide h3 { margin: 26px 0 12px; }
  .section-heading-row { align-items: flex-start; flex-direction: column; }
  .language-layout { grid-template-columns: 1fr; }
  .language-layout > div:first-child { grid-column: auto; }
  .proposal-list { display: grid; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
  .case-sections { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .container { width: min(calc(100% - 22px), var(--container)); }
  .brand-icon { width: 38px; height: 38px; }
  .header-cv { display: none; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .button { width: 100%; }
  .social-links a span { display: none; }
  .social-links a { width: 44px; height: 44px; justify-content: center; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 50%; }
  .radar-card { padding-inline: 16px; }
  .identity-card { padding: 14px; }
  .coordinate-bottom { display: none; }
  .strength-card, .specialty-card, .cert-card { padding: 24px; }
  .education-item { grid-template-columns: 1fr; gap: 8px; }
  .proposal-card { padding: 30px 24px; border-radius: 24px; }
  .contact-form { padding: 24px 18px; border-radius: 24px; }
  .contact-actions .button { flex: 1 1 calc(50% - 9px); }
  .toast { bottom: 82px; border-radius: 14px; text-align: center; }
}

@media (min-width: 1680px) {
  :root { --container: 1480px; }
  .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(430px, .75fr); }
  .radar-card { min-height: 630px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.text-center { text-align: center; }
.justify-center { justify-content: center; }
