:root {
  --ink: #252623;
  --ink-soft: #3b3b37;
  --muted: #727067;
  --paper: #f7f4ea;
  --paper-2: #ece7db;
  --card: #fffdf6;
  --charcoal: #202321;
  --charcoal-2: #2d302d;
  --sage: #7d9079;
  --sage-hero: #a7b89f;
  --sage-glow: #9fb193;
  --copper: #b36f46;
  --gold: #7d9079;
  --bluegray: #64737a;
  --line: rgba(37, 38, 35, .12);
  --line-dark: rgba(247, 244, 234, .14);
  --shadow: 0 24px 70px rgba(32, 35, 33, .12);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: 68px;
  border-bottom: 1px solid rgba(247, 244, 234, .16);
  background: rgba(32, 35, 33, .72);
  backdrop-filter: blur(18px);
}

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

.logo {
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: .03em;
  text-decoration: none;
  white-space: nowrap;
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-wrap a {
  color: rgba(247, 244, 234, .7);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s ease;
}

.nav-wrap a:hover {
  color: var(--gold);
}

.hero {
  position: relative;
  min-height: 780px;
  overflow: hidden;
  padding: 136px 0 112px;
  color: var(--paper);
  background:
    radial-gradient(circle at 78% 28%, rgba(125, 144, 121, .34), transparent 34%),
    radial-gradient(circle at 8% 78%, rgba(159, 177, 147, .18), transparent 30%),
    linear-gradient(115deg, rgba(8, 16, 14, .98) 0%, rgba(14, 28, 24, .96) 38%, rgba(37, 54, 43, .78) 66%, rgba(7, 17, 16, .98) 100%),
    linear-gradient(155deg, #07100f 0%, #14231f 43%, #304432 70%, #081413 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 22% 38%, rgba(247, 244, 234, .07), transparent 38%),
    linear-gradient(to bottom, rgba(5, 8, 8, .08), transparent 24%, rgba(5, 8, 8, .26) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, .08), transparent 34%, rgba(0, 0, 0, .16));
  pointer-events: none;
}

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .62;
  background-image:
    radial-gradient(circle, rgba(247, 244, 234, .88) 0 1.25px, transparent 2px),
    radial-gradient(circle, rgba(167, 184, 159, .72) 0 1.1px, transparent 1.8px),
    radial-gradient(circle, rgba(125, 144, 121, .5) 0 1.45px, transparent 2.2px);
  background-size: 46px 46px, 82px 82px, 124px 124px;
  mask-image: radial-gradient(ellipse at 72% 46%, black 0%, rgba(0, 0, 0, .86) 38%, transparent 76%);
  animation: particlesMove 15s linear infinite;
}

@keyframes particlesMove {
  from {
    background-position: 0 0, 0 0, 0 0;
  }
  to {
    background-position: 54px 54px, -92px 92px, 132px -132px;
  }
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(360px, 1.08fr);
  gap: 64px;
  align-items: start;
}

.eyebrow,
.section-kicker,
.project-type {
  margin: 0;
  color: var(--copper);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--sage-hero);
  margin-bottom: 22px;
}

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

.hero h1 {
  max-width: 740px;
  margin-bottom: 22px;
  color: var(--paper);
  font-size: clamp(3.4rem, 7vw, 6.8rem);
  line-height: .88;
  letter-spacing: -.025em;
}

.hero h1 em {
  display: block;
  color: var(--gold);
  font-family: var(--font-body);
  font-weight: 300;
  font-style: normal;
  letter-spacing: -.04em;
}

.hero-subtitle {
  max-width: 560px;
  margin: 0 0 18px;
  color: rgba(247, 244, 234, .86);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  line-height: 1.2;
}

.hero-text,
.lead {
  color: var(--muted);
  font-size: 1rem;
}

.hero-text {
  max-width: 570px;
  margin: 0 0 34px;
  color: rgba(247, 244, 234, .68);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  padding: 0 22px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}

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

.btn-primary {
  background: var(--gold);
  color: #1b1d1b;
}

.btn-primary:hover {
  background: #d6b981;
}

.btn-secondary {
  border-color: rgba(247, 244, 234, .22);
  color: rgba(247, 244, 234, .84);
}

.btn-secondary:hover {
  border-color: rgba(247, 244, 234, .54);
}

.hero-proof {
  position: relative;
  display: grid;
  gap: 18px;
  align-items: end;
}

