:root {
  --bg: #FAFAF8;
  --fg: #1A1A18;
  --fg-muted: #6B6B66;
  --fg-light: #9E9E96;
  --accent: #2A2A28;
  --border: #E4E4E0;
  --border-light: #F0F0EC;
  --highlight: #D4FF60;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'DM Sans', -apple-system, sans-serif;
  --max-w: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 1.5rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(250,250,248,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  transition: all 0.4s var(--ease);
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.nav-logo span {
  color: var(--fg-light);
  font-style: italic;
  margin-left: 0.15em;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  position: relative;
  transition: color 0.3s var(--ease);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--fg);
  transition: width 0.4s var(--ease);
}

.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--fg); }
.nav-links a.active::after { width: 100%; }

/* ─── HAMBURGER ─── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  z-index: 200;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--fg);
  transition: all 0.3s var(--ease);
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -5px); }

/* ─── MOBILE MENU ─── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 150;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}
.mobile-menu.visible {
  opacity: 1;
  pointer-events: all;
}
.mobile-menu a {
  font-family: var(--serif);
  font-size: 2.5rem;
  color: var(--fg);
  transition: color 0.3s;
}
.mobile-menu a:hover { color: var(--fg-muted); }

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 2.5rem 4rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.hero-label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-light);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.2s forwards;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--fg);
  max-width: 24ch;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.4s forwards;
}

.hero-line,
.hero-static-line {
  display: block;
}

.hero-line {
  white-space: nowrap;
}

.hero-rotator {
  display: inline-flex;
  align-items: baseline;
  width: 14ch;
  min-height: 1.1em;
  margin-left: 0.08em;
  vertical-align: baseline;
  color: var(--fg);
}

.hero-rotator::after {
  content: '|';
  margin-left: 0.04em;
  animation: blinkCaret 0.9s steps(1, end) infinite;
}

.hero-rotator.is-deleting::after {
  animation-duration: 0.6s;
}

@keyframes blinkCaret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.hero h1 em {
  font-style: italic;
  background: linear-gradient(
    90deg,
    #ff0000, #ff8a00, #ffe600, #4caf50, #2196f3, #9c27b0, #ff0000
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainbow 4s linear infinite;
}

@keyframes rainbow {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.hero-sub {
  margin-top: 2.5rem;
  font-size: 1.15rem;
  color: var(--fg-muted);
  max-width: 44ch;
  line-height: 1.7;
  font-weight: 300;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.6s forwards;
}

.hero-cta {
  margin-top: 3.5rem;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease) 0.8s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 100px;
  transition: all 0.35s var(--ease);
  cursor: pointer;
  border: none;
  font-family: var(--sans);
}

.btn-primary {
  background: var(--fg);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(26,26,24,0.15);
}

.btn-outline {
  background: transparent;
  color: var(--fg);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--fg);
  transform: translateY(-2px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  min-height: calc(100vh - 12rem);
}
.hero-text {
  z-index: 2;
  min-width: 0;
}
.hero-visual {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 450px;
}
.hero-visual canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* ─── SERVICES STRIP ─── */
.services-strip {
  border-top: 1px solid var(--border);
  padding: 5rem 2.5rem;
}
.services-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.services-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-light);
  margin-bottom: 3rem;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
}
.service-card {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}
.service-card h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}
.service-card p {
  color: var(--fg-muted);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.65;
}

/* ─── LOCATIONS ─── */
.locations {
  border-top: 1px solid var(--border);
  padding: 5rem 2.5rem;
  position: relative;
  overflow: visible;
}
.locations-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  position: relative;
}


.locations-text {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}
.locations-text em { font-style: italic; color: var(--fg-muted); }
.flag {
  display: inline-block;
  width: 1.4em;
  height: 0.95em;
  vertical-align: -0.05em;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 0.5px rgba(0,0,0,0.1);
}
.locations-cities {
  display: flex;
  gap: 2.5rem;
}
.city {
  text-align: right;
}
.city-name {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-light);
}
.city-detail {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin-top: 0.25rem;
}

