:root {
  --bg: #f7f5ef;
  --surface: #ffffff;
  --surface-strong: #f0ebe1;
  --ink: #15202b;
  --muted: #596673;
  --line: #d9d2c5;
  --navy: #0f172a;
  --teal: #0f766e;
  --green: #1d6b45;
  --coral: #cf4b37;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  z-index: 20;
  transform: translateY(-160%);
  background: var(--navy);
  color: #fff;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
}

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

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

.section {
  padding: 92px 0;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  transition: background 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(247, 245, 239, 0.88);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin-inline: auto;
}

.brand,
.nav-menu,
.hero-actions,
.contact-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.75rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 50%;
  background: var(--surface);
  color: var(--teal);
}

.nav-menu {
  gap: 1.35rem;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.nav-menu a {
  text-decoration: none;
}

.nav-menu a:hover {
  color: var(--ink);
}

.nav-cta {
  padding: 0.58rem 0.85rem;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.nav-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: 720px;
  padding-top: 132px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(247, 245, 239, 0.93), rgba(247, 245, 239, 0.78)),
    url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=1800&q=80") center/cover;
  z-index: -2;
}

.hero-bg::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(52vw, 720px);
  height: min(52vw, 720px);
  content: "";
  background:
    linear-gradient(135deg, rgba(207, 75, 55, 0.55), transparent 52%),
    linear-gradient(45deg, rgba(15, 118, 110, 0.48), transparent 58%);
  clip-path: polygon(24% 0, 100% 0, 100% 100%, 0 100%);
  opacity: 0.8;
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 390px;
  gap: 64px;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1,
h2 {
  font-family: "Playfair Display", Georgia, serif;
  line-height: 0.98;
}

h1 {
  max-width: 760px;
  margin-bottom: 1.35rem;
  font-size: clamp(4rem, 10vw, 7.8rem);
}

h2 {
  margin-bottom: 1.2rem;
  font-size: clamp(2.25rem, 5vw, 4.4rem);
}

h3 {
  margin-bottom: 0.65rem;
  font-size: 1.18rem;
  line-height: 1.25;
}

.hero-lead {
  max-width: 660px;
  color: #2c3a46;
  font-size: clamp(1.1rem, 2.1vw, 1.45rem);
}

.hero-actions,
.contact-actions {
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.82rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.button.primary {
  background: var(--teal);
  color: #fff;
}

.button.secondary {
  border-color: rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 0.72);
}

.button.light {
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.28);
}

.profile-panel {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.portrait-wrap {
  aspect-ratio: 1;
  margin-bottom: 1.25rem;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-strong);
}

.portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel-label {
  margin-bottom: 0.25rem;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-panel h2 {
  margin-bottom: 0.2rem;
  font-family: Inter, sans-serif;
  font-size: 1.45rem;
  line-height: 1.15;
}

.quick-facts {
  display: grid;
  gap: 0.8rem;
  margin: 1.35rem 0 0;
}

.quick-facts div {
  padding-top: 0.85rem;
  border-top: 1px solid rgba(15, 23, 42, 0.12);
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 0.15rem 0 0;
  font-weight: 700;
}

.stats-band {
  padding: 34px 0;
  background: var(--navy);
  color: #fff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.16);
}

.stat {
  min-height: 132px;
  padding: 1.35rem;
  background: var(--navy);
}

.stat strong {
  display: block;
  margin-bottom: 0.45rem;
  color: #f0c762;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1;
}

.stat span {
  color: rgba(255, 255, 255, 0.78);
}

.split {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 72px;
  align-items: start;
}

.section-heading {
  max-width: 690px;
}

.section-heading.centered {
  margin-inline: auto;
  text-align: center;
}

.content-stack {
  display: grid;
  gap: 1.1rem;
  color: #344452;
  font-size: 1.08rem;
}

.content-stack p {
  margin: 0;
}

.muted {
  background: var(--surface-strong);
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 44px;
}

.stack-card,
.project-card,
.timeline-item {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: var(--radius);
  background: var(--surface);
}

.stack-card {
  min-height: 160px;
  padding: 1.25rem;
}

.stack-card h3 {
  color: var(--teal);
}

.stack-card p,
.project-card p,
.timeline-item p,
.contact-panel p {
  color: var(--muted);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 36px;
}

.project-card {
  display: flex;
  min-height: 278px;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.35rem;
}

.project-card.featured {
  grid-column: span 2;
  background: var(--navy);
  color: #fff;
}

.project-card.featured p {
  color: rgba(255, 255, 255, 0.72);
}

.project-type {
  margin-bottom: 0.8rem;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-card.featured .project-type {
  color: #f0c762;
}

.project-card a {
  width: fit-content;
  color: currentColor;
  font-weight: 800;
  text-decoration-color: rgba(15, 23, 42, 0.28);
  text-underline-offset: 0.25em;
}

.project-card.featured a {
  text-decoration-color: rgba(255, 255, 255, 0.36);
}

.timeline-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
}

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

.timeline-item {
  position: relative;
  padding: 1.35rem 1.35rem 1.35rem 1.65rem;
}

.timeline-item::before {
  position: absolute;
  inset: 1.35rem auto 1.35rem 0;
  width: 4px;
  content: "";
  background: linear-gradient(var(--teal), var(--coral));
}

.timeline-date {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--green);
  font-size: 0.84rem;
  font-weight: 800;
}

.focus-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.focus-grid span {
  padding: 0.72rem 0.86rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 800;
}

.contact-section {
  padding-top: 0;
}

.contact-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.96), rgba(15, 23, 42, 0.98)),
    url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=1500&q=80") center/cover;
  color: #fff;
}

.contact-panel h2 {
  max-width: 780px;
  margin-bottom: 0.8rem;
}

.contact-panel p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.78);
}

.contact-panel .eyebrow {
  color: #f0c762;
}

.footer {
  padding: 26px 0;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  font-size: 0.92rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 550ms ease, transform 550ms ease;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media (max-width: 920px) {
  .section {
    padding: 72px 0;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid,
  .split,
  .timeline-layout,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .profile-panel {
    max-width: 460px;
  }

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

  .project-card.featured {
    grid-column: span 2;
  }

  .contact-actions {
    margin-top: 0;
  }
}

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

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    inset: 72px 16px auto;
    display: grid;
    gap: 0;
    padding: 0.65rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
  }

  .nav-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-menu a {
    padding: 0.85rem;
  }

  .hero {
    padding-top: 110px;
  }

  .hero-grid {
    gap: 36px;
  }

  h1 {
    font-size: 3.55rem;
  }

  h2 {
    font-size: 2.2rem;
  }

  .stats-grid,
  .stack-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card.featured {
    grid-column: auto;
  }

  .stat {
    min-height: 112px;
  }

  .hero-actions .button,
  .contact-actions .button {
    width: 100%;
  }

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