:root {
  --bg: #08080b;
  --bg-2: #0e0e14;
  --surface: #14141c;
  --line: #22222e;
  --text: #f4f4f6;
  --dim: #9a9aa8;
  --violet: #7c5cff;
  --cyan: #22d3ee;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .wordmark, .btn, .eyebrow {
  font-family: 'Sora', system-ui, 'Segoe UI', sans-serif;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  z-index: 100;
  transition: width 0.1s linear;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.7rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.btn-sm { padding: 0.6rem 1.25rem; font-size: 0.85rem; }

.btn-solid {
  background: linear-gradient(135deg, var(--violet), #a78bfa);
  color: #0b0713;
  box-shadow: 0 6px 30px rgba(124, 92, 255, 0.35);
}
.btn-solid:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(124, 92, 255, 0.5); }

.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--violet); transform: translateY(-3px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s, padding 0.4s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(8, 8, 11, 0.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.wordmark {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.14em;
  line-height: 1.1;
  display: flex;
  flex-direction: column;
}
.wordmark span { color: var(--violet); }

.nav-links { display: flex; gap: 2rem; }

.nav-links a {
  font-size: 0.9rem;
  color: var(--dim);
  position: relative;
  transition: color 0.3s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 1px;
  background: var(--violet);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.menu-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  transition: transform 0.35s var(--ease), opacity 0.25s;
}
.menu-toggle.open span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle.open span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(8, 8, 11, 0.97);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu a {
  font-family: 'Sora', sans-serif;
  font-size: 2rem;
  font-weight: 700;
}
.mobile-menu a:hover { color: var(--violet); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 1.5rem 5rem;
  overflow: hidden;
}

#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-glow {
  position: absolute;
  top: 45%; left: 50%;
  width: 900px; height: 900px;
  max-width: 130vw;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(124, 92, 255, 0.22) 0%, rgba(34, 211, 238, 0.08) 40%, transparent 68%);
  z-index: 0;
  pointer-events: none;
  animation: pulse 7s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.75; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

.hero-content { position: relative; z-index: 2; width: 100%; max-width: var(--max); }

/* Portrait */
.hero-portrait {
  position: relative;
  width: clamp(120px, 15vw, 168px);
  height: clamp(120px, 15vw, 168px);
  margin: 0 auto 2.25rem;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease) 0.1s forwards;
  transition: transform 0.4s var(--ease);
}

.hero-portrait img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(124, 92, 255, 0.55);
  box-shadow: 0 0 50px rgba(124, 92, 255, 0.4);
  position: relative;
  z-index: 2;
}

.portrait-ring {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px solid rgba(124, 92, 255, 0.35);
  animation: spin 14s linear infinite;
}
.portrait-ring::before {
  content: '';
  position: absolute;
  top: -3px; left: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}
.portrait-ring.ring-2 {
  inset: -28px;
  border-color: rgba(34, 211, 238, 0.2);
  border-style: dashed;
  animation: spin 22s linear infinite reverse;
}
.portrait-ring.ring-2::before { background: var(--violet); box-shadow: 0 0 12px var(--violet); }

@keyframes spin { to { transform: rotate(360deg); } }

.portrait-badge {
  position: absolute;
  bottom: -10px; left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--cyan);
  z-index: 3;
}

/* Name */
.hero-name {
  font-size: clamp(2.8rem, 13vw, 9.5rem);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.03em;
  margin-bottom: 1.75rem;
}

.hero-name .line {
  display: block;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 1s var(--ease) forwards;
}
.hero-name .line:first-child { animation-delay: 0.25s; }
.hero-name .line:last-child { animation-delay: 0.4s; }

.hero-name .outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--violet);
  text-stroke: 1.5px var(--violet);
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.hero-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: clamp(0.95rem, 2.2vw, 1.25rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 1s var(--ease) 0.55s forwards;
}
.hero-flow i { color: var(--cyan); font-style: normal; }
.hero-flow span:last-of-type { color: var(--text); }

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 1s var(--ease) 0.7s forwards;
}

.scroll-cue {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--dim);
  opacity: 0;
  animation: fadeUp 1s var(--ease) 1s forwards;
}
.cue-dot { animation: cueDrop 1.8s ease-in-out infinite; }
@keyframes cueDrop {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(14px); opacity: 0.35; }
}