.pdf-cover {
  position: relative;
  margin: 0;
  min-height: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.pdf-cover::before {
  display: none;
}

.pdf-cover img {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: 620px;
  object-fit: contain;
  filter: drop-shadow(0 34px 70px rgba(0, 0, 0, .34));
}

.hero-proof-note {
  display: grid;
  gap: 6px;
  border-left: 1px solid rgba(247, 244, 234, .2);
  padding-left: 18px;
  max-width: 390px;
  justify-self: end;
}

.hero-proof-note span {
  color: var(--gold);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero-proof-note p {
  margin: 0;
  color: rgba(247, 244, 234, .62);
  font-size: .86rem;
  line-height: 1.55;
}

section {
  padding: 96px 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 46px;
}

.section-kicker {
  margin-bottom: 10px;
}

h2 {
  max-width: 880px;
  font-size: clamp(2.45rem, 5vw, 4.8rem);
  line-height: .96;
}

.lead {
  max-width: 700px;
  margin: 20px 0 0;
}

.about-grid,
.portrait-grid,
.contact-grid {
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  gap: 58px;
  align-items: start;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 34px;
  border: 1px solid var(--line);
  background: var(--line);
}

.metric {
  min-height: 142px;
  background: var(--card);
  padding: 28px 24px;
}

.metric strong {
  display: block;
  color: var(--sage);
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 600;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: .8rem;
}

.profile-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 253, 246, .96), rgba(236, 231, 219, .52));
  padding: 34px;
  box-shadow: 0 18px 60px rgba(37, 38, 35, .06);
}

.profile-card p {
  margin: 0 0 17px;
  color: var(--ink-soft);
}

.profile-card p:last-child {
  margin-bottom: 0;
}

.portrait-section {
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(32, 35, 33, .98) 0 43%, transparent 43%),
    var(--paper-2);
}

.portrait-grid {
  align-items: center;
}

.portrait-frame {
  position: relative;
  margin: 0;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(247, 244, 234, .16);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .22);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

.portrait-copy {
  padding: 22px 0;
}

.focus-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 34px;
  border: 1px solid var(--line);
  background: var(--line);
}

.focus-list > div {
  background: var(--card);
  padding: 26px;
}

.focus-list span,
.skill-num {
  display: block;
  color: rgba(37, 38, 35, .18);
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 600;
  line-height: 1;
}

.focus-list strong {
  display: block;
  margin: 16px 0 8px;
  color: var(--ink);
  font-size: .95rem;
}

.focus-list p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.6;
}

.projects {
  color: var(--paper);
  background:
    radial-gradient(circle at 90% 8%, rgba(125, 144, 121, .18), transparent 28%),
    linear-gradient(180deg, var(--charcoal), var(--charcoal-2));
}

.projects h2 {
  color: var(--paper);
}

.projects .lead {
  color: rgba(247, 244, 234, .62);
}

.projects .section-kicker,
.projects .project-type {
  color: var(--gold);
}

.project-list {
  display: grid;
  gap: 16px;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 410px);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  background: rgba(247, 244, 234, .045);
  transition: transform .35s ease, border-color .35s ease, background .35s ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(125, 144, 121, .42);
  background: rgba(247, 244, 234, .07);
}

.project-card:nth-child(even) {
  grid-template-columns: minmax(300px, 410px) minmax(0, 1fr);
}

.project-card:nth-child(even) .project-content {
  order: 2;
  border-left: 1px solid var(--line-dark);
  border-right: 0;
}

.project-card:nth-child(even) .project-preview {
  order: 1;
}

.project-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px 46px;
  border-right: 1px solid var(--line-dark);
}

.project-card h3 {
  margin: 10px 0 14px;
  color: var(--paper);
  font-size: clamp(1.65rem, 2.5vw, 2.35rem);
  line-height: 1.04;
}

.project-card p {
  margin: 0 0 20px;
  color: rgba(247, 244, 234, .68);
  font-size: .93rem;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.pill {
  border: 1px solid rgba(247, 244, 234, .16);
  padding: 4px 10px;
  color: rgba(247, 244, 234, .66);
  font-size: .64rem;
  letter-spacing: .06em;
}

.small-link {
  display: inline-flex;
  width: fit-content;
  border-bottom: 1px solid rgba(125, 144, 121, .42);
  color: var(--gold);
  padding-bottom: 3px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-decoration: none;
  text-transform: uppercase;
}

.small-link:hover {
  color: var(--paper);
  border-color: var(--paper);
}

.project-preview {
  position: relative;
  min-height: 310px;
  margin: 0;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(247, 244, 234, .08), rgba(247, 244, 234, .025)),
    rgba(247, 244, 234, .04);
}

