:root {
  --background: #f4f1ea;
  --surface: #fbfaf7;
  --foreground: #191815;
  --muted: #625f58;
  --border: #cbc6bb;
  --border-strong: #25231f;
  --accent: #b51f2e;
  --accent-dark: #901722;
  --accent-soft: #ead5d5;
  --focus: #1d4ed8;
  --max: 1160px;
  --radius-sm: 4px;
  --radius-md: 10px;
  --shadow-sheet: 0 24px 64px rgba(25, 24, 21, .18);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --z-header: 100;
  --z-backdrop: 110;
  --z-sheet: 120;
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--background);
  color: var(--foreground);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.nav-open { overflow: hidden; }

::selection { background: var(--accent); color: #fff; }

a { color: inherit; }

button,
a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button { font: inherit; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  transform: translateY(-150%);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
}

.skip-link:focus { transform: none; }

.shell {
  width: min(calc(100% - 32px), var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(244, 241, 234, .96);
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--foreground);
  color: #fff;
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 700;
}

.brand-name {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.brand-name span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .81rem;
  font-weight: 700;
}

.nav-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  color: #393630;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease;
}

.nav-links a:hover { background: rgba(25, 24, 21, .06); }

.nav-contact { display: inline-flex; }

.nav-resume {
  margin-left: 6px;
  background: var(--foreground);
  color: #fff !important;
}

.nav-resume:hover { background: var(--accent-dark) !important; }

.lang-switch {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  margin-left: 5px;
  border-left: 1px solid var(--border);
  padding-left: 10px;
}