/* ─── ABOUT PAGE ─── */
.about-hero {
  padding: 10rem 2.5rem 5rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 5rem;
  align-items: start;
}
.about-photo {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-light);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.about-content h1 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}
.about-content h1 em {
  font-style: italic;
  color: var(--fg-muted);
}
.about-intro {
  font-size: 1.1rem;
  color: var(--fg-muted);
  font-weight: 300;
  line-height: 1.75;
  margin-bottom: 3rem;
  max-width: 52ch;
}

.resume-section {
  border-top: 1px solid var(--border);
  padding: 4rem 2.5rem;
}
.resume-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.resume-block {
  margin-bottom: 4rem;
}
.resume-block:last-child { margin-bottom: 0; }
.resume-heading {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-light);
  margin-bottom: 2rem;
}
.resume-item {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--border-light);
}
.resume-item-left h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
}
.resume-item-left .dates {
  font-size: 0.85rem;
  color: var(--fg-light);
  margin-top: 0.25rem;
}
.resume-item-right p {
  font-size: 0.95rem;
  color: var(--fg-muted);
  font-weight: 300;
  line-height: 1.7;
}
.resume-item-right .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.tag {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--fg-muted);
}

/* ─── CONTACT PAGE ─── */
.contact-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 2.5rem 4rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.contact-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.contact-hero h1 em { font-style: italic; color: var(--fg-muted); }
.contact-sub {
  font-size: 1.1rem;
  color: var(--fg-muted);
  font-weight: 300;
  line-height: 1.7;
  max-width: 48ch;
  margin-bottom: 4rem;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}
.contact-details { display: flex; flex-direction: column; gap: 2.5rem; }
.contact-item {}
.contact-item-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-light);
  margin-bottom: 0.5rem;
}
.contact-item a,
.contact-item p {
  font-family: var(--serif);
  font-size: 1.35rem;
  transition: color 0.3s;
}
.contact-item a:hover { color: var(--fg-muted); }

.contact-socials {
  display: flex;
  gap: 1.25rem;
  margin-top: 1rem;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 0.6rem 1.2rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  transition: all 0.35s var(--ease);
}
.social-link:hover {
  border-color: var(--fg);
  color: var(--fg);
  transform: translateY(-2px);
}
.social-link svg { width: 16px; height: 16px; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.contact-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-light);
}
.form-group input,
.form-group textarea {
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.9rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--fg);
  transition: border-color 0.3s;
  outline: none;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--fg);
}
.form-group textarea { min-height: 140px; }
.contact-turnstile-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
#turnstileContainer:empty { display: none; }
.contact-note {
  font-size: 0.9rem;
  color: var(--fg-light);
  line-height: 1.6;
}
.contact-status {
  min-height: 1.5rem;
  font-size: 0.95rem;
  color: var(--fg-light);
}
.contact-status.is-error { color: #9f3a38; }
.contact-status.is-success { color: #2b6f4a; }
.contact-form button:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* ─── WAVE VISUAL ─── */
.wave-visual {
  margin-top: 2.5rem;
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: 10px;
  max-width: 520px;
}
.wave-visual canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2.5rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-left {
  font-size: 0.85rem;
  color: var(--fg-light);
}
.footer-right {
  display: flex;
  gap: 2rem;
}
.footer-right a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-light);
  transition: color 0.3s;
}
.footer-right a:hover { color: var(--fg); }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .hero-rotator::after {
    animation: none;
  }

  .hero-rotator.is-deleting::after {
    animation: none;
  }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  nav { padding: 1.25rem 2rem; }

  .hero,
  .contact-hero {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .hero {
    padding-top: 7.5rem;
    padding-bottom: 3rem;
    min-height: auto;
  }

  .hero-grid {
    gap: 2rem;
    min-height: auto;
  }

  .hero h1 {
    font-size: clamp(3.1rem, 6vw, 4.5rem);
    max-width: 16ch;
  }

  .hero-line {
    white-space: normal;
  }

  .hero-rotator {
    width: auto;
    min-width: 8ch;
    max-width: 100%;
    flex-wrap: wrap;
  }

  .hero-sub {
    font-size: 1.05rem;
    max-width: 40ch;
  }

  .hero-visual {
    min-height: 360px;
  }

  .services-strip,
  .locations,
  .resume-section,
  footer {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .services-strip,
  .locations,
  .resume-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .locations-inner {
    align-items: flex-start;
  }

  .locations-cities {
    flex-wrap: wrap;
    gap: 1.5rem;
  }

  .city {
    text-align: left;
  }

  .about-hero {
    padding: 8rem 2rem 4rem;
  }

  .about-grid {
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
    gap: 2.5rem;
  }

  .about-intro {
    font-size: 1rem;
  }

  .resume-item {
    grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.2fr);
    gap: 1.5rem;
  }

  .contact-hero {
    padding-top: 7.5rem;
    padding-bottom: 3rem;
    min-height: auto;
  }

  .contact-grid {
    gap: 2.5rem;
  }

  .contact-item a,
  .contact-item p {
    font-size: 1.2rem;
  }

  .footer-right {
    flex-wrap: wrap;
    gap: 1.25rem;
  }
}

