:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-soft: #eef3f8;
  --text: #172033;
  --muted: #526071;
  --border: #d8e0e8;
  --accent: #1d5fa7;
  --accent-strong: #164a82;
  --focus: #c2410c;
  --success: #176b46;
  --warning: #7c4a03;
  --shadow: 0 12px 30px rgba(23, 32, 51, 0.08);
  --radius-sm: 10px;
  --radius: 16px;
  --max-width: 1120px;
  --measure: 72ch;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html.dark {
  color-scheme: dark;
  --bg: #0d1420;
  --surface: #131d2a;
  --surface-soft: #182536;
  --text: #edf3f8;
  --muted: #a9b6c5;
  --border: #334357;
  --accent: #75b7ff;
  --accent-strong: #a8d2ff;
  --focus: #ffb36b;
  --success: #71d5a6;
  --warning: #f2c879;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-strong); }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-160%);
  background: var(--text);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}
.skip-link:focus { transform: translateY(0); }
.container { width: min(100% - 32px, var(--max-width)); margin-inline: auto; }
.measure { max-width: var(--measure); }
.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
h1, h2, h3 { margin-top: 0; line-height: 1.16; letter-spacing: -0.025em; }
h1 { margin-bottom: 18px; font-size: clamp(2.35rem, 8vw, 4.65rem); }
h2 { margin-bottom: 16px; font-size: clamp(1.65rem, 4vw, 2.4rem); }
h3 { margin-bottom: 8px; font-size: clamp(1.08rem, 2vw, 1.3rem); }
p { margin: 0 0 16px; }
ul { margin: 0; padding-left: 1.25rem; }
li + li { margin-top: 8px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
@supports (backdrop-filter: blur(12px)) {
  .site-header { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); }
}
.nav-shell { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text); font-weight: 800; text-decoration: none; }
.brand img { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 50%; object-fit: cover; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.site-nav { display: none; position: absolute; inset: 68px 0 auto; max-height: calc(100vh - 68px); overflow-y: auto; border-bottom: 1px solid var(--border); background: var(--surface); padding: 12px 16px 18px; }
.site-nav.open { display: grid; }
.site-nav a { min-height: 44px; display: flex; align-items: center; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--text); font-weight: 650; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--surface-soft); color: var(--accent-strong); }
.icon-button {
  min-width: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.theme-button { padding-inline: 12px; }

main { min-height: 60vh; }
.hero { padding: clamp(56px, 9vw, 104px) 0 64px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.hero-photo { width: min(72vw, 280px); aspect-ratio: 1; border-radius: 28px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--surface-soft); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 34%; }
.hero-role { margin-bottom: 14px; color: var(--muted); font-size: clamp(1.05rem, 2.5vw, 1.3rem); font-weight: 700; }
.hero-summary { max-width: 68ch; font-size: clamp(1.05rem, 2.2vw, 1.22rem); }
.actions, .profile-links, .entry-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions { margin: 26px 0 20px; }
.profile-links a, .entry-links a { font-weight: 700; }
.profile-links { color: var(--muted); }
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font-weight: 800;
  text-decoration: none;
}
.button.primary { background: var(--accent); color: #fff; }
html.dark .button.primary { color: #09111c; }
.button.secondary { background: transparent; color: var(--accent-strong); }

.page-hero { padding: 64px 0 36px; border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(2.3rem, 6vw, 4rem); }
.page-hero p { max-width: 68ch; color: var(--muted); font-size: 1.1rem; }
.section { padding: clamp(52px, 7vw, 84px) 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 24px; margin-bottom: 26px; }
.section-heading > * { margin-bottom: 0; }
.section-intro { max-width: 68ch; color: var(--muted); }
.grid { display: grid; gap: 18px; }
.card, .record {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.card { padding: clamp(20px, 4vw, 28px); }
.card p:last-child, .record p:last-child { margin-bottom: 0; }
.record { padding: clamp(22px, 4vw, 32px); }
.record + .record { margin-top: 16px; }
.record-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; align-items: flex-start; }
.record-head h3 { max-width: 760px; }
.meta { margin-bottom: 10px; color: var(--muted); font-size: 0.94rem; }
.status { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--success); background: var(--surface-soft); font-size: 0.76rem; font-weight: 850; letter-spacing: 0.055em; text-transform: uppercase; white-space: nowrap; }
.status.pending { color: var(--warning); }
.theme-list { display: grid; gap: 20px; }
.theme-list article { padding-left: 18px; border-left: 3px solid var(--accent); }
.timeline { display: grid; gap: 0; }
.timeline article { display: grid; gap: 8px; padding: 24px 0; border-top: 1px solid var(--border); }
.timeline article:last-child { border-bottom: 1px solid var(--border); }
.timeline time { color: var(--muted); font-size: 0.9rem; font-weight: 750; }
.contact-panel { display: grid; gap: 18px; }
.contact-item { padding: 20px 0; border-top: 1px solid var(--border); }
.contact-item:last-child { border-bottom: 1px solid var(--border); }
.contact-item span { display: block; color: var(--muted); font-size: 0.88rem; font-weight: 750; }

.resume-viewer { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.viewer-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.resume-frame { width: 100%; height: max(520px, calc(100vh - 240px)); border: 0; }

.site-footer { border-top: 1px solid var(--border); padding: 38px 0; color: var(--muted); }
.footer-grid { display: grid; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.footer-links a { min-height: 44px; display: inline-flex; align-items: center; color: var(--text); font-weight: 700; }
.footer-note { margin: 0; font-size: 0.9rem; }
.not-found { min-height: 60vh; display: grid; place-items: center; padding: 64px 0; text-align: center; }
.not-found h1 { font-size: clamp(4rem, 18vw, 9rem); margin-bottom: 8px; }

@media (min-width: 480px) {
  .container { width: min(100% - 48px, var(--max-width)); }
  .timeline article { grid-template-columns: 145px 1fr; gap: 24px; }
}

@media (min-width: 768px) {
  .menu-button { display: none; }
  .site-nav { position: static; display: flex; max-height: none; overflow: visible; border: 0; background: transparent; padding: 0; }
  .site-nav a { padding-inline: 10px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 64px; }
  .hero-copy { order: 1; }
  .hero-photo { order: 2; width: 280px; }
  .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: minmax(240px, 1fr) 2fr; align-items: start; }
}

@media (max-width: 479px) {
  .brand-label { max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .theme-button { font-size: 0; }
  .theme-button::after { content: "Theme"; font-size: 0.82rem; }
  .resume-frame { height: 520px; }
}

@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; }
}

@media (forced-colors: active) {
  .button, .card, .record, .icon-button, .status { border: 1px solid ButtonText; }
  :focus-visible { outline-color: Highlight; }
}
