/* ===== Tokens ===== */
:root {
  --bg: #0b0b0f;
  --bg-soft: #111117;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.12);
  --text: #f4f4f7;
  --text-muted: #97979f;
  --text-faint: #5c5c66;
  --accent: #8b6bff;
  --accent-soft: rgba(139, 107, 255, 0.35);
  --lamp: #ffb454;
  --lamp-soft: rgba(255, 180, 84, 0.28);
  --radius-lg: 22px;
  --radius-md: 14px;
  --ease: cubic-bezier(0.16, 0.8, 0.24, 1);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Inter",
    -apple-system,
    sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

::selection {
  background: var(--accent-soft);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* cursor glow — desktop only, follows pointer */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(139, 107, 255, 0.1) 0%,
    rgba(255, 180, 84, 0.045) 45%,
    transparent 72%
  );
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  will-change: transform;
}
.cursor-glow.is-active {
  opacity: 1;
}
@media (hover: none), (pointer: coarse) {
  .cursor-glow {
    display: none;
  }
}

/* magnetic wrapper — JS adds inline transform, this just eases it back */
.magnetic {
  transition: transform 0.35s var(--ease);
}

/* subtle film grain overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* page-load fade — JS removes .is-hidden shortly after load */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.6s var(--ease);
}
.page-loader.is-hidden {
  opacity: 0;
}
/* ===== Nav ===== */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(20, 20, 25, 0.55);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: var(--text-muted);
  transition:
    color 0.25s var(--ease),
    background 0.25s var(--ease);
}
.nav-link svg {
  width: 17px;
  height: 17px;
}
.nav-link:hover {
  color: var(--text);
  background: var(--glass);
}
.nav-link.is-current {
  color: var(--accent);
  background: var(--glass);
}
.nav-divider {
  width: 1px;
  height: 18px;
  background: var(--glass-border);
}
.nav-cta {
  padding: 9px 18px;
  background: var(--text);
  color: #0b0b0f;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  border-radius: 999px;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
  margin-left: 4px;
}
.nav-cta:hover {
  transform: scale(1.04);
  box-shadow: 0 0 22px var(--accent-soft);
}

/* ===== Mobile nav ===== */
@media (max-width: 480px) {
  .navbar {
    top: 14px;
    gap: 3px;
    padding: 6px 8px;
    max-width: calc(100% - 24px);
  }
  .nav-link {
    width: 32px;
    height: 32px;
  }
  .nav-link svg {
    width: 15px;
    height: 15px;
  }
  .nav-divider {
    height: 14px;
  }
  .nav-cta {
    padding: 7px 12px;
    font-size: 12px;
    margin-left: 2px;
  }
}

@media (max-width: 360px) {
  .nav-divider {
    display: none;
  }
  .navbar {
    gap: 2px;
    padding: 6px;
  }
}
/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  text-align: center;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: 38%;
  left: 50%;
  width: 900px;
  height: 900px;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    var(--accent-soft) 0%,
    rgba(139, 107, 255, 0.08) 40%,
    transparent 70%
  );
  filter: blur(10px);
  pointer-events: none;
  animation: pulse-glow 7s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%,
  100% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: "Space Mono", monospace;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 28px;
  text-transform: uppercase;
}
.lamp-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lamp);
  box-shadow: 0 0 8px 2px var(--lamp-soft);
  animation: blink 2.6s ease-in-out infinite;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.hero-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 30px;
}
.hero-title .line {
  display: block;
}
.hero-title .word {
  display: inline-block;
  color: var(--text-faint);
  opacity: 0;
  transform: translateY(14px);
  animation: light-up 0.7s var(--ease) forwards;
}
.hero-title .accent-word {
  color: var(--text-faint);
}
.hero-title .line[data-line="1"] .word:nth-child(1) {
  animation-delay: 0.15s;
}
.hero-title .line[data-line="1"] .word:nth-child(2) {
  animation-delay: 0.28s;
}
.hero-title .line[data-line="1"] .word:nth-child(3) {
  animation-delay: 0.4s;
}
.hero-title .line[data-line="2"] .word:nth-child(1) {
  animation-delay: 0.58s;
}
.hero-title .line[data-line="2"] .word:nth-child(2) {
  animation-delay: 0.72s;
}
.hero-title .line[data-line="2"] .word:nth-child(3) {
  animation-delay: 0.84s;
}

