:root {
  --bg: #090b0a;
  --bg-soft: #101411;
  --ink: #f4f0e8;
  --muted: #8a9188;
  --line: rgba(244, 240, 232, 0.1);
  --acid: #d7ff38;
  --rust: #d5642f;
  --cyan: #6ed7d0;
  --panel: rgba(18, 23, 19, 0.78);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html { 
  scroll-behavior: auto; 
  scroll-snap-type: y proximity;
} /* lenis handles smooth scroll, proximity snap active */

body {
  margin: 0;
  background:
    radial-gradient(ellipse at 10% 0%, rgba(215, 255, 56, 0.09) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 5%, rgba(110, 215, 208, 0.07) 0%, transparent 50%),
    #090b0a;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
h1, h2, h3, p { margin-top: 0; }

/* ─── CURSOR ─────────────────────────────── */
.cursor,
.cursor-ring {
  position: fixed;
  pointer-events: none;
  z-index: 200;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.cursor {
  width: 8px;
  height: 8px;
  background: var(--acid);
  mix-blend-mode: difference;
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out);
  z-index: 201;
}

.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1.5px solid rgba(215, 255, 56, 0.35);
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out),
              border-color 0.35s ease, opacity 0.2s ease;
}

body.cursor-hover .cursor  { width: 14px; height: 14px; }
body.cursor-hover .cursor-ring {
  width: 64px;
  height: 64px;
  border-color: rgba(215, 255, 56, 0.7);
}

/* ─── HEADER ─────────────────────────────── */
.site-header {
  position: fixed;
  top: 1rem;
  left: 50%;
  z-index: 10;
  width: min(1120px, calc(100% - 2rem));
  height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.6rem 0.55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(9, 11, 10, 0.7);
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
  opacity: 0;
  animation: fadeDown 0.6s var(--ease-out) 0.2s forwards;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  color: var(--acid);
}

.brand span.brand-name-pill {
  display: grid;
  place-items: center;
  padding: 0 1.2rem;
  height: 2.6rem;
  border-radius: 999px;
  background: var(--acid);
  color: #0a0c08;
  font-family: "Archivo Black", sans-serif;
  font-size: 0.8rem;
  white-space: nowrap;
}

.brand strong {
  color: var(--ink);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.desktop-nav a,
.mobile-nav a {
  padding: 0.75rem 1rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 180ms ease, background 180ms ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  background: rgba(244, 240, 232, 0.07);
  color: var(--ink);
}

.menu-button {
  display: none;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.menu-button span {
  display: block;
  width: 1.15rem;
  height: 1.5px;
  margin: 0.24rem 0;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-button[aria-expanded="true"] span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}
.menu-button[aria-expanded="true"] span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  top: 5.75rem;
  left: 1rem;
  right: 1rem;
  z-index: 9;
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: rgba(9, 11, 10, 0.95);
  backdrop-filter: blur(20px);
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s var(--ease-out), opacity 0.3s ease;
}

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

/* ─── HERO ───────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: 6rem;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(9, 11, 10, 0.8), rgba(9, 11, 10, 0.96)),
    url("https://images.unsplash.com/photo-1550745165-9bc0b252726f?auto=format&fit=crop&w=1800&q=80") center / cover;
  mask-image: linear-gradient(#000 70%, transparent 100%);
}

.hero-layout {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  padding-bottom: 2rem;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem; /* Give space for the floating header logo */
}

.eyebrow {
  margin: 0;
  color: var(--acid);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.avail-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18, 23, 19, 0.4);
  backdrop-filter: blur(12px);
  font-size: 0.78rem;
  color: var(--muted);
  opacity: 0;
  animation: fadeIn 0.6s var(--ease-out) 0.4s forwards;
  transition: transform 0.3s ease;
}

.avail-badge:hover {
  transform: scale(1.02);
  border-color: var(--acid);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.badge-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 0.3rem rgba(215, 255, 56, 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0.3rem rgba(215, 255, 56, 0.18); }
  50%       { box-shadow: 0 0 0 0.55rem rgba(215, 255, 56, 0.06); }
}

