:root {
  color-scheme: light;
  --ink: #171514;
  --ink-soft: #24211f;
  --paper: #f7f3ee;
  --paper-warm: #eee7de;
  --white: #fffdf9;
  --text: #302d2a;
  --muted: #746e68;
  --line: rgba(48, 45, 42, 0.16);
  --accent: #d8681c;
  --accent-bright: #f28a3d;
  --aqua: #42b9b1;
  --max-width: 1160px;
  --shadow: 0 26px 80px rgba(26, 19, 14, 0.2);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--white);
  color: var(--ink);
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(12, 11, 11, 0.88) 0%, rgba(12, 11, 11, 0.62) 48%, rgba(12, 11, 11, 0.32) 100%),
    linear-gradient(0deg, rgba(12, 11, 11, 0.35), rgba(12, 11, 11, 0.12)),
    url("header-background.jpg") center center / cover no-repeat;
  color: var(--white);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 22%;
  background: linear-gradient(transparent, rgba(12, 11, 11, 0.52));
  pointer-events: none;
}

.site-nav {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(13, 12, 12, 0.3);
  backdrop-filter: blur(12px);
}

.nav-inner {
  width: min(calc(100% - 3rem), var(--max-width));
  height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-brand {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
}

.nav-links > a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 150ms ease;
}

.nav-links > a:hover {
  color: var(--accent-bright);
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.22rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.language-switcher a,
.language-switcher span {
  min-width: 2rem;
  padding: 0.28rem 0.45rem;
  border-radius: 999px;
  text-align: center;
  text-decoration: none;
}

.language-switcher [aria-current="page"] {
  background: var(--accent);
  color: var(--white);
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 42px;
  padding: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
  color: white;
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  background: currentColor;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 3rem), var(--max-width));
  margin: 0 auto;
  padding: clamp(9rem, 18vh, 13rem) 0 8rem;
}

.eyebrow,
.section-kicker {
  margin: 0 0 1.25rem;
  color: var(--accent-bright);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 920px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.25rem, 10vw, 8.5rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.9;
  text-wrap: balance;
}

.hero-statement {
  max-width: 780px;
  margin: clamp(1.8rem, 4vw, 3rem) 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 3.5vw, 3rem);
  line-height: 1.2;
  text-wrap: balance;
}

.hero-intro {
  max-width: 700px;
  margin: 1.4rem 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(1rem, 1.5vw, 1.16rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0.72rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--accent);
  color: white;
}

.button-primary:hover {
  background: var(--accent-bright);
}

.button-ghost {
  border-color: rgba(255, 255, 255, 0.44);
  color: white;
}

.button-ghost:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.09);
}

.hero-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
}

.hero-links a {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.9rem;
  text-decoration: none;
}

.hero-links a:hover {
  color: white;
}

.scroll-cue {
  position: absolute;
  right: clamp(1.5rem, 5vw, 5rem);
  bottom: 2.2rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  color: white;
  font-size: 1.35rem;
  text-decoration: none;
}

.section {
  padding: clamp(5rem, 10vw, 9rem) 0;
}

.section-inner {
  width: min(calc(100% - 3rem), var(--max-width));
  margin: 0 auto;
}

.section h2 {
  max-width: 900px;
  margin: 0 0 clamp(2rem, 5vw, 4.5rem);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 5vw, 4.6rem);
  font-weight: 500;
  letter-spacing: -0.038em;
  line-height: 1.06;
  text-wrap: balance;
}

.section h3 {
  margin: 0 0 0.8rem;
  color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.25;
}

.section p {
  max-width: 740px;
}

.section-dark {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
}

.section-dark h2,
.section-dark h3 {
  color: var(--white);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(190px, 0.42fr) minmax(0, 1.58fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 8rem);
}

.portrait-wrap {
  position: relative;
  width: 100%;
  max-width: 260px;
  justify-self: center;
}

.portrait-wrap::before {
  content: "";
  position: absolute;
  inset: 1rem -1rem -1rem 1rem;
  border: 1px solid rgba(216, 104, 28, 0.7);
  border-radius: 3px;
}

