:root {
  --bg: #f7f8fa;
  --surface: rgba(255,255,255,.64);
  --surface-solid: #ffffff;
  --text: #142334;
  --muted: #667487;
  --line: rgba(34,60,83,.12);
  --accent: #176a95;
  --accent-2: #1bb8d8;
  --accent-soft: rgba(23,106,149,.08);
  --shadow: 0 18px 55px rgba(33,58,80,.09);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --shell: min(1160px, calc(100% - 40px));
}

[data-theme="dark"] {
  --bg: #061521;
  --surface: rgba(9,31,47,.76);
  --surface-solid: #0a1f30;
  --text: #edf8ff;
  --muted: #9eb6c7;
  --line: rgba(143,211,238,.14);
  --accent: #5ecbff;
  --accent-2: #19d3e6;
  --accent-soft: rgba(55,190,235,.10);
  --shadow: 0 20px 60px rgba(0,14,28,.38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  line-height: 1.58;
  letter-spacing: -.01em;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; }
::selection { background: rgba(23,106,149,.18); }
.shell { width: var(--shell); margin-inline: auto; }

.ambient { position: fixed; z-index: -2; border-radius: 999px; filter: blur(26px); opacity: .18; pointer-events: none; }
.ambient-a { width: 420px; height: 420px; background: #86c9ee; right: -160px; top: 120px; }
.ambient-b { width: 440px; height: 440px; background: #74d7ee; left: -180px; top: 52vh; }

.site-header { position: sticky; top: 0; z-index: 50; padding: 14px 0; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(18px) saturate(140%); border-bottom: 1px solid transparent; }
.nav { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; font-weight: 840; }
.brand-wordmark { font-size: 13px; letter-spacing: .085em; line-height: 1; background: linear-gradient(118deg, var(--accent) 0%, var(--accent-2) 92%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 9px 11px; color: var(--muted); font-size: 13px; border-radius: 10px; transition: .18s ease; }
.nav-links a:hover { color: var(--text); background: var(--accent-soft); }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn, .lang-btn { border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; height: 38px; border-radius: 11px; }
.icon-btn { width: 38px; }
.lang-btn { padding: 0 11px; font-size: 12px; font-weight: 800; letter-spacing: .05em; }
.menu-btn { display: none; }

.hero { min-height: 82vh; display: grid; grid-template-columns: 1.15fr .72fr; gap: clamp(40px, 7vw, 88px); align-items: center; padding: 76px 0 72px; }
.hero-context { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.hero-role { margin: 0 0 20px; color: var(--accent); font-size: 13px; font-weight: 760; letter-spacing: .035em; text-transform: uppercase; }
h1 { margin: 0 0 24px; max-width: 860px; font-size: clamp(40px, 5.1vw, 62px); line-height: 1.01; letter-spacing: -.05em; }
h2 { margin: 0; font-size: clamp(29px, 3.2vw, 42px); line-height: 1.08; letter-spacing: -.038em; }
h3 { margin: 0; font-size: 20px; line-height: 1.25; letter-spacing: -.024em; }
.accent-text { background: linear-gradient(118deg, var(--accent) 0%, var(--accent-2) 88%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 720px; margin: 0; color: var(--muted); font-size: clamp(17px, 1.7vw, 20px); }
.hero-actions, .contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 17px; border-radius: 13px; border: 1px solid var(--line); font-size: 13px; font-weight: 760; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); box-shadow: 0 10px 24px rgba(28,62,85,.13); }
.btn.secondary { background: transparent; color: var(--text); }
.text-link { color: var(--accent); font-weight: 760; font-size: 13px; padding: 10px 5px; }

.profile-card { border: 1px solid var(--line); border-radius: var(--radius-xl); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(18px) saturate(135%); }
.portrait-frame { aspect-ratio: 4 / 4.6; overflow: hidden; background: #edf1f5; }
.portrait { width: 100%; height: 100%; object-fit: cover; object-position: 50% 26%; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.profile-copy { padding: 22px 24px 10px; }
.profile-copy h2 { font-size: 27px; }
.profile-copy .muted { margin: 10px 0 0; font-size: 14px; }
.micro, .kicker { margin: 0; color: var(--accent); text-transform: uppercase; letter-spacing: .11em; font-size: 11px; font-weight: 800; }
.metric-list { margin: 0; padding: 12px 24px 24px; display: grid; grid-template-columns: repeat(2,1fr); gap: 16px 18px; }
.metric-list > div { border-top: 1px solid var(--line); padding-top: 12px; }
.metric-list dt { font-weight: 820; font-size: 21px; letter-spacing: -.035em; }
.metric-list dd { margin: 2px 0 0; color: var(--muted); font-size: 11px; line-height: 1.35; }
.market-strip { display: flex; flex-wrap: wrap; gap: 9px 14px; border-top: 1px solid var(--line); margin: 0 24px; padding: 15px 0 24px; }
.market-strip span { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.market-strip img { width: 24px; height: 16px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(20,35,52,.09); }

.section { padding: 84px 0; }
.section-heading { max-width: 780px; margin-bottom: 34px; }
.section-heading .kicker { margin-bottom: 10px; }
.about-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 18px; }
.card, .metric, .case-card, .skill-card, .timeline-item, .contact-card { border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(16px) saturate(130%); }
.card { padding: 28px; border-radius: var(--radius-lg); }
.card p { margin: 0; color: var(--muted); font-size: 17px; }
.card p + p { margin-top: 16px; }
.metric-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.metric { min-height: 142px; border-radius: var(--radius-lg); padding: 23px; display: flex; flex-direction: column; justify-content: flex-end; }
.metric strong { font-size: 38px; letter-spacing: -.045em; }
.metric span { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.35; }

.timeline { display: grid; gap: 14px; }
.timeline-item { border-radius: var(--radius-lg); padding: clamp(24px, 3.5vw, 32px); display: grid; grid-template-columns: .82fr 1.7fr; gap: 36px; }
.timeline-side { align-self: start; }
.timeline-period { margin: 0 0 14px; color: var(--accent); font-size: 12px; font-weight: 780; letter-spacing: .04em; }
.company { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.timeline-item ul { margin: 0; padding-left: 20px; color: var(--muted); }
.timeline-item li + li { margin-top: 7px; }

.case-grid, .skills-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.case-card, .skill-card { border-radius: var(--radius-lg); padding: 26px; }
.case-card { min-height: 244px; display: flex; flex-direction: column; }
.case-type { margin: 0 0 18px; color: var(--accent); text-transform: uppercase; letter-spacing: .09em; font-size: 10px; font-weight: 800; }
.case-card h3 { font-size: 28px; }
.case-card > p:not(.case-type), .skill-card p { color: var(--muted); margin: 10px 0 0; }
.case-details { margin: 24px 0 0; display: grid; gap: 14px; }
.case-details > div { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.case-details dt { color: var(--accent); font-size: 10px; font-weight: 820; text-transform: uppercase; letter-spacing: .08em; }
.case-details dd { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.skill-card { min-height: 180px; }
.skill-card h3 { display: inline-block; background: linear-gradient(118deg, var(--accent) 0%, var(--accent-2) 95%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.case-link { color: var(--accent); font-weight: 760; }
.case-link:hover { color: var(--accent-2); }

.education-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.education-grid .card .micro { margin-bottom: 8px; }
.education-grid .card .muted { margin-top: 10px; font-size: 13px; }
.cert-row { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: 12px; }
.cert-row span::before { content: "•"; color: var(--accent); margin-right: 8px; }

.contact-card { border-radius: var(--radius-xl); padding: clamp(28px, 4.8vw, 50px); display: grid; grid-template-columns: .92fr 1.08fr; gap: clamp(34px, 6vw, 72px); align-items: start; }
.contact-card .muted { margin: 14px 0 0; max-width: 560px; font-size: 15px; }
.contact-list { border-top: 1px solid var(--line); }
.contact-row { min-height: 88px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 20px; align-items: center; border-bottom: 1px solid var(--line); }
.contact-row-link { transition: background .18s ease; }
.contact-row-link:hover { background: var(--accent-soft); }
.contact-meta { min-width: 0; padding: 16px 0; }
.contact-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .10em; }
.contact-value { min-height: 21px; margin: 0; color: var(--text); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.contact-value:empty::before { content: attr(data-empty); color: var(--muted); }
.contact-controls { display: inline-flex; align-items: center; gap: 12px; }
.contact-action { appearance: none; border: 0; background: transparent; padding: 8px 0; color: var(--accent); font: inherit; font-size: 12px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.contact-action:hover { color: var(--accent-2); }
.hidden { display: none !important; }
.footer { border-top: 1px solid var(--line); padding: 24px 0 42px; display: flex; justify-content: space-between; gap: 20px; font-size: 12px; }
.muted { color: var(--muted); }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s cubic-bezier(.2,.8,.2,1); }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
@media (max-width: 900px) {
  .nav-links { position: absolute; left: 20px; right: 20px; top: 72px; display: none; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-solid); box-shadow: var(--shadow); }
  .nav-links.open { display: grid; }
  .menu-btn { display: inline-grid; place-items: center; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 56px; }
  .profile-card { max-width: 560px; }
  .about-grid, .contact-card, .timeline-item { grid-template-columns: 1fr; }
  .timeline-item { gap: 22px; }
  .contact-row { grid-template-columns: 1fr auto; }
}
@media (max-width: 650px) {
  :root { --shell: min(100% - 24px, 1160px); }
  .site-header { padding: 8px 0; }
  .brand-wordmark { font-size: 11px; letter-spacing: .065em; }
  h1 { font-size: clamp(38px, 11vw, 54px); }
  h2 { font-size: clamp(29px, 8vw, 38px); }
  .hero { padding: 46px 0 38px; }
  .section { padding: 64px 0; }
  .case-grid, .skills-grid, .education-grid, .metric-grid { grid-template-columns: 1fr; }
  .metric-list { grid-template-columns: 1fr 1fr; }
  .hero-actions .btn { width: 100%; }
  .contact-row { grid-template-columns: 1fr; gap: 0; padding: 12px 0; }
  .contact-meta { padding: 4px 0; }
  .contact-controls { padding-bottom: 4px; }
  .footer { flex-direction: column; }
}

[data-theme="dark"] .ambient-a { background: #0d7db4; opacity: .24; }
[data-theme="dark"] .ambient-b { background: #12c6d8; opacity: .12; }
[data-theme="dark"] .profile-card,
[data-theme="dark"] .card,
[data-theme="dark"] .metric,
[data-theme="dark"] .case-card,
[data-theme="dark"] .skill-card,
[data-theme="dark"] .timeline-item,
[data-theme="dark"] .contact-card { box-shadow: 0 18px 55px rgba(0,15,31,.28); }
