:root {
  --bg-light: #F6F0E6;
  --surface-light: #FBF7F0;
  --text-dark: #101214;
  --muted-dark: rgba(16, 18, 20, 0.72);
  --border-light: rgba(16, 18, 20, 0.12);
  --bg-dark: #0B0F14;
  --surface-dark: #0F1620;
  --text-light: #EDE7DD;
  --muted-light: rgba(237, 231, 221, 0.72);
  --border-dark: rgba(237, 231, 221, 0.14);
  --accent: #D0A77A;
  --accent-2: #9FB4C8;
  --max-width: 1100px;
  --radius: 16px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 17px;
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

a:visited {
  color: var(--accent);
}

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

main {
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  border-bottom: 1px solid transparent;
  transition: transform 0.25s ease, opacity 0.25s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.site-header.scrolled {
  border-bottom-width: 1px;
}

.site-header.hidden {
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}

.site-header.nav--dark {
  background: rgba(11, 15, 20, 0.92);
  border-bottom-color: var(--border-dark);
  color: var(--text-light);
}

.site-header.nav--light {
  background: rgba(246, 240, 230, 0.92);
  border-bottom-color: var(--border-light);
  color: var(--text-dark);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-mark {
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-subtext {
  font-size: 12px;
  color: inherit;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.nav a {
  position: relative;
  color: inherit;
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.section-block {
  position: relative;
  padding: 76px 0;
  border-bottom: 1px solid transparent;
  scroll-margin-top: 120px;
  background-repeat: no-repeat;
}

.band--dark {
  background-color: var(--bg-dark);
  color: var(--text-light);
  border-color: var(--border-dark);
  background-image:
    radial-gradient(1000px 500px at 30% 0%, rgba(208, 167, 122, 0.10), transparent 60%),
    radial-gradient(900px 450px at 80% 10%, rgba(159, 180, 200, 0.06), transparent 55%);
}

.band--light {
  background-color: var(--bg-light);
  color: var(--text-dark);
  border-color: var(--border-light);
  background-image:
    radial-gradient(1200px 600px at 20% 0%, rgba(208, 167, 122, 0.10), transparent 60%),
    radial-gradient(1000px 500px at 80% 20%, rgba(159, 180, 200, 0.08), transparent 55%);
}

.section-heading {
  margin-bottom: 20px;
}

.eyebrow {
  display: inline-flex;
  padding: 6px 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.band--dark .eyebrow {
  color: var(--muted-light);
  border-color: var(--border-dark);
}

.band--light .eyebrow {
  color: var(--muted-dark);
  border-color: var(--border-light);
}

.section-intro {
  color: currentColor;
  opacity: 0.8;
  margin-top: 12px;
}

.hero {
  padding-top: 100px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  align-items: start;
}

.identity {
  position: sticky;
  top: 110px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface-dark);
  border: 1px solid var(--border-dark);
}

.identity-mark {
  font-weight: 700;
  letter-spacing: 0.1em;
}

.identity-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted-light);
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 6vw, 38px);
  letter-spacing: -0.01em;
}

h2 {
  margin: 0 0 16px;
  font-weight: 600;
  color: inherit;
  opacity: 0.86;
  font-size: clamp(18px, 3vw, 22px);
}

h3,
h4,
h5 {
  margin: 8px 0;
  font-weight: 600;
}

p {
  margin: 12px 0;
}

.subline {
  font-size: 18px;
}

.implicit-signal {
  margin-top: 20px;
  padding: 14px;
  border: 1px solid var(--border-dark);
  border-radius: 16px;
  background: var(--surface-dark);
}

.band--light .implicit-signal {
  background: var(--surface-light);
  border-color: var(--border-light);
}

.experience-card,
.project-card,
.resume-card,
.contact-card,
.tile-card,
.capability-block,
.edu-item {
  padding: 20px;
  margin: 28px 0;
  border-radius: 16px;
  border: 1px solid var(--border-dark);
  background: var(--surface-dark);
  box-shadow: none;
}

.band--light .experience-card,
.band--light .project-card,
.band--light .resume-card,
.band--light .contact-card,
.band--light .tile-card,
.band--light .capability-block,
.band--light .edu-item {
  background: var(--surface-light);
  border-color: var(--border-light);
}

.experience-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
}

.experience-meta span {
  color: currentColor;
  opacity: 0.7;
  font-size: 14px;
}

ul {
  padding-left: 20px;
  margin: 12px 0;
}

li {
  margin-bottom: 8px;
}

.focus-line {
  opacity: 0.8;
  font-weight: 600;
}

.subsection h4 {
  margin-top: 6px;
  font-size: 18px;
}

.bullet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 20px;
}

.project-card .project-role,
.closing-line {
  opacity: 0.8;
}

.resume {
  display: grid;
  gap: 12px;
}

.resume-title {
  opacity: 0.8;
  font-weight: 600;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  margin-top: 8px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  background: rgba(208, 167, 122, 0.1);
  color: inherit;
  font-weight: 600;
  box-shadow: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.button:hover {
  background: rgba(208, 167, 122, 0.16);
  transform: translateY(-1px);
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.dates {
  opacity: 0.7;
}

.capabilities {
  display: grid;
  gap: 18px;
}

.capability-sub h5 {
  margin: 10px 0 6px;
}

.capability-sub ul {
  margin-top: 6px;
}

.compact-list {
  list-style: disc;
  padding-left: 18px;
  margin: 0;
  display: grid;
  gap: 10px;
}

.social-tile {
  display: flex;
  justify-content: center;
}

.social-links {
  display: flex;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.social-links a {
  color: inherit;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid currentColor;
  background: transparent;
}

.social-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.contact-card h4 {
  margin-top: 0;
}

.site-footer {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 40px 24px 60px;
  color: var(--muted-light);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.revealable {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.revealable.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    gap: 10px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .identity {
    position: relative;
    top: 0;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .header-inner {
    padding: 12px 0;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    gap: 12px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .hero {
    padding-top: 72px;
  }

  .section-block {
    padding: 64px 0;
    scroll-margin-top: 96px;
  }

  .experience-card,
  .project-card,
  .resume-card,
  .contact-card,
  .tile-card,
  .capability-block,
  .edu-item {
    margin: 22px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .revealable {
    opacity: 1 !important;
    transform: none !important;
  }
}
