:root {
  --ink: #1d1a1c;
  --soft-ink: #5e5a61;
  --paper: #fffdf9;
  --ivory: #fff8ed;
  --mist: #eef2f8;
  --blue: #6c7fa5;
  --clay: #ff8d6b;
  --leaf: #a88d5e;
  --gold: #dbc58c;
  --deep: #181928;
  --glass: rgba(255, 253, 249, 0.72);
  --shadow: 0 24px 70px rgba(24, 25, 40, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 141, 107, 0.18), transparent 28%),
    radial-gradient(circle at 86% 8%, rgba(108, 127, 165, 0.18), transparent 30%),
    linear-gradient(135deg, #fffdf9 0%, #f8f1e6 48%, #eef2f8 100%);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background-image:
    linear-gradient(rgba(24, 25, 40, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 25, 40, 0.028) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 82%, transparent);
}

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

.cursor-glow {
  position: fixed;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  opacity: 0.22;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 141, 107, 0.62), transparent 66%);
  transition: opacity 200ms ease;
}

.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 10;
  width: min(1120px, calc(100% - 32px));
  height: 64px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.72);
  backdrop-filter: blur(22px);
  box-shadow: 0 14px 44px rgba(20, 31, 25, 0.14);
  transform: translateX(-50%);
  transition: box-shadow 240ms ease, background 240ms ease, top 240ms ease;
}

.site-header.is-scrolled {
  top: 10px;
  background: rgba(255, 250, 241, 0.9);
  box-shadow: 0 18px 52px rgba(20, 31, 25, 0.2);
}

.brand {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ivory);
  background: linear-gradient(145deg, #6c7fa5, var(--deep));
  font-family: "Cormorant Garamond", serif;
  font-size: 1.15rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 14px 26px rgba(16, 25, 21, 0.26);
}

.nav-links {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a,
.nav-cta {
  padding: 12px 15px;
  border-radius: 999px;
  color: rgba(23, 33, 28, 0.78);
  font-size: 0.9rem;
  font-weight: 700;
  transition: color 220ms ease, background 220ms ease, transform 220ms ease;
}

.nav-links a:hover {
  color: var(--deep);
  background: rgba(108, 127, 165, 0.12);
}

.nav-cta {
  color: var(--ivory);
  background: var(--deep);
}

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

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.78fr);
  align-items: center;
  gap: clamp(34px, 7vw, 112px);
  padding: 132px min(8vw, 140px) 78px;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.99), rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at 78% 54%, rgba(255, 141, 107, 0.12), transparent 28%),
    linear-gradient(135deg, #ffffff, #fff8ed 58%, #eef2f8);
}

.hero::after {
  content: "";
  position: absolute;
  right: 6vw;
  bottom: 7vh;
  z-index: -1;
  width: 46vw;
  max-width: 640px;
  aspect-ratio: 1;
  border: 1px solid rgba(108, 127, 165, 0.14);
  border-radius: 50%;
  transform: translateY(18%);
}

.hero::before {
  content: "";
  position: absolute;
  left: min(8vw, 140px);
  bottom: 24px;
  z-index: -1;
  width: min(390px, 72vw);
  height: 12px;
  background: linear-gradient(90deg, var(--clay), var(--blue), transparent);
  opacity: 0.22;
}

.hero-content {
  max-width: 760px;
  color: var(--ink);
  text-shadow: none;
}

.hero-kicker {
  margin: 0 0 36px;
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.script {
  margin: 0 0 4px;
  color: var(--clay);
  font-family: "Parisienne", cursive;
  font-size: clamp(2.3rem, 6vw, 5.9rem);
  line-height: 0.92;
}

p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 0.98;
  letter-spacing: 0;
}

h1 {
  max-width: 13ch;
  font-size: clamp(4rem, 7.2vw, 8.4rem);
  font-weight: 700;
}

h1 span {
  display: block;
  margin-top: 0.16em;
}

h1 em {
  color: var(--clay);
  font-style: normal;
  font-weight: 500;
}

h2 {
  max-width: 12ch;
  font-size: clamp(2.45rem, 6vw, 5.7rem);
}

h3 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.08;
}

.hero-copy {
  max-width: 620px;
  margin: 52px 0 0;
  color: #454149;
  font-size: clamp(1.02rem, 1.5vw, 1.24rem);
  line-height: 1.82;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.01em;
  transform: translateY(0);
  transition: transform 220ms ease, box-shadow 220ms ease, color 220ms ease, border-color 220ms ease;
}

.button::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -2;
  border-radius: inherit;
}

.button::after {
  content: "";
  position: absolute;
  top: -70%;
  left: -35%;
  z-index: -1;
  width: 48%;
  height: 240%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.46), transparent);
  transform: rotate(22deg) translateX(-160%);
  transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.button:hover::after {
  transform: rotate(22deg) translateX(360%);
}