.project-preview img {
  position: relative;
  inset: auto;
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  transition: transform .75s ease;
  filter: drop-shadow(0 22px 45px rgba(0, 0, 0, .24));
}

.project-preview-ui img {
  object-position: top center;
}

.project-card:hover .project-preview img {
  transform: translateY(-4px);
}

.project-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(32, 35, 33, .28), transparent 58%);
}

.preview-label {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  border: 1px solid rgba(247, 244, 234, .2);
  background: rgba(32, 35, 33, .58);
  color: var(--paper);
  padding: 6px 10px;
  backdrop-filter: blur(12px);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.skills {
  background: var(--paper);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.skill-card {
  min-height: 270px;
  background: var(--card);
  padding: 34px 30px;
  transition: background .25s ease, transform .25s ease;
}

.skill-card:hover {
  background: #f3efe3;
  transform: translateY(-2px);
}

.skill-card h3 {
  margin: 18px 0 10px;
  font-size: 1.35rem;
  line-height: 1.08;
}

.skill-card p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.6;
}

.contact {
  background: var(--charcoal);
  color: var(--paper);
  padding-bottom: 62px;
}

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

.contact .section-kicker {
  color: var(--gold);
}

.contact .lead {
  color: rgba(247, 244, 234, .6);
}

.contact .btn-primary {
  background: var(--paper);
  color: var(--charcoal);
}

.contact .btn-primary:hover {
  background: #fff;
}

.contact-list {
  display: grid;
  gap: 8px;
}

.contact-item {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--line-dark);
  background: rgba(247, 244, 234, .045);
  padding: 18px 20px;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease;
}

.contact-item span:first-child {
  color: rgba(247, 244, 234, .46);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.contact-item strong {
  color: rgba(247, 244, 234, .86);
  font-size: .9rem;
  font-weight: 400;
  text-align: right;
}

.contact-item:hover {
  background: rgba(247, 244, 234, .07);
  border-color: rgba(125, 144, 121, .36);
}

.footer {
  border-top: 1px solid var(--line-dark);
  background: var(--charcoal);
  color: rgba(247, 244, 234, .34);
  padding: 22px 0;
  font-size: .78rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.letter-reveal .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(.82em);
  transition:
    opacity .55s ease,
    transform .72s cubic-bezier(.2, .74, .22, 1);
  transition-delay: calc(var(--i) * 42ms);
  will-change: opacity, transform;
}

.letter-reveal .letter-word {
  display: inline-block;
  white-space: nowrap;
}

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

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

  .hero-particles {
    animation: none;
  }

  .letter-reveal .letter {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .about-grid,
  .portrait-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 118px;
  }

  .pdf-cover,
  .pdf-cover img,
  .portrait-frame,
  .portrait-frame img {
    min-height: 420px;
  }

  .portrait-section {
    background: var(--paper-2);
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card,
  .project-card:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .project-card:nth-child(even) .project-content,
  .project-card:nth-child(even) .project-preview {
    order: initial;
  }

  .project-content,
  .project-card:nth-child(even) .project-content {
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid var(--line-dark);
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 28px, var(--container));
  }

  .site-header,
  .nav {
    height: 62px;
  }

  .nav-wrap {
    display: none;
  }

  .hero {
    padding: 104px 0 70px;
  }

  .hero h1 {
    font-size: clamp(3rem, 15vw, 4.2rem);
  }

  .hero-subtitle,
  .hero-text {
    max-width: 34ch;
    overflow-wrap: anywhere;
  }

  .hero-subtitle {
    font-size: 1.28rem;
    line-height: 1.24;
  }

  .hero-text {
    max-width: 32ch;
    font-size: .92rem;
  }

  section {
    padding: 70px 0;
  }

  .metrics,
  .focus-list,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .profile-card,
  .project-content,
  .skill-card {
    padding: 26px;
  }

  .project-preview {
    min-height: 260px;
  }

  .actions .btn {
    width: 100%;
  }

  .contact-item {
    display: grid;
    gap: 6px;
  }

  .contact-item strong {
    text-align: left;
  }

  .footer-inner {
    flex-direction: column;
  }
}