.portrait {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  border-radius: 3px;
  box-shadow: var(--shadow);
}

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

.timeline-item {
  display: grid;
  grid-template-columns: minmax(190px, 0.34fr) minmax(0, 1fr);
  gap: clamp(2rem, 7vw, 7rem);
  padding: clamp(2.8rem, 5vw, 4.5rem) 0;
  border-bottom: 1px solid var(--line);
}

.timeline-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.timeline-meta .company {
  margin-bottom: 0.35rem;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline-content > p {
  margin-top: 0;
}

.timeline-content ul {
  margin: 1.4rem 0;
  padding: 0;
  list-style: none;
}

.timeline-content li {
  position: relative;
  margin: 0.65rem 0;
  padding-left: 1.35rem;
}

.timeline-content li::before {
  content: "";
  position: absolute;
  top: 0.72rem;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--aqua);
}

.role-history {
  color: var(--muted);
  font-size: 0.92rem;
  font-style: italic;
}

.stack {
  display: inline-block;
  margin: 0.5rem 0 0;
  padding: 0.45rem 0.7rem;
  border-left: 3px solid var(--accent);
  background: rgba(216, 104, 28, 0.08);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
}

.stack-muted {
  border-left-color: var(--muted);
  background: rgba(48, 45, 42, 0.05);
  color: var(--muted);
}

.section-tinted {
  background: var(--paper-warm);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(48, 45, 42, 0.12);
  background: rgba(48, 45, 42, 0.12);
}

.skill-card {
  min-height: 310px;
  padding: clamp(1.7rem, 4vw, 3.2rem);
  background: var(--paper);
}

.skill-number {
  margin: 0 0 2.5rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.secondary-skill {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 5vw, 5rem);
}

.education-grid article {
  padding-top: 1.5rem;
  border-top: 3px solid var(--aqua);
}

.education-date {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.contact-section {
  background: var(--ink-soft);
  color: rgba(255, 255, 255, 0.68);
}

.contact-section h2 {
  color: var(--white);
  margin-bottom: 1rem;
}

.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  align-items: end;
  gap: clamp(3rem, 9vw, 9rem);
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
}

.contact-links a,
.contact-links button {
  color: white;
  font-size: clamp(1rem, 2vw, 1.25rem);
  text-decoration-color: var(--accent);
}

.contact-links button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--accent);
  background: transparent;
  font-family: inherit;
  line-height: inherit;
  cursor: pointer;
}

.contact-links button:hover {
  color: var(--accent-bright);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.4rem max(1.5rem, calc((100% - var(--max-width)) / 2));
  background: #0e0d0d;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.82rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 78px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 14, 14, 0.98);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links > a {
    padding: 0.8rem 0;
  }

  .language-switcher {
    align-self: flex-start;
    margin-top: 0.8rem;
  }

  .intro-grid,
  .timeline-item,
  .contact-inner {
    grid-template-columns: 1fr;
  }

  .intro-grid {
    gap: 4rem;
  }

  .portrait-wrap {
    max-width: 220px;
  }

  .timeline-item {
    gap: 1.5rem;
  }
}

@media (max-width: 620px) {
  .nav-inner,
  .hero-content,
  .section-inner {
    width: min(calc(100% - 2rem), var(--max-width));
  }

  .hero {
    background-position: 62% center;
  }

  .hero-content {
    padding-top: 9.5rem;
  }

  .hero h1 {
    font-size: clamp(3.7rem, 18vw, 5.4rem);
  }

  .hero-statement {
    font-size: clamp(1.45rem, 7vw, 2rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .scroll-cue {
    display: none;
  }

  .skill-grid,
  .education-grid {
    grid-template-columns: 1fr;
  }

  .skill-card {
    min-height: auto;
  }

  .portrait-wrap::before {
    inset: 0.7rem -0.5rem -0.7rem 0.5rem;
  }

  .site-footer {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