.button:focus-visible {
  outline: 3px solid rgba(255, 141, 107, 0.34);
  outline-offset: 4px;
}

.button.primary {
  color: #fffdf9;
  background: linear-gradient(135deg, #111423 0%, #566b96 58%, #ff8d6b 140%);
  box-shadow: 0 18px 38px rgba(86, 107, 150, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.button.primary::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 38%, rgba(255, 141, 107, 0.18));
}

.button.primary:hover {
  box-shadow: 0 24px 54px rgba(86, 107, 150, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.button.secondary {
  color: var(--ink);
  border: 1px solid rgba(24, 25, 40, 0.14);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 248, 237, 0.54));
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 30px rgba(24, 25, 40, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.button.secondary::before {
  background: linear-gradient(135deg, rgba(108, 127, 165, 0.1), transparent 50%, rgba(255, 141, 107, 0.12));
}

.button.secondary:hover {
  border-color: rgba(108, 127, 165, 0.34);
  box-shadow: 0 20px 46px rgba(24, 25, 40, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.hero-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: min(720px, 100%);
  margin-top: 46px;
  border-top: 1px solid rgba(24, 25, 40, 0.12);
  border-bottom: 1px solid rgba(24, 25, 40, 0.12);
}

.hero-visual {
  position: relative;
  align-self: center;
  justify-self: center;
  width: min(520px, 100%);
  margin: 0;
  filter: drop-shadow(0 24px 46px rgba(24, 25, 40, 0.12));
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 9% 3% 11% 6%;
  z-index: -1;
  border-radius: 42% 58% 50% 50%;
  background: linear-gradient(145deg, rgba(238, 242, 248, 0.9), rgba(255, 248, 237, 0.2));
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  animation: floatPortrait 7s ease-in-out infinite;
}

.glass {
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
}

.panel-kicker,
.eyebrow,
.timeline-date,
.project-topline,
.site-footer span {
  color: var(--clay);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.stat-row {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 18px 20px;
  border-top: 0;
  border-right: 1px solid rgba(24, 25, 40, 0.12);
}

.stat-row:last-child {
  border-right: 0;
}

.stat-row span {
  color: var(--soft-ink);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section {
  padding: clamp(76px, 11vw, 140px) min(6vw, 78px);
}

.section-heading {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 32px;
  align-items: end;
  max-width: 1180px;
  margin: 0 auto 54px;
}

.eyebrow {
  margin: 0 0 12px;
}

.about-grid {
  max-width: 1180px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: stretch;
  margin: 0 auto;
}

.about-copy {
  columns: 2 280px;
  column-gap: 42px;
  color: var(--soft-ink);
  font-size: 1.02rem;
  line-height: 1.85;
}

.about-copy p {
  margin-top: 0;
}

.signature-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 28px;
  border-radius: var(--radius);
  color: var(--ivory);
  background:
    linear-gradient(145deg, rgba(108, 127, 165, 0.95), rgba(24, 25, 40, 0.96)),
    linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.16));
  box-shadow: var(--shadow);
}

.signature {
  font-family: "Parisienne", cursive;
  color: #ffe7cf;
  font-size: clamp(3rem, 5vw, 4.8rem);
  line-height: 0.92;
}

.signature-card p {
  margin: 20px 0 0;
  color: rgba(255, 250, 241, 0.8);
  line-height: 1.7;
}

.dark-section {
  color: var(--ink);
  background:
    radial-gradient(circle at 86% 14%, rgba(108, 127, 165, 0.17), transparent 34%),
    linear-gradient(135deg, #f6efe4, #eef2f8);
  border-top: 1px solid rgba(24, 25, 40, 0.08);
  border-bottom: 1px solid rgba(24, 25, 40, 0.08);
}

.dark-section .section-heading h2 {
  max-width: 13ch;
}

.timeline {
  max-width: 1180px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 0 auto;
}

.timeline-card {
  padding: 30px;
  color: var(--ink);
  background: rgba(255, 253, 249, 0.76);
}

.timeline-card h3 {
  margin-top: 18px;
}

.timeline-card p,
.skill-card p,
.project-card p,
.contact-card p {
  color: var(--soft-ink);
  line-height: 1.75;
}

.expertise-grid,
.project-grid {
  max-width: 1180px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0 auto;
}

.skill-card {
  min-height: 300px;
  padding: 24px;
  border: 1px solid rgba(24, 25, 40, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 253, 249, 0.72);
  box-shadow: 0 20px 46px rgba(24, 25, 40, 0.08);
  transform-style: preserve-3d;
}

.skill-card span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 52px;
  border-radius: 50%;
  color: var(--deep);
  background: #f6dfcc;
  font-weight: 900;
}

.projects-section {
  background: linear-gradient(180deg, rgba(255, 253, 249, 0), rgba(108, 127, 165, 0.13));
}

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  position: relative;
  min-height: 360px;
  padding: 26px;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 250, 241, 0.92), rgba(236, 244, 229, 0.86)),
    radial-gradient(circle at top right, rgba(184, 93, 112, 0.18), transparent 48%);
  box-shadow: var(--shadow);
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.project-card::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(89, 115, 83, 0.2);
  border-radius: 50%;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 32px 80px rgba(19, 32, 25, 0.2);
}