/* Compatibility layer for the hosted multilingual HTML */
.site-header .nav > div {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: rgba(247, 244, 234, .7);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s ease;
}

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

.language-switcher {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: 1px solid rgba(247, 244, 234, .16);
  background: rgba(247, 244, 234, .06);
}

.lang-btn {
  min-width: 34px;
  height: 28px;
  border: 0;
  background: transparent;
  color: rgba(247, 244, 234, .58);
  cursor: pointer;
  font: 700 .62rem/1 var(--font-body);
  letter-spacing: .1em;
  transition: background .2s ease, color .2s ease;
}

.lang-btn.active,
.lang-btn:hover {
  background: var(--gold);
  color: var(--charcoal);
}

.hero h1 > span:not(.letter) {
  display: block;
  color: var(--sage-hero);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -.025em;
}

.hero .btn-primary {
  background: var(--sage-hero);
  color: #101715;
}

.hero .btn-primary:hover {
  background: #b8c6b0;
}

.hero .btn-secondary {
  border-color: rgba(167, 184, 159, .32);
  color: rgba(247, 244, 234, .9);
}

.hero .btn-secondary:hover {
  border-color: rgba(167, 184, 159, .68);
  background: rgba(167, 184, 159, .08);
}

.hero-subtitle {
  color: rgba(247, 244, 234, .92);
}

.hero-text,
.pdf-note {
  color: rgba(247, 244, 234, .74);
}

.hero-proof {
  position: relative;
}

.pdf-stack {
  display: block;
  color: inherit;
  text-decoration: none;
}

.pdf-note {
  display: grid;
  gap: 6px;
  max-width: 390px;
  margin: 18px 0 0 auto;
  border-left: 1px solid rgba(247, 244, 234, .2);
  padding-left: 18px;
  color: rgba(247, 244, 234, .62);
  font-size: .86rem;
  line-height: 1.55;
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-year {
  color: var(--copper);
  font-size: .82rem;
  font-weight: 700;
}

.timeline-item strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: .94rem;
}

.timeline-item span {
  color: var(--muted);
  font-size: .84rem;
}

.project-card > div:first-child {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px 46px;
  border-right: 1px solid var(--line-dark);
}