/* word-split reveal */
.hero-title {
  margin: 0;
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(2.2rem, 6vw, 5.5rem);
  line-height: 0.88;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.hero-title em {
  font-style: italic;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
}

.word-wrap {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}

.word-inner {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.85s var(--ease-out);
}

.word-wrap.visible .word-inner {
  transform: translateY(0);
}

.hero-bottom {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem 4rem;
  align-items: start;
}

.hero-text {
  margin: 0;
  grid-column: 1;
  grid-row: 1;
  max-width: 600px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.75;
  opacity: 0;
  animation: fadeIn 0.7s var(--ease-out) 1.4s forwards;
}

.hero-actions {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  opacity: 0;
  animation: fadeIn 0.7s var(--ease-out) 1.55s forwards;
}

.hero-numbers {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.2rem;
  padding-top: 0.25rem;
  opacity: 0;
  animation: fadeIn 0.7s var(--ease-out) 1.3s forwards;
}

.hero-num { text-align: right; }

.hero-num strong {
  display: block;
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  color: var(--acid);
  line-height: 1;
}

.hero-num span {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ─── BUTTONS ────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0 1.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease;
}

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

.btn.primary {
  background: var(--acid);
  color: #0b0d08;
  border-color: transparent;
}

.btn.ghost { background: rgba(244, 240, 232, 0.05); }

/* ─── TICKER ─────────────────────────────── */
.ticker {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: auto;
}

.section .ticker {
  display: none;
}

.ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 22s linear infinite;
}

.ticker-track span {
  white-space: nowrap;
  padding: 1.3rem 1.8rem;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ticker-track .dot {
  padding: 1.3rem 0.6rem;
  color: var(--acid);
  opacity: 0.55;
  font-size: 0.65rem;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── SECTIONS ───────────────────────────── */
.section {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 7rem 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

.section-kicker {
  margin: 0 0 1rem;
  color: var(--acid);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.split {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
}

.section-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-content h2,
.section-content p {
  margin-left: auto;
  margin-right: auto;
}

.section-content h2,
.section-heading h2,
.contact h2 {
  max-width: 820px;
  font-family: "Instrument Serif", serif;
  font-size: clamp(2.2rem, 5.2vw, 5rem);
  line-height: 1;
  font-weight: 400;
  margin-bottom: 1.25rem;
}

.section-content p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.85;
}

.stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
  width: 100%;
}

.stats article {
  flex: 1;
  min-width: 200px;
  max-width: 260px;
  min-height: 7.5rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: rgba(244, 240, 232, 0.03);
}

.stats strong {
  display: block;
  margin-bottom: 1rem;
  color: var(--cyan);
  font-family: "Archivo Black", sans-serif;
  font-size: 2.4rem;
}

.stats span { color: var(--muted); font-size: 0.9rem; }

/* ─── PROJECTS ───────────────────────────── */
.projects { padding-bottom: 6rem; }

.section-heading {
  margin-bottom: 0;
  padding-bottom: 2rem;
}

.project-list {
  border-top: 1px solid var(--line);
}

.project-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.75rem 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.45s var(--ease-out), background 0.3s ease;
  overflow: hidden;
}

.project-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(215, 255, 56, 0.03);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out);
}

.project-item:hover { padding-left: 1.2rem; }
.project-item:hover::after { transform: scaleX(1); }

.pi-left {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  flex: 1;
}

.pi-num {
  font-family: "Archivo Black", sans-serif;
  font-size: 0.85rem;
  color: rgba(215, 255, 56, 0.4);
  padding-top: 0.3rem;
  min-width: 2ch;
  transition: color 0.3s ease;
}

.project-item:hover .pi-num { color: var(--acid); }

.pi-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--acid);
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.pi-text h3 {
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(1.7rem, 3.8vw, 3.8rem);
  line-height: 0.93;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  transition: color 0.3s ease;
}

.project-item:hover .pi-text h3 { color: var(--acid); }

.pi-text p {
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.65;
  max-width: 480px;
  margin: 0;
}

.pi-arrow {
  font-size: 2.2rem;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.35s var(--ease-out), color 0.3s ease;
  position: relative;
  z-index: 1;
}

.project-item:hover .pi-arrow {
  transform: translate(5px, -5px);
  color: var(--acid);
}

/* ─── IMAGE FOLLOW CURSOR ────────────────── */
.project-img-follow {
  position: fixed;
  width: 360px;
  height: 230px;
  border-radius: 0.9rem;
  overflow: hidden;
  pointer-events: none;
  z-index: 50;
  opacity: 0;
  transform: scale(0.88) rotate(-3deg);
  transition: opacity 0.3s ease, transform 0.35s var(--ease-out);
  will-change: left, top;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
}

.project-img-follow.active {
  opacity: 1;
  transform: scale(1) rotate(-1.5deg);
}