.project-topline {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 72px;
}

.contact-section {
  padding: clamp(76px, 10vw, 126px) min(6vw, 78px);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 141, 107, 0.18), transparent 30%),
    radial-gradient(circle at 86% 74%, rgba(108, 127, 165, 0.18), transparent 28%),
    linear-gradient(135deg, #fffdf9, #f4eadc);
}

.contact-card {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 54px);
  text-align: center;
}

.contact-card h2 {
  max-width: 13ch;
  margin: 0 auto;
}

.contact-card .script {
  color: var(--clay);
  font-size: clamp(2.3rem, 4vw, 4.4rem);
}

.contact-card .button {
  margin-top: 18px;
}

.contact-card a:not(.button) {
  color: var(--blue);
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px min(6vw, 78px);
  color: var(--ivory);
  background: var(--deep);
}

.site-footer p {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 720ms ease, transform 720ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.tilt {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(0);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.tilt:hover {
  box-shadow: 0 30px 84px rgba(19, 32, 25, 0.24);
}

@keyframes floatPortrait {
  from {
    transform: translate3d(0, 0, 0) rotate(-0.4deg);
  }
  to {
    transform: translate3d(0, -14px, 0) rotate(0.6deg);
  }
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: auto 1fr;
  }

  .nav-links {
    display: none;
  }

  .nav-cta {
    justify-self: end;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 116px 28px 58px;
  }

  .hero-content {
    max-width: 820px;
  }

  .hero-visual {
    width: min(460px, 80vw);
  }

  .section-heading,
  .about-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .section-heading h2 {
    max-width: 13ch;
  }

  .expertise-grid,
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body::before,
  .cursor-glow {
    display: none;
  }

  .site-header {
    top: 10px;
    width: calc(100% - 20px);
    height: 58px;
    padding: 8px;
  }

  .brand {
    width: 40px;
    height: 40px;
  }

  .nav-cta {
    padding: 11px 14px;
    font-size: 0.84rem;
  }

  .hero {
    min-height: 100svh;
    gap: 22px;
    padding: 100px 18px 42px;
    background:
      radial-gradient(circle at 78% 15%, rgba(108, 127, 165, 0.14), transparent 36%),
      linear-gradient(145deg, #ffffff, #fff8ed 62%, #eef2f8);
  }

  .hero-content {
    display: contents;
  }

  .hero-kicker {
    order: 1;
  }

  .hero h1 {
    order: 2;
  }

  .hero-visual {
    order: 3;
  }

  .hero-copy {
    order: 4;
  }

  .hero-actions {
    order: 5;
  }

  .hero-panel {
    order: 6;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(3rem, 13.8vw, 4.8rem);
    line-height: 0.96;
  }

  h2 {
    font-size: clamp(2.35rem, 14vw, 3.7rem);
  }

  .script {
    font-size: clamp(2.8rem, 13.8vw, 3.7rem);
    line-height: 0.86;
  }

  .hero-kicker {
    margin-bottom: 22px;
    font-size: 0.72rem;
  }

  .hero-copy {
    margin-top: 28px;
    font-size: 1rem;
    line-height: 1.62;
  }

  .button {
    width: 100%;
  }

  .hero-actions {
    gap: 10px;
    margin-top: 24px;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    width: 100%;
    margin-top: 26px;
  }

  .stat-row {
    padding: 14px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(24, 25, 40, 0.12);
  }

  .stat-row:last-child {
    border-bottom: 0;
  }

  .hero-visual {
    width: min(315px, 82vw);
    margin: -10px auto 0;
  }

  .section {
    padding: 74px 18px;
  }

  .section-heading {
    gap: 12px;
    margin-bottom: 34px;
  }

  .about-copy {
    columns: 1;
  }

  .signature-card,
  .timeline-card,
  .skill-card,
  .project-card {
    min-height: auto;
    padding: 22px;
  }

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

  .skill-card span,
  .project-topline {
    margin-bottom: 34px;
  }

  .contact-section {
    padding: 74px 18px;
    background-attachment: scroll;
  }

  .site-footer {
    flex-direction: column;
    padding: 24px 18px;
  }
}

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