@media (max-width: 860px) {
  .about-grid,
  .contact-grid,
  .resume-item {
    grid-template-columns: 1fr;
  }

  .about-photo {
    max-width: 320px;
    margin: 0 auto;
  }

  .wave-visual {
    max-width: none;
  }
}

@media (max-width: 767px) {
  nav { padding: 1.25rem 1.5rem; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { display: flex; }

  .hero { padding: 7rem 1.5rem 2rem; min-height: auto; }
  .hero-label { font-size: 0.55rem; margin-bottom: 1rem; }
  .hero-sub { font-size: 0.9rem; margin-top: 1.5rem; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 0;
    min-height: auto;
  }
  .hero h1 {
    font-size: clamp(2.5rem, 12vw, 4rem);
    line-height: 1.05;
  }
  .hero-visual { display: none; }
  .wave-visual { display: none; }
  .hero-cta { flex-direction: column; }
  .btn { text-align: center; justify-content: center; width: 100%; }

  .services-strip, .locations, .resume-section, .contact-hero {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  .services-strip { padding-top: 3rem; padding-bottom: 3rem; }
  .services-grid { grid-template-columns: 1fr; gap: 1.5rem; }

  .locations { padding-top: 3rem; padding-bottom: 3rem; }
  .locations-inner { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .locations-text { font-size: 1.4rem; }
  .locations-cities { flex-direction: column; gap: 1rem; }
  .city { text-align: left; }

  .about-hero { padding: 7rem 1.5rem 3rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-photo {
    max-width: 220px;
    aspect-ratio: 1/1;
    border-radius: 50%;
    margin: 0 auto;
  }
  .about-content { text-align: center; }
  .about-content h1 { margin-bottom: 1.5rem; }
  .about-intro { margin-left: auto; margin-right: auto; font-size: 1rem; }
  .about-content .hero-cta { justify-content: center; }

  .resume-section { padding-top: 3rem; padding-bottom: 3rem; }
  .resume-item { grid-template-columns: 1fr; gap: 0.75rem; }
  .resume-block { margin-bottom: 2.5rem; }
  .tags { gap: 0.4rem; }
  .tag { font-size: 0.7rem; padding: 0.25rem 0.6rem; }

  .contact-hero { padding: 7rem 1.5rem 3rem; }
  .contact-hero h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-item a,
  .contact-item p { font-size: 1.1rem; }
  .contact-socials { flex-wrap: wrap; }
  .contact-form button { align-self: stretch !important; }

  footer { padding: 2rem 1.5rem; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 0.75rem; }
  .footer-right { gap: 1.5rem; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 2rem; }
  .hero-sub { font-size: 0.95rem; }
  .service-card h3 { font-size: 1.3rem; }
  .service-card p { font-size: 0.88rem; }
  .contact-socials { flex-direction: column; }
  .social-link { justify-content: center; }
}