.project-card:nth-child(even) > div:first-child {
  order: 2;
  border-right: 0;
  border-left: 1px solid var(--line-dark);
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact .actions {
  margin-top: 28px;
}

.contact-item span:last-child {
  color: rgba(247, 244, 234, .86);
  font-size: .96rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.45;
  text-align: right;
  text-transform: none;
}

.letter-reveal .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(.82em);
  transition:
    opacity .55s ease,
    transform .72s cubic-bezier(.2, .74, .22, 1);
  transition-delay: calc(var(--i) * 38ms);
  will-change: opacity, transform;
}
.letter-reveal .letter-word {
  display: inline-block;
  white-space: nowrap;
}
.letter-reveal.is-visible .letter {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .letter-reveal .letter {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 980px) {
  .project-card > div:first-child,
  .project-card:nth-child(even) > div:first-child {
    order: initial;
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid var(--line-dark);
  }
}

@media (max-width: 720px) {
  .site-header .nav > div {
    gap: 10px;
  }

  .nav-links {
    display: none;
  }

  .language-switcher {
    margin-left: auto;
  }

  .hero h1 {
    font-size: clamp(3rem, 15vw, 4.2rem);
  }

  .pdf-note {
    margin-left: 0;
  }

  .hero {
    background:
      radial-gradient(circle at 74% 20%, rgba(125, 144, 121, .28), transparent 34%),
      linear-gradient(135deg, #07100f 0%, #14231f 54%, #263829 100%);
  }
}

/* Portfolio-grade polish */
:root {
  --copper: #7d9079;
  --sage-deep: #52634f;
  --sage-soft: rgba(125, 144, 121, .16);
  --dark-0: #111715;
  --dark-1: #1a211e;
  --dark-2: #242c27;
  --line-dark: rgba(247, 244, 234, .10);
  --shadow-dark: 0 34px 90px rgba(0, 0, 0, .26);
}

::selection {
  background: rgba(125, 144, 121, .34);
  color: var(--paper);
}

body {
  text-rendering: optimizeLegibility;
}

.section-head {
  max-width: 840px;
}

.section-kicker,
.eyebrow,
.project-type {
  letter-spacing: .2em;
}

h2 {
  letter-spacing: -.018em;
}

.lead {
  max-width: 68ch;
  line-height: 1.78;
}

.btn,
.lang-btn,
.small-link,
.contact-item,
.project-card,
.skill-card,
.metric,
.focus-list > div {
  will-change: transform;
}

.btn:focus-visible,
.small-link:focus-visible,
.lang-btn:focus-visible,
.nav-links a:focus-visible {
  outline: 2px solid rgba(125, 144, 121, .72);
  outline-offset: 4px;
}

.btn {
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.btn-primary:hover {
  background: #8fa08a;
  box-shadow: 0 18px 38px rgba(125, 144, 121, .24);
}

.btn-secondary:hover,
.small-link:hover {
  color: var(--paper);
  border-color: rgba(247, 244, 234, .72);
}

.profile-card,
.skill-card,
.contact-item,
.focus-list,
.metrics {
  border-color: rgba(37, 38, 35, .08);
}

.profile-card,
.skill-card,
.focus-list > div {
  box-shadow: 0 24px 70px rgba(32, 35, 33, .06);
}

.metrics,
.focus-list,
.skills-grid {
  border: 0;
  background: transparent;
  gap: 1px;
}

.metric,
.focus-list > div,
.skill-card {
  border: 1px solid rgba(37, 38, 35, .08);
}

.metric strong,
.focus-list span,
.skill-num {
  color: var(--sage);
}

.metric:hover,
.focus-list > div:hover,
.skill-card:hover {
  transform: translateY(-4px);
  border-color: rgba(125, 144, 121, .26);
  background: #fbf8ef;
}

.projects {
  position: relative;
  background:
    radial-gradient(circle at 84% 0%, rgba(125, 144, 121, .2), transparent 34%),
    radial-gradient(circle at 8% 42%, rgba(125, 144, 121, .11), transparent 30%),
    linear-gradient(180deg, var(--dark-0) 0%, var(--dark-1) 48%, var(--dark-2) 100%);
}

.projects::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(247, 244, 234, .035) 1px, transparent 1px),
    linear-gradient(rgba(247, 244, 234, .028) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: linear-gradient(to bottom, transparent, black 14%, black 82%, transparent);
}

.projects > .container {
  position: relative;
  z-index: 1;
}

.projects .section-head {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(280px, .7fr);
  gap: 46px;
  align-items: end;
  max-width: none;
  margin-bottom: 58px;
}

.projects .section-head .section-kicker,
.projects .section-head h2 {
  grid-column: 1;
}

.projects .section-head .lead {
  grid-column: 2;
  margin: 0 0 6px;
  max-width: 46ch;
  font-size: .96rem;
}

.projects h2 {
  max-width: 760px;
  font-size: clamp(2.2rem, 4.4vw, 4.2rem);
}

.project-list {
  gap: 28px;
}

.project-card {
  position: relative;
  grid-template-columns: minmax(0, .96fr) minmax(360px, 1.04fr);
  min-height: 420px;
  overflow: hidden;
  border: 0;
  background:
    linear-gradient(135deg, rgba(247, 244, 234, .092), rgba(247, 244, 234, .032)),
    rgba(247, 244, 234, .035);
  box-shadow: inset 0 1px 0 rgba(247, 244, 234, .09), var(--shadow-dark);
  isolation: isolate;
  transition:
    transform .45s cubic-bezier(.2, .74, .22, 1),
    background .45s ease,
    box-shadow .45s ease;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(to bottom, transparent, rgba(125, 144, 121, .82), transparent);
  opacity: .72;
  transform: scaleY(.62);
  transition: transform .45s ease, opacity .45s ease;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 78% 18%, rgba(125, 144, 121, .13), transparent 38%);
  opacity: .7;
  transition: opacity .45s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  background:
    linear-gradient(135deg, rgba(247, 244, 234, .12), rgba(247, 244, 234, .05)),
    rgba(247, 244, 234, .05);
  box-shadow: inset 0 1px 0 rgba(247, 244, 234, .12), 0 42px 100px rgba(0, 0, 0, .34);
}

.project-card:hover::before {
  opacity: 1;
  transform: scaleY(1);
}

.project-card:hover::after {
  opacity: 1;
}

.project-card:nth-child(even) {
  grid-template-columns: minmax(360px, 1.04fr) minmax(0, .96fr);
}

.project-card:nth-child(even)::before {
  inset: 0 0 0 auto;
}

.project-card > div:first-child,
.project-content,
.project-card:nth-child(even) .project-content,
.project-card:nth-child(even) > div:first-child {
  border: 0;
}

.project-content,
.project-card > div:first-child {
  padding: clamp(34px, 5vw, 64px);
}

.project-card:first-child {
  grid-template-columns: minmax(0, 1fr) minmax(400px, 1fr);
  min-height: 560px;
}

.project-card:first-child .project-content,
.project-card:first-child > div:first-child {
  padding: clamp(38px, 5vw, 64px);
}

.project-card:first-child h3 {
  max-width: 15ch;
  font-size: clamp(2rem, 3.35vw, 3.35rem);
  line-height: 1.02;
}

.project-card h3 {
  margin: 12px 0 16px;
  max-width: 18ch;
  font-size: clamp(1.8rem, 2.8vw, 2.7rem);
  letter-spacing: -.014em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.project-card p {
  max-width: 62ch;
  color: rgba(247, 244, 234, .72);
  font-size: .96rem;
  line-height: 1.72;
}

.project-type {
  color: rgba(125, 144, 121, .95);
}

.project-meta {
  gap: 9px;
  margin-top: 4px;
}

.pill {
  border: 0;
  background: rgba(247, 244, 234, .075);
  color: rgba(247, 244, 234, .68);
  padding: 6px 11px;
}

.project-preview {
  min-height: 360px;
  padding: clamp(26px, 4vw, 46px);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 34%, rgba(125, 144, 121, .2), transparent 44%),
    linear-gradient(135deg, rgba(247, 244, 234, .105), rgba(247, 244, 234, .035));
}

.project-card:first-child .project-preview {
  min-height: 560px;
}

.project-preview img {
  max-width: min(100%, 560px);
  max-height: 420px;
  transition:
    transform .75s cubic-bezier(.2, .74, .22, 1),
    filter .75s ease;
}

.project-card:first-child .project-preview img {
  max-height: 500px;
}

.project-card:hover .project-preview img {
  transform: translateY(-8px) scale(1.018);
  filter: drop-shadow(0 34px 60px rgba(0, 0, 0, .32));
}

.project-preview::after {
  opacity: .45;
  background: linear-gradient(to top, rgba(17, 23, 21, .38), transparent 56%);
}

.preview-label {
  border: 0;
  background: rgba(17, 23, 21, .64);
  box-shadow: inset 0 0 0 1px rgba(247, 244, 234, .1);
}

.small-link {
  position: relative;
  border-bottom: 0;
}

.small-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: currentColor;
  transform-origin: right;
  transform: scaleX(.42);
  transition: transform .28s ease;
}