/* ---------- Marquee ---------- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  padding: 1.1rem 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-track { display: flex; width: max-content; animation: slide 32s linear infinite; }
.marquee-track span {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.18em;
  padding-right: 2rem;
  color: var(--dim);
}
.marquee-track i { color: var(--cyan); font-style: normal; }
.marquee-track b { color: var(--violet); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
section { padding: clamp(5rem, 11vw, 9rem) clamp(1.25rem, 5vw, 3rem); }
.about, .work, .process, .notes { max-width: var(--max); margin: 0 auto; }

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 1rem;
}

.section-head { margin-bottom: 3.5rem; max-width: 46rem; }
.section-head h2 {
  font-size: clamp(1.9rem, 4.5vw, 3.1rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.lead { color: var(--dim); font-size: 1.05rem; margin-top: 1.25rem; }

/* Pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.pillar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2rem 1.75rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s;
}
.pillar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.12), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s;
}
.pillar:hover { transform: translateY(-6px); border-color: rgba(124, 92, 255, 0.5); }
.pillar:hover::before { opacity: 1; }
.pillar-num {
  font-family: 'Sora', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.1em;
}
.pillar h3 { font-size: 1.4rem; margin: 0.6rem 0 0.75rem; position: relative; }
.pillar p { color: var(--dim); font-size: 0.95rem; position: relative; }

/* Work grid */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.25rem;
}
.work-tile {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--line);
  isolation: isolate;
}
.work-tile img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.7s var(--ease);
}
.work-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(8, 8, 11, 0.94) 12%, rgba(8, 8, 11, 0.35) 55%, rgba(8, 8, 11, 0.1));
  transition: background 0.5s;
}
.work-tile:hover img { transform: scale(1.08); }
.work-tile:hover::after { background: linear-gradient(to top, rgba(8, 8, 11, 0.96) 15%, rgba(124, 92, 255, 0.22) 75%, rgba(34, 211, 238, 0.12)); }

.tile-body { padding: 1.75rem; }
.tile-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.6rem;
}
.tile-body h3 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.tile-body p { color: var(--dim); font-size: 0.92rem; }

.tile-arrow {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(8, 8, 11, 0.6);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  transition: transform 0.4s var(--ease), background 0.4s, border-color 0.4s;
}
.work-tile:hover .tile-arrow {
  transform: translate(4px, -4px);
  background: var(--violet);
  border-color: var(--violet);
  color: #0b0713;
}

/* Process timeline */
.timeline { list-style: none; position: relative; padding-left: 2.5rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 9px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(to bottom, var(--violet), var(--cyan), transparent);
}
.timeline li { position: relative; padding-bottom: 2.75rem; }
.timeline li::before {
  content: '';
  position: absolute;
  left: -2.5rem; top: 7px;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--violet);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.12);
}
.t-step {
  font-family: 'Sora', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--cyan);
}
.timeline h3 { font-size: 1.35rem; margin: 0.35rem 0 0.5rem; }
.timeline p { color: var(--dim); max-width: 44rem; }

/* Notes carousel */
.notes-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  max-width: none;
}
.carousel-controls { display: flex; gap: 0.75rem; flex-shrink: 0; }
.c-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}
.c-btn:hover { background: var(--violet); border-color: var(--violet); color: #0b0713; transform: scale(1.08); }

.notes-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 1fr);
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}
.notes-track::-webkit-scrollbar { display: none; }

.note-card {
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s;
}
.note-card:hover { transform: translateY(-6px); border-color: rgba(34, 211, 238, 0.45); }
.note-card img { height: 180px; width: 100%; object-fit: cover; }
.note-body { padding: 1.5rem; }
.note-meta {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}
.note-card h3 { font-size: 1.2rem; margin: 0.6rem 0 0.5rem; }
.note-card p { color: var(--dim); font-size: 0.93rem; }

/* Contact */
.contact {
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 92, 255, 0.18), transparent 60%),
    var(--bg-2);
  border-top: 1px solid var(--line);
  text-align: center;
}
.contact-inner { max-width: 44rem; margin: 0 auto; }
.contact h2 {
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.contact p { color: var(--dim); margin-bottom: 2.25rem; }
.contact-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.contact-email {
  display: inline-block;
  margin-top: 1.75rem;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--dim);
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}
.contact-email:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

/* Footer */
.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem clamp(1.25rem, 5vw, 3rem) 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--dim);
  font-size: 0.85rem;
}
.footer-tag { letter-spacing: 0.1em; color: var(--violet); font-weight: 600; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a:hover { color: var(--text); }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .menu-toggle { display: flex; }
  .notes-head { align-items: flex-start; flex-direction: column; }
  .hero-name { line-height: 0.95; }
}

@media (max-width: 560px) {
  .hero { padding-top: 6rem; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .timeline { padding-left: 2rem; }
  .timeline li::before { left: -2rem; width: 15px; height: 15px; }
  .footer { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-portrait, .hero-name .line, .hero-flow, .hero-actions, .scroll-cue { opacity: 1; }
}