@keyframes light-up {
  0% {
    opacity: 0;
    transform: translateY(14px);
    color: var(--text-faint);
  }
  55% {
    color: var(--text);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    color: var(--text);
  }
}
.accent-word {
  animation-name: light-up-accent !important;
}
@keyframes light-up-accent {
  0% {
    opacity: 0;
    transform: translateY(14px);
    color: var(--text-faint);
    text-shadow: none;
  }
  55% {
    color: var(--accent);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    color: var(--accent);
    text-shadow: 0 0 34px var(--accent-soft);
  }
}

.hero-bio {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 40px;
  opacity: 0;
  animation: fade-in 0.8s var(--ease) forwards;
  animation-delay: 1s;
}
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fade-in 0.8s var(--ease) forwards;
  animation-delay: 1.15s;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    background 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6a4ce0);
  color: #fff;
  box-shadow: 0 6px 24px rgba(139, 107, 255, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(139, 107, 255, 0.5);
}
.btn-ghost {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--glass-strong);
  transform: translateY(-2px);
}

.scroll-cue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1.5px solid var(--glass-border);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
}
.scroll-cue span {
  width: 3px;
  height: 7px;
  background: var(--text-muted);
  border-radius: 2px;
  animation: scroll-dot 1.8s ease-in-out infinite;
}
@keyframes scroll-dot {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  70% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ===== Section shared ===== */
.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  padding: 0 24px;
  text-align: center;
}
.eyebrow-light {
  justify-content: center;
}
.section-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0;
}

/* ===== Work section ===== */
.work {
  padding: 130px 24px 90px;
  max-width: 1180px;
  margin: 0 auto;
}

/* filter rail */
.filter-rail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 70px;
  max-width: 900px;
}
.filter-btn {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-muted);
  font-family: "Space Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition:
    background 0.25s var(--ease),
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    transform 0.2s var(--ease);
}
.filter-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}
.filter-btn.is-active {
  background: var(--text);
  color: #0b0b0f;
  border-color: var(--text);
}

/* project block */
.project {
  margin-bottom: 96px;
}
.project:last-of-type {
  margin-bottom: 56px;
}
.project-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 26px;
}
.project-index {
  font-family: "Space Mono", monospace;
  font-size: 13px;
  color: var(--lamp);
  letter-spacing: 0.05em;
  padding-top: 4px;
}
.project-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.project-role {
  font-family: "Space Mono", monospace;
  font-size: 12.5px;
  color: var(--text-faint);
  margin: 0 0 6px;
}

.live-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: "Space Mono", monospace;
  font-size: 11.5px;
  color: var(--lamp);
  padding: 5px 12px;
  border: 1px solid rgba(255, 180, 84, 0.3);
  border-radius: 999px;
  transition:
    background 0.25s var(--ease),
    transform 0.2s var(--ease);
}
.live-link:hover {
  background: var(--lamp-soft);
  transform: translateY(-1px);
}

.project-grid {
  display: grid;
  gap: 18px;
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.work-card {
  position: relative;
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--bg-soft);
  cursor: default;
  transform-style: preserve-3d;
  will-change: transform;
  transition:
    transform 0.1s linear,
    border-color 0.3s var(--ease);
}
.work-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
}
.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
  transform: translateZ(20px) scale(1.001);
}
.work-card:hover img {
  transform: translateZ(20px) scale(1.06);
}
.work-card figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82) 65%);
  opacity: 0;
  transform: translateY(6px) translateZ(30px);
  transition:
    opacity 0.35s var(--ease),
    transform 0.35s var(--ease);
}
.work-card:hover figcaption {
  opacity: 1;
  transform: translateY(0) translateZ(30px);
}
@media (hover: none) {
  .work-card figcaption {
    opacity: 1;
    transform: translateY(0);
  }
}
.wc-client {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}
.wc-type {
  font-family: "Space Mono", monospace;
  font-size: 11px;
  color: var(--lamp);
  letter-spacing: 0.02em;
}

