/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; }
body {
  background: #000;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #fff;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }

.font-instrument { font-family: 'Instrument Serif', serif; }

:root {
  --ease-entrance: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-overlay: cubic-bezier(0.76, 0, 0.24, 1);
}

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 50;
  background: transparent;
  transition: background-color 500ms ease, backdrop-filter 500ms ease;
}
.navbar.scrolled {
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.navbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
@media (min-width: 768px) {
  .navbar-inner { padding: 0 40px; height: 80px; }
}

.nav-item {
  opacity: 0;
  transform: translateY(-16px);
  transition: opacity 700ms var(--ease-entrance), transform 700ms var(--ease-entrance);
}
.navbar.mounted .nav-logo { opacity: 1; transform: translateY(0); transition-delay: 0ms; }
.navbar.mounted .nav-pill,
.navbar.mounted .nav-hamburger { opacity: 1; transform: translateY(0); transition-delay: 200ms; }
.navbar.mounted .nav-flower { opacity: 1; transform: translateY(0); transition-delay: 400ms; }

.nav-logo {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  z-index: 50;
  background: none; border: none; cursor: pointer;
}
@media (min-width: 768px) { .nav-logo { font-size: 1.5rem; } }

.nav-center, .nav-right { display: none; }
@media (min-width: 768px) {
  .nav-center, .nav-right { display: flex; align-items: center; }
}

.nav-pill {
  padding: 8px 20px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  font-size: 0.875rem;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 200ms ease;
}
.nav-pill:hover { background: rgba(255,255,255,0.1); }

.nav-flower { color: rgba(255,255,255,0.9); width: 28px; height: 28px; }

.nav-hamburger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 32px; height: 32px;
  background: none; border: none; cursor: pointer;
  z-index: 50;
}
@media (min-width: 768px) { .nav-hamburger { display: none; } }
.nav-hamburger .bar {
  width: 24px; height: 2px; background: #fff;
  transition: transform 500ms var(--ease-overlay);
}
.nav-hamburger.open .bar-top { transform: rotate(45deg) translateY(4px); }
.nav-hamburger.open .bar-bottom { transform: rotate(-45deg) translateY(-4px); }

/* ---------- Overlay menu ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 700ms var(--ease-overlay), visibility 700ms var(--ease-overlay);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.overlay.open { opacity: 1; visibility: visible; }

.overlay-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}
.overlay-link {
  font-size: 2.25rem;
  line-height: 1;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--ease-overlay), transform 600ms var(--ease-overlay);
}
.overlay-link:hover { opacity: 0.6 !important; }
@media (min-width: 768px) { .overlay-link { font-size: 3.75rem; } }
.overlay.open .overlay-link { opacity: 1; transform: translateY(0); }
.overlay.open .overlay-link:nth-child(1) { transition-delay: 150ms; }
.overlay.open .overlay-link:nth-child(2) { transition-delay: 230ms; }
.overlay.open .overlay-link:nth-child(3) { transition-delay: 310ms; }
.overlay.open .overlay-link:nth-child(4) { transition-delay: 390ms; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.hero-bg-wrap {
  position: absolute; inset: 0;
  transform: scale(1.05);
  opacity: 0;
  transition: transform 1400ms var(--ease-entrance), opacity 1400ms var(--ease-entrance);
}
.hero-bg-wrap.mounted { transform: scale(1); opacity: 1; }
.hero-video { width: 100%; height: 100%; object-fit: cover; }

.hero-fg {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 24px 64px;
  max-width: 56rem;
  margin: 0 auto;
}
@media (min-width: 768px) { .hero-fg { padding-bottom: 96px; } }

.hero-item {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 900ms var(--ease-entrance), transform 900ms var(--ease-entrance);
  transition-delay: 0ms;
}
.hero-fg.mounted .hero-title { opacity: 1; transform: translateY(0); transition-delay: 400ms; }
.hero-fg.mounted .hero-sub { opacity: 1; transform: translateY(0); transition-delay: 600ms; }
.hero-fg.mounted .hero-cta { opacity: 1; transform: translateY(0); transition-delay: 800ms; }

.hero-title {
  color: #fff;
  font-size: 2.5rem;
  line-height: 0.95;
  margin-bottom: 1.25rem;
}
@media (min-width: 640px) { .hero-title { font-size: 3rem; } }
@media (min-width: 768px) { .hero-title { font-size: 3.75rem; margin-bottom: 1.5rem; } }
@media (min-width: 1024px) { .hero-title { font-size: 4.5rem; } }
.hero-title br { display: none; }
@media (min-width: 640px) { .hero-title br { display: block; } }

.hero-sub {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  margin-bottom: 2rem;
  max-width: 28rem;
  margin-left: auto; margin-right: auto;
}
@media (min-width: 768px) { .hero-sub { font-size: 1.125rem; margin-bottom: 2.5rem; } }

.hero-cta {
  display: inline-block;
  padding: 14px 32px;
  background: #fff;
  color: #000;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  transition: background-color 200ms ease;
}
.hero-cta:hover { background: rgba(255,255,255,0.9); }
@media (min-width: 768px) { .hero-cta { font-size: 1rem; } }

/* ---------- Reveal-on-scroll sections (About / Skills / Work / Contact) ---------- */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 96px 24px;
}
@media (min-width: 768px) { .section { padding: 140px 40px; } }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms var(--ease-entrance), transform 900ms var(--ease-entrance);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

.section-eyebrow {
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-title {
  font-family: 'Instrument Serif', serif;
  font-size: 2.25rem;
  margin-bottom: 24px;
}
@media (min-width: 768px) { .section-title { font-size: 3rem; } }

.about-text {
  color: rgba(255,255,255,0.7);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 42rem;
}

.about-role {
  display: inline-block;
  margin-top: 24px;
  padding: 8px 18px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 9999px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
}

/* Skills */
.skills-list { margin-top: 40px; display: flex; flex-direction: column; gap: 22px; }
.skill-row { }
.skill-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px; font-size: 0.95rem; color: rgba(255,255,255,0.85);
}
.skill-percent { color: rgba(255,255,255,0.5); font-variant-numeric: tabular-nums; }
.skill-track {
  width: 100%; height: 6px; border-radius: 9999px;
  background: rgba(255,255,255,0.12); overflow: hidden;
}
.skill-fill {
  height: 100%; border-radius: 9999px; background: #fff;
  width: 0%;
  transition: width 1200ms var(--ease-entrance);
}
.skill-row.in-view .skill-fill { width: var(--target-width); }

/* Work */
.work-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: rgba(255,255,255,0.12);
}
@media (min-width: 768px) { .work-grid { grid-template-columns: 1fr 1fr; } }
.work-card {
  background: #000;
  padding: 40px 28px;
  transition: background-color 300ms ease;
}
.work-card:hover { background: #0a0a0a; }
.work-card-title { font-family: 'Instrument Serif', serif; font-size: 1.5rem; margin-bottom: 6px; }
.work-card-sub { color: rgba(255,255,255,0.5); font-size: 0.9rem; }

/* Contact */
.contact-sub { color: rgba(255,255,255,0.7); margin-bottom: 28px; }
.contact-email {
  display: inline-block;
  font-size: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-bottom: 4px;
  transition: opacity 200ms ease;
}
.contact-email:hover { opacity: 0.6; }

.footer-note {
  text-align: center;
  color: rgba(255,255,255,0.35);
  font-size: 0.8rem;
  padding: 40px 24px 60px;
}