.small-link:hover::after {
  transform-origin: left;
  transform: scaleX(1);
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity .7s ease,
    transform .8s cubic-bezier(.2, .74, .22, 1);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-on-scroll:nth-child(2) {
  transition-delay: 70ms;
}

.reveal-on-scroll:nth-child(3) {
  transition-delay: 120ms;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 980px) {
  .projects .section-head {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .projects .section-head .section-kicker,
  .projects .section-head h2,
  .projects .section-head .lead {
    grid-column: auto;
  }

  .project-card,
  .project-card:first-child,
  .project-card:nth-child(even) {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .project-card:nth-child(even) .project-preview {
    order: 2;
  }

  .project-preview,
  .project-card:first-child .project-preview {
    min-height: 340px;
  }
}

@media (max-width: 720px) {
  .projects h2 {
    font-size: clamp(2.45rem, 13vw, 4rem);
  }

  .project-list {
    gap: 18px;
  }

  .project-card,
  .project-card:first-child {
    box-shadow: inset 0 1px 0 rgba(247, 244, 234, .08), 0 24px 60px rgba(0, 0, 0, .22);
  }

  .project-content,
  .project-card > div:first-child,
  .project-card:first-child .project-content,
  .project-card:first-child > div:first-child {
    padding: 30px 24px;
  }

  .project-card h3,
  .project-card:first-child h3 {
    max-width: 13ch;
    font-size: clamp(1.75rem, 9vw, 2.65rem);
  }

  .project-preview,
  .project-card:first-child .project-preview {
    min-height: 280px;
    padding: 22px;
  }

  .project-preview img,
  .project-card:first-child .project-preview img {
    max-height: 310px;
  }
}

/* Mobile app-like experience */
@media (max-width: 720px) {
  :root {
    --mobile-shell: #0b1210;
    --mobile-panel: rgba(247, 244, 234, .965);
    --mobile-dark-panel: rgba(247, 244, 234, .065);
  }

  html {
    scroll-padding-top: 76px;
  }

  body {
    background: var(--mobile-shell);
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }

  .container {
    width: min(100% - 28px, var(--container));
  }

  .site-header {
    height: auto;
    min-height: 62px;
    border-bottom: 1px solid rgba(247, 244, 234, .1);
    background: rgba(11, 18, 16, .88);
    backdrop-filter: none;
  }

  .nav {
    min-height: 62px;
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 8px;
    row-gap: 8px;
    padding-block: 10px;
  }

  .logo {
    grid-column: 1;
    grid-row: 1;
    max-width: 38vw;
    overflow: hidden;
    font-size: 1.04rem;
    text-overflow: ellipsis;
  }

  .site-header .nav > div {
    display: contents !important;
  }

  .language-switcher {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    margin-left: 0;
    gap: 2px;
    padding: 3px;
    border-radius: 8px;
    border-color: rgba(247, 244, 234, .12);
    background: rgba(247, 244, 234, .055);
  }

  .lang-btn {
    min-width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: .56rem;
    letter-spacing: .06em;
  }

  .nav-links {
    position: static;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    order: 3;
    padding: 4px;
    border: 1px solid rgba(247, 244, 234, .11);
    border-radius: 8px;
    background: rgba(247, 244, 234, .055);
    box-shadow: none;
    backdrop-filter: none;
  }

  .nav-links li {
    min-width: 0;
  }

  .nav-links a {
    display: flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: rgba(247, 244, 234, .68);
    overflow: hidden;
    font-size: clamp(.44rem, 2.05vw, .52rem);
    letter-spacing: .045em;
    line-height: 1.1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-links a:hover,
  .nav-links a:focus-visible {
    background: rgba(125, 144, 121, .18);
    color: var(--paper);
  }

  .hero {
    min-height: 100svh;
    padding: 152px 0 66px;
  }

  .hero-grid {
    gap: 34px;
  }

  .hero h1 {
    font-size: clamp(3.5rem, 17vw, 5.25rem);
    line-height: .84;
  }

  .hero-subtitle {
    max-width: 11.8em;
    font-size: clamp(1.34rem, 6.4vw, 1.82rem);
    overflow-wrap: normal;
  }

  .hero-text {
    max-width: 34ch;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .btn {
    width: 100%;
    min-height: 50px;
    border-radius: 8px;
  }

  .pdf-cover img {
    max-height: 470px;
    margin-inline: auto;
  }

  section {
    padding: 58px 0;
  }

  #about,
  .portrait-section,
  .skills {
    background: var(--paper);
  }

  .about-grid,
  .portrait-grid,
  .contact-grid {
    gap: 22px;
  }

  .profile-card,
  .portrait-frame,
  .portrait-copy,
  .skill-card,
  .metric,
  .focus-list > div {
    border-radius: 8px;
  }

  .profile-card {
    max-height: none;
  }

  .metrics {
    gap: 10px;
  }

  .metric {
    min-height: 118px;
    padding: 22px;
  }

  .projects {
    padding-top: 70px;
  }

  .projects .section-head {
    margin-bottom: 30px;
  }

  .project-list {
    gap: 16px;
  }

  .project-card,
  .project-card:first-child {
    border-radius: 8px;
    background:
      linear-gradient(150deg, rgba(247, 244, 234, .105), rgba(247, 244, 234, .045)),
      var(--mobile-dark-panel);
  }

  .project-card::before {
    width: auto;
    height: 3px;
    inset: 0 22px auto;
    transform: scaleX(.62);
  }

  .project-card:hover::before {
    transform: scaleX(1);
  }

  .project-meta {
    margin-bottom: 18px;
  }

  .pill {
    border-radius: 999px;
    padding: 6px 10px;
  }

  .preview-label {
    border-radius: 6px;
  }

  .skills-grid {
    gap: 10px;
  }

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

  .contact {
    padding-top: 64px;
    padding-bottom: 42px;
  }

  .contact-list {
    gap: 10px;
  }

  .contact-item {
    display: grid;
    gap: 7px;
    border: 0;
    border-radius: 8px;
    background: rgba(247, 244, 234, .065);
    padding: 18px;
  }

  .contact-item span:last-child,
  .contact-item strong {
    text-align: left;
  }

  .footer {
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
  }
}