.project-img-follow img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.06);
}

/* ─── SKILLS ─────────────────────────────── */
.skills {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4rem;
}

.skills .section-kicker {
  text-align: center;
}

.skill-list { 
  border-top: 1px solid var(--line);
  width: 100%;
  max-width: 900px;
}

.skill-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease;
}

.skill-row:hover {
  background: rgba(215, 255, 56, 0.02);
}

.skill-row span {
  color: var(--acid);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-top: 0.35rem;
}

.skill-row strong {
  font-family: "Instrument Serif", serif;
  font-size: clamp(1.6rem, 3.6vw, 3.2rem);
  font-weight: 400;
  line-height: 1.05;
}

/* ─── CONTACT ────────────────────────────── */
.contact {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto 1rem;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.5rem, 6vw, 5rem);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background:
    radial-gradient(ellipse at 0% 50%, rgba(213, 100, 47, 0.1) 0%, transparent 60%),
    rgba(244, 240, 232, 0.02);
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-snap-align: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h2 {
  font-family: "Instrument Serif", serif;
  font-size: clamp(2.5rem, 4.5vw, 4.5rem);
  line-height: 1;
  margin-bottom: 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--acid);
  opacity: 0.8;
}

.form-group input,
.form-group textarea {
  background: rgba(244, 240, 232, 0.05);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  color: var(--ink);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--acid);
  background: rgba(244, 240, 232, 0.08);
}

.w-full { width: 100%; }

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .contact-form {
    padding: 1.5rem;
  }
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 2rem;
}

/* ─── FOOTER ─────────────────────────────── */
footer {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.88rem;
}

footer a:hover { color: var(--ink); }

/* ─── REVEAL ─────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}

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

/* ─── RESPONSIVE ─────────────────────────── */
@media (max-width: 860px) {
  .cursor, .cursor-ring, .desktop-nav, .project-img-follow { display: none; }
  .menu-button { display: flex; }

  .hero { padding-top: 7rem; }

  .hero-layout { gap: 2rem; }

  .hero-top { flex-direction: column; align-items: flex-start; gap: 0.75rem; }

  .hero-title { font-size: clamp(2.8rem, 12vw, 5.5rem); }

  .hero-bottom {
    grid-template-columns: 1fr;
  }

  .hero-numbers {
    grid-column: 1;
    grid-row: 3;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 2.5rem;
  }

  .hero-num { text-align: left; }

  .split, .skills, .skill-row { grid-template-columns: 1fr; }

  .section { padding: 5rem 0; }

  .stats { grid-template-columns: 1fr 1fr; }
  .stats article:last-child { grid-column: span 2; }

  .pi-text h3 { font-size: clamp(1.5rem, 8vw, 2.5rem); }

  .ticker-track span { padding: 1.2rem 1.2rem; }
}

@media (max-width: 540px) {
  .site-header { top: 0.6rem; width: calc(100% - 1rem); }
  .brand strong { display: none; }
  .hero-title { font-size: clamp(2.4rem, 14vw, 4rem); }
  .hero-actions .btn, .contact-actions .btn { width: 100%; }
  .stats { grid-template-columns: 1fr; }
  .stats article:last-child { grid-column: span 1; }
  .pi-left { gap: 1.25rem; }
  .pi-num { display: none; }
}
@media (max-width: 768px) {
  .section {
    padding: 6rem 0;
    min-height: 100vh;
    scroll-snap-align: start;
  }
  .contact {
    padding: clamp(3rem, 8vw, 6rem) 1.5rem;
    min-height: 100vh;
    scroll-snap-align: start;
  }
  .hero {
    min-height: 100vh;
    padding-top: 7rem;
    scroll-snap-align: start;
  }
  .hero-title {
    font-size: clamp(2.2rem, 10vw, 4rem);
    text-align: center;
  }
  .hero-bottom {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .hero-numbers {
    grid-column: 1;
    grid-row: 3;
    align-items: center;
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
  }
  .hero-num { text-align: center; }
  .hero-actions {
    justify-content: center;
  }
  .hero-text {
    margin: 0 auto;
  }
  .contact-form {
    padding: 1.5rem;
    gap: 1rem;
  }
  .form-group input, .form-group textarea {
    padding: 0.7rem;
  }
}

@media (max-width: 640px) {
  .stats {
    grid-template-columns: 1fr;
  }
  .section-content h2 {
    font-size: 2.5rem;
  }
}
