:root {
  --bg: #0d0d0d;
  --bg-secondary: #171717;
  --card: #1f1f1f;
  --text: #f5f2ea;
  --text-secondary: #b8b3a7;
  --muted: #8a8f98;
  --gold: #bfa46a;
  --blue: #2f5f73;
  --border: #2a2a2a;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul {
  margin: 1.5rem 0 0;
  padding-left: 1.25rem;
}

li {
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0.8rem 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0;
}

h1 {
  color: var(--text);
  font-size: clamp(3.6rem, 6vw, 5.6rem);
  line-height: 1.08;
  max-width: 1040px;
}

h2 {
  color: var(--text);
  font-size: clamp(2.35rem, 4vw, 4rem);
  line-height: 1.12;
}

h3 {
  font-size: 1.35rem;
  line-height: 1.25;
}

p {
  color: var(--text-secondary);
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgb(13 13 13 / 92%);
  backdrop-filter: blur(14px);
}

.nav-inner,
.section,
.hero-inner {
  width: min(100% - 2.5rem, 1280px);
  margin-inline: auto;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
}

.brand img {
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  object-fit: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-links a,
.nav-contact {
  transition: color 180ms ease;
}

.linkedin-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.linkedin-nav img {
  width: 1rem;
  height: 1rem;
  border-radius: 2px;
}

.nav-links a:hover,
.nav-contact:hover {
  color: var(--gold);
}

.language-switch {
  display: inline-flex;
  align-items: center;
  max-width: 5.5%;
  opacity: .8;
  transition: opacity 180ms ease, transform 180ms ease;
}

.language-switch:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.language-switch img {
  width: 1.8rem;
  height: auto;
}

.nav-contact {
  border-bottom: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 500;
  padding-bottom: 0.25rem;
}

.section-border {
  border-bottom: 1px solid var(--border);
}

.hero {
  background: var(--bg);
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 4rem;
}

.hero-inner {
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  align-items: start;
  padding-block: clamp(2.5rem, 4.5vw, 4rem);
}

.hero-copy {
  max-width: 880px;
  padding-top: 0.5rem;
}

.eyebrow,
.card-kicker {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.5;
  text-transform: uppercase;
}

.card-kicker {
  letter-spacing: 0.16em;
}

.hero-tagline {
  font-size: clamp(1rem, 1.45vw, 1.25rem);
  letter-spacing: 0.22em;
  max-width: 900px;
}

.lede {
  color: var(--text-secondary);
  font-size: clamp(1.05rem, 1.55vw, 1.22rem);
  font-weight: 300;
  line-height: 1.7;
  margin-top: 1.75rem;
  max-width: 820px;
}

.lede + .lede {
  margin-top: 1rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.6rem;
}

.button {
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.button-primary {
  background: var(--blue);
  color: var(--text);
}

.button-primary:hover {
  background: #24495a;
}

.button-outline {
  border: 1px solid var(--gold);
  color: var(--gold);
}

.button-outline:hover {
  background: var(--bg-secondary);
}

.hero-media {
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 0.85rem;
}

.portrait {
  aspect-ratio: 1.03 / 1;
  width: min(100%, 460px);
  border: 1px solid var(--border);
  border-radius: 2px;
  object-fit: scale-down;
  object-position: center 18%;
  box-shadow: 0 28px 70px rgb(0 0 0 / 45%);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 460px);
  gap: 1px;
  border: 1px solid var(--border);
  background: var(--border);
}

.metric {
  min-height: 120px;
  background: var(--card);
  padding: 1rem;
}

.metric-value {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 2.3rem;
  font-weight: 500;
  line-height: 1;
}

.metric p:not(.metric-value) {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.55;
  margin-top: 0.75rem;
}

.section {
  padding-block: 4.5rem;
}

.section p:not(.eyebrow, .card-kicker, .skill-title) {
  line-height: 1.75;
  margin-top: 1.25rem;
}

.section h2 {
  margin-top: 1rem;
}

.section-heading {
  color: var(--text);
  font-size: clamp(2.35rem, 4vw, 4rem);
  line-height: 1.12;
  margin-top: 1rem;
}

.section-muted {
  background: var(--bg-secondary);
  width: 100%;
  max-width: none;
}

.section-muted > .page-grid,
.two-columns {
  width: min(100% - 2.5rem, 1280px);
  margin-inline: auto;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  background: var(--border);
}

.project-card {
  background: var(--card);
}

.project-card > img {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-bottom: 1px solid var(--border);
  object-fit: cover;
}

.project-card > div {
  padding: 1.5rem;
}

.project-card h3 {
  color: var(--gold);
  margin-top: 0.4rem;
}

.project-card p:last-child {
  font-size: 0.94rem;
  line-height: 1.65;
  margin-top: 0.75rem;
}

.no-image {
  display: flex;
  min-height: 280px;
  align-items: center;
}

.stacked-cards {
  display: grid;
  gap: 1px;
  border: 1px solid var(--border);
  background: var(--border);
}

.experience-card {
  background: var(--card);
  padding: 1.5rem;
}

.experience-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.experience-head h3 {
  color: var(--text);
  font-size: 1.55rem;
}

.experience-head p {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.experience-head span {
  border: 1px solid var(--gold);
  color: var(--text);
  flex: 0 0 auto;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
}

.two-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.panel {
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.75rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.tag-list span {
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  display: inline-flex;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

.tag-list.alt span {
  background: var(--card);
}

.two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
}

.writing-lower {
  padding-top: 4.5rem;
}

.skills-section {
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
}

.skills-stack {
  display: grid;
  gap: 1.5rem;
}

.skill-title {
  color: var(--gold);
  font-size: 0.95rem;
  font-weight: 600;
}

.research-grid {
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
}

.contact-section {
  padding-top: 4.5rem;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 2rem;
  border: 1px solid var(--border);
  background: var(--blue);
  color: var(--text);
  padding: clamp(1.75rem, 4vw, 2.25rem);
}

.contact-panel h2 {
  color: var(--text);
}

.contact-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

.dark-button {
  background: var(--card);
  color: var(--gold);
}

.dark-button:hover {
  background: var(--bg-secondary);
}

.linkedin-button {
  gap: 0.5rem;
  border: 1px solid var(--gold);
  background: var(--text);
  color: #0a0a0a;
}

.linkedin-button:hover {
  background: var(--gold);
}

.linkedin-button img {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 2px;
}

.light-outline {
  border: 1px solid var(--gold);
  color: var(--text);
}

.light-outline:hover {
  background: rgb(31 31 31 / 25%);
}

@media (max-width: 960px) {
  .page-grid,
  .hero-inner,
  .skills-section,
  .research-grid,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .hero-media {
    justify-items: start;
  }

  .portrait,
  .metrics-grid {
    width: min(100%, 460px);
  }
}

@media (max-width: 720px) {
  .nav-inner,
  .section,
  .hero-inner,
  .section-muted > .page-grid,
  .two-columns {
    width: min(100% - 2rem, 1280px);
  }

  .nav-links {
    display: none;
  }

  .brand span {
    max-width: 16rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  h1 {
    font-size: clamp(2.9rem, 13vw, 4rem);
  }

  .project-grid,
  .two-panels,
  .two-columns,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .portrait {
    aspect-ratio: 1;
  }

  .experience-head {
    display: grid;
  }

  .button {
    width: 100%;
  }
}