.lang-switch > span { color: #99948a; }

.lang-option {
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
}

.lang-option:hover { background: rgba(25, 24, 21, .06); }
.lang-option.is-active { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

.nav-toggle,
.nav-backdrop { display: none; }

.hero {
  min-height: calc(100svh - 71px);
  padding-block: clamp(64px, 9vw, 120px) clamp(72px, 10vw, 128px);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .5fr);
  gap: clamp(48px, 8vw, 112px);
  align-items: end;
}

.eyebrow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  margin-bottom: 44px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.status { display: inline-flex; align-items: center; gap: 9px; }
.status i { width: 9px; height: 9px; background: var(--accent); border-radius: 50%; }
.location { color: var(--muted); }

.kicker,
.micro,
.section-index {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.kicker {
  max-width: 650px;
  margin: 0 0 20px;
  color: var(--accent);
}

.hero h1 {
  max-width: 850px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 6.1vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -.052em;
  line-height: .98;
}

.hero h1 em { color: var(--accent); font-weight: 400; }

.hero-copy {
  max-width: 680px;
  margin: 32px 0 0;
  color: #4e4b45;
  font-size: clamp(1rem, 1.3vw, 1.14rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 17px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: .8rem;
  font-weight: 800;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.btn-primary { background: var(--foreground); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface); }

.hero-card {
  position: relative;
  min-height: 390px;
  padding: 28px 0 0 28px;
  border-top: 1px solid var(--border-strong);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.hero-card::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  width: 8px;
  height: 8px;
  background: var(--accent);
}

.flag-line {
  width: 54px;
  height: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 44px;
}

.flag-line span:first-child { background: var(--accent); }
.flag-line span:last-child { background: var(--surface); }

.hero-card-number {
  position: absolute;
  top: 20px;
  right: 0;
  color: #a39e94;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.hero-card .micro { margin: 0 0 14px; color: var(--accent); }

.hero-card h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 2.5vw, 2.15rem);
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: 1.15;
}

.hero-card > p:not(.micro) { margin: 22px 0 32px; color: var(--muted); font-size: .9rem; }

.hero-card-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .1em;
}

.proof-strip {
  background: var(--foreground);
  color: #fff;
  border-bottom: 1px solid var(--foreground);
}

.proof-grid { display: grid; grid-template-columns: 1fr 1.1fr 1fr 1.2fr; }

.proof-item {
  min-height: 144px;
  padding: 24px clamp(20px, 3vw, 34px);
  border-left: 1px solid rgba(255, 255, 255, .19);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.proof-item:last-child { border-right: 1px solid rgba(255, 255, 255, .19); }
.proof-item strong { font-family: Georgia, "Times New Roman", serif; font-size: 2rem; font-weight: 400; line-height: 1; }
.proof-item strong span { color: #bdb8ae; font-family: Arial, Helvetica, sans-serif; font-size: .8rem; }
.proof-item p { margin: 10px 0 0; color: #c9c5bd; font-size: .76rem; line-height: 1.45; }
.proof-cta { background: var(--accent); }
.proof-cta p { margin-top: 0; color: #f0d9dc; }
.proof-cta a { margin-top: 7px; font-family: Georgia, "Times New Roman", serif; font-size: 1.05rem; text-underline-offset: 4px; }

.section,
.section-tinted { padding-block: clamp(80px, 10vw, 128px); }

.section-tinted { background: var(--surface); border-block: 1px solid var(--border); }

.section-head {
  display: grid;
  grid-template-columns: minmax(150px, .38fr) minmax(0, 1.62fr);
  gap: clamp(32px, 6vw, 80px);
  margin-bottom: clamp(44px, 7vw, 72px);
  align-items: start;
}

.section-index { margin: 5px 0 0; color: var(--accent); }

.section-head h2 {
  max-width: 740px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 4.5vw, 4rem);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: 1.02;
}

.section-head > div > p {
  max-width: 660px;
  margin: 20px 0 0;
  color: var(--muted);
}

.timeline { border-top: 1px solid var(--border-strong); }

.timeline-item {
  display: grid;
  grid-template-columns: minmax(150px, .38fr) minmax(0, 1.62fr);
  gap: clamp(32px, 6vw, 80px);
  padding: 36px 0 42px;
  border-bottom: 1px solid var(--border);
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.timeline-body .role-label { margin: 0 0 6px; color: var(--accent); font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }

.timeline-body h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 2.7vw, 2.35rem);
  font-weight: 400;
  letter-spacing: -.03em;
  line-height: 1.15;
}

.timeline-body > p:not(.role-label) { max-width: 760px; margin: 15px 0 0; color: #514e48; }

.tag-list {
  list-style: none;
  margin: 21px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.tag-list li { position: relative; color: var(--muted); font-size: .7rem; font-weight: 700; }
.tag-list li:not(:last-child)::after { content: "/"; position: absolute; right: -12px; color: #aaa49a; }

.cap-grid { border-top: 1px solid var(--border-strong); }

.cap-card {
  min-height: 0;
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(70px, .25fr) minmax(180px, .55fr) minmax(240px, 1.2fr) minmax(240px, 1fr);
  gap: clamp(18px, 3vw, 40px);
  align-items: start;
}

.cap-card > span { color: var(--accent); font-family: Georgia, "Times New Roman", serif; font-size: 1.1rem; }
.cap-card h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; font-weight: 400; line-height: 1.2; }
.cap-card p { margin: 0; color: var(--muted); }
.cap-keywords { color: #47443f; font-size: .68rem; font-weight: 800; letter-spacing: .05em; line-height: 1.7; text-transform: uppercase; }

.edu-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); gap: clamp(40px, 7vw, 88px); align-items: start; }
.edu-main { border-top: 1px solid var(--border-strong); }

.edu-card {
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(150px, .55fr) minmax(0, 1.45fr);
  gap: 28px;
}

.edu-card p { margin: 4px 0 0; color: var(--muted); }
.edu-card h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; font-weight: 400; line-height: 1.2; }
.edu-year { color: var(--accent); font-family: Georgia, "Times New Roman", serif; font-size: 1.1rem; }

.credentials { padding: 0; background: transparent; border: 0; border-top: 1px solid var(--border-strong); }
.credentials .micro { margin: 0; padding: 18px 0; color: var(--accent); border-bottom: 1px solid var(--border); }
.credentials ul { list-style: none; margin: 0; padding: 0; }
.credentials li { padding: 15px 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 48px 1fr; gap: 12px; font-size: .78rem; }
.credentials li strong { color: var(--accent); }
.credentials li span { color: #514e48; }

.portfolio-band {
  position: relative;
  overflow: hidden;
  padding-block: clamp(76px, 10vw, 120px);
  background: var(--accent);
  color: #fff;
}

.portfolio-band::after {
  content: "LAB";
  position: absolute;
  right: -1vw;
  bottom: -8vw;
  color: rgba(255, 255, 255, .07);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(10rem, 25vw, 24rem);
  line-height: 1;
}

.portfolio-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(150px, .38fr) minmax(0, 1.62fr); gap: clamp(32px, 6vw, 80px); }
.section-index.light, .micro.light { color: #f0c9cd; }
.portfolio-inner .micro { margin: 0 0 17px; }
.portfolio-inner h2 { max-width: 850px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.4rem, 5vw, 4.6rem); font-weight: 400; letter-spacing: -.05em; line-height: 1; }
.btn-white { margin-top: 31px; background: #fff; color: var(--foreground); border-color: #fff; }
.btn-white:hover { background: var(--foreground); color: #fff; border-color: var(--foreground); }

.contact-section { padding-block: clamp(80px, 10vw, 128px); }

.contact-card {
  display: grid;
  grid-template-columns: minmax(150px, .38fr) minmax(0, 1.62fr);
  column-gap: clamp(32px, 6vw, 80px);
  padding: 0;
  background: transparent;
  border: 0;
}

.contact-card > .section-index { grid-column: 1; grid-row: 1 / 4; }
.contact-card h2 { grid-column: 2; max-width: 840px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.3rem, 4.8vw, 4.4rem); font-weight: 400; letter-spacing: -.05em; line-height: 1.02; }
.contact-card > p:not(.section-index) { grid-column: 2; max-width: 660px; margin: 22px 0 36px; color: var(--muted); }
.contact-actions { grid-column: 2; border-top: 1px solid var(--border-strong); }

.contact-link {
  min-height: 78px;
  display: grid;
  grid-template-columns: 42px minmax(110px, .42fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background-color 180ms ease;
}

.contact-link:hover { background: rgba(255, 255, 255, .45); }

.contact-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--accent);
}

.contact-icon svg { width: 19px; height: 19px; fill: currentColor; }
.contact-label { color: var(--muted); font-size: .67rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.contact-link strong { font-family: Georgia, "Times New Roman", serif; font-size: clamp(.95rem, 2vw, 1.12rem); font-weight: 400; overflow-wrap: anywhere; }
.contact-link i { padding: 10px; color: var(--accent); font-style: normal; font-size: 1.15rem; }
.contact-link:hover strong { color: var(--accent); }

.site-footer { padding-block: 36px; background: var(--foreground); color: #fff; }
.footer-inner { display: flex; justify-content: space-between; gap: 28px; align-items: end; }
.footer-brand { font-size: .85rem; }
.footer-inner p { margin: 5px 0 0; color: #aaa69e; font-size: .74rem; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 18px; color: #aaa69e; font-size: .64rem; font-weight: 800; letter-spacing: .1em; }

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 350ms var(--ease), transform 350ms var(--ease);
}

.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1023px) {
  .nav-links { gap: 0; }
  .nav-links a { padding-inline: 8px; }
  .hero { grid-template-columns: minmax(0, 1.3fr) minmax(250px, .7fr); gap: 48px; }
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .proof-item:nth-child(2) { border-right: 1px solid rgba(255, 255, 255, .19); }
  .proof-item:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .19); }
  .cap-card { grid-template-columns: 54px minmax(180px, .65fr) minmax(0, 1.35fr); }
  .cap-keywords { grid-column: 2 / 4; }
}

@media (max-width: 767px) {
  html { scroll-padding-top: 70px; }
  .shell { width: min(calc(100% - 32px), var(--max)); }
  .nav-wrap { min-height: 64px; }

  .nav-toggle {
    position: relative;
    z-index: calc(var(--z-sheet) + 1);
    width: 44px;
    height: 44px;
    display: grid;
    place-content: center;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
  }

  .nav-toggle:hover { background: rgba(25, 24, 21, .06); }
  .nav-toggle span { width: 22px; height: 2px; display: block; margin: 3px; background: var(--foreground); transition: transform 180ms ease; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: var(--z-backdrop);
    display: block;
    visibility: hidden;
    opacity: 0;
    border: 0;
    background: rgba(25, 24, 21, .52);
    cursor: default;
    transition: opacity 160ms ease, visibility 160ms step-end;
  }

  .nav-backdrop.open { visibility: visible; opacity: 1; transition: opacity 220ms ease; }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    z-index: var(--z-sheet);
    width: min(86vw, 360px);
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    padding: 88px 20px 24px;
    transform: translateX(102%);
    visibility: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-sheet);
    transition: transform 240ms var(--ease), visibility 240ms step-end;
  }

  .nav-links.open { visibility: visible; transform: none; transition: transform 280ms var(--ease); }
  .nav-links a { min-height: 48px; padding-inline: 12px; border-bottom: 1px solid var(--border); border-radius: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.2rem; font-weight: 400; }
  .nav-resume { margin: 14px 0 0; padding-inline: 14px !important; border: 0 !important; border-radius: var(--radius-sm) !important; font-family: Arial, Helvetica, sans-serif !important; font-size: .8rem !important; font-weight: 800 !important; }
  .lang-switch { margin: 14px 0 0; padding: 0; border: 0; }

  .hero { min-height: 0; grid-template-columns: 1fr; gap: 64px; padding-block: 64px 72px; }
  .eyebrow-row { margin-bottom: 34px; }
  .hero h1 { font-size: clamp(2.85rem, 13.5vw, 4.4rem); }
  .hero-copy { margin-top: 25px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .hero-card { min-height: 330px; padding-left: 22px; }

  .proof-grid { grid-template-columns: 1fr; }
  .proof-item { min-height: 124px; border-right: 1px solid rgba(255, 255, 255, .19); border-top: 1px solid rgba(255, 255, 255, .19); }
  .proof-item:first-child { border-top: 0; }

  .section-head,
  .timeline-item,
  .portfolio-inner,
  .contact-card { grid-template-columns: 1fr; gap: 20px; }
  .section-head { margin-bottom: 44px; }
  .section-head h2 { font-size: clamp(2.2rem, 10.5vw, 3.2rem); }
  .timeline-item { padding: 30px 0 34px; }
  .timeline-meta { flex-direction: row; justify-content: space-between; }
  .tag-list { gap: 6px 16px; }

  .cap-card { grid-template-columns: 42px 1fr; gap: 14px 16px; padding: 27px 0; }
  .cap-card p,
  .cap-keywords { grid-column: 2; }

  .edu-layout { grid-template-columns: 1fr; gap: 52px; }
  .edu-card { grid-template-columns: 1fr; gap: 10px; }
  .portfolio-band::after { bottom: -4vw; }
  .portfolio-inner h2 { font-size: clamp(2.45rem, 11.5vw, 3.7rem); }

  .contact-card > .section-index,
  .contact-card h2,
  .contact-card > p:not(.section-index),
  .contact-actions { grid-column: 1; grid-row: auto; }
  .contact-card h2 { font-size: clamp(2.2rem, 10.5vw, 3.25rem); }
  .contact-card > p:not(.section-index) { margin: 0 0 22px; }
  .contact-link { grid-template-columns: 38px 1fr auto; gap: 2px 12px; padding-block: 13px; }
  .contact-icon { grid-row: 1 / 3; }
  .contact-label { grid-column: 2; align-self: end; }
  .contact-link strong { grid-column: 2; align-self: start; }
  .contact-link i { grid-column: 3; grid-row: 1 / 3; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 430px) {
  .brand-name { max-width: 130px; line-height: 1.25; }
  .hero h1 { font-size: clamp(2.7rem, 13.5vw, 3.65rem); }
  .contact-link strong { font-size: .9rem; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .nav-links { overflow-y: auto; padding-top: 66px; }
  .nav-links a { min-height: 44px; font-size: 1rem; }
  .nav-resume, .lang-switch { margin-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