.size-tall {
  grid-column: span 1;
  aspect-ratio: 4/5;
}
.size-square {
  grid-column: span 1;
  aspect-ratio: 1/1;
}
.size-wide {
  grid-column: span 2;
  aspect-ratio: 16/8;
}
.logo-card img {
  object-fit: contain;
  padding: 34px;
  background: #000;
}

/* scroll reveal states (JS toggles .is-visible) */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-group] .work-card {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}
[data-reveal-group].is-visible .work-card {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-group].is-visible .work-card:nth-child(1) {
  transition-delay: 0.02s;
}
[data-reveal-group].is-visible .work-card:nth-child(2) {
  transition-delay: 0.09s;
}
[data-reveal-group].is-visible .work-card:nth-child(3) {
  transition-delay: 0.16s;
}
[data-reveal-group].is-visible .work-card:nth-child(4) {
  transition-delay: 0.23s;
}

/* project filtering */
.project.is-hidden {
  display: none;
}

/* drive CTA */
.drive-cta {
  margin-top: 40px;
  padding: 44px 28px;
  text-align: center;
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius-lg);
}
.drive-cta p {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 20px;
}

@media (max-width: 920px) {
  .grid-4,
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .size-wide {
    grid-column: span 2;
  }
  .filter-rail {
    gap: 6px;
  }
}
@media (max-width: 560px) {
  .grid-4,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .size-wide {
    grid-column: span 1;
    aspect-ratio: 4/5;
  }
  .project-head {
    gap: 12px;
  }
}

/* ===== Tools ===== */
.tools {
  padding: 40px 24px 120px;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}
.tools-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.tool-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 14.5px;
  transition:
    background 0.25s var(--ease),
    transform 0.25s var(--ease);
}
.tool-chip:hover {
  background: var(--glass-strong);
  transform: translateY(-2px);
}
.tools-note {
  font-family: "Space Mono", monospace;
  font-size: 12.5px;
  color: var(--text-faint);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== About ===== */
.about {
  padding: 20px 24px 110px;
  max-width: 980px;
  margin: 0 auto;
}
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 56px;
  align-items: center;
}
.about-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
}
.about-photo-glow {
  position: absolute;
  inset: -14%;
  background: radial-gradient(circle, var(--accent-soft), transparent 68%);
  filter: blur(6px);
  border-radius: 50%;
  animation: pulse-glow 7s ease-in-out infinite;
}
.about-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
}
.about-copy .eyebrow {
  margin-bottom: 14px;
}
.about-title {
  margin-bottom: 20px;
}
.about-text {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 14px;
  max-width: 480px;
}
.about-text:last-child {
  margin-bottom: 0;
}

@media (max-width: 720px) {
  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }
  .about-photo-wrap {
    width: 180px;
    margin: 0 auto;
  }
  .about-text {
    max-width: 100%;
  }
}

/* ===== Contact ===== */
.contact {
  padding: 0 24px 40px;
  max-width: 900px;
  margin: 0 auto;
}
.contact-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 70px 32px;
  text-align: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: "";
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, var(--lamp-soft), transparent 65%);
  pointer-events: none;
}
.contact-card > * {
  position: relative;
  z-index: 1;
}
.contact-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 36px;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  font-size: 14.5px;
  border: 1px solid var(--glass-border);
  color: var(--text);
  transition:
    background 0.25s var(--ease),
    transform 0.25s var(--ease);
}
.contact-link:hover {
  background: var(--glass-strong);
  transform: translateY(-2px);
}
.contact-link-primary {
  background: linear-gradient(135deg, var(--accent), #6a4ce0);
  border: none;
  color: #fff;
  box-shadow: 0 6px 24px rgba(139, 107, 255, 0.32);
}
.contact-link-primary:hover {
  box-shadow: 0 10px 30px rgba(139, 107, 255, 0.48);
}

.copy-email-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  font: inherit;
}
.copy-email-btn:hover {
  background: var(--glass-strong);
  transform: translateY(-2px);
}
.copy-email-btn.is-copied {
  border-color: var(--lamp);
  color: var(--lamp);
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 36px 6px 10px;
  font-family: "Space Mono", monospace;
  font-size: 12px;
  color: var(--text-faint);
}

@media (max-width: 520px) {
  .hero {
    padding-top: 110px;
  }
  .footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  .contact-card {
    padding: 48px 20px;
  }
}
