/* ═══════════════════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════════════════ */

:root {
  /* Palette */
  --bg-0:          #060a10;
  --bg-1:          #0a1018;
  --bg-2:          #0f1520;
  --bg-card:       #0c1219;

  --accent:        #00e5a0;
  --accent-dim:    rgba(0, 229, 160, 0.08);
  --accent-glow:   rgba(0, 229, 160, 0.18);
  --accent-border: rgba(0, 229, 160, 0.35);

  --text-0:  #e2eaf5;
  --text-1:  #6e8098;
  --text-2:  #2d3d52;

  --border:  rgba(255, 255, 255, 0.06);

  /* Typography */
  --font-display: 'Bebas Neue', sans-serif;
  --font-ui:      'Outfit', sans-serif;
  --font-mono:    'IBM Plex Mono', monospace;

  /* Shape */
  --radius:    12px;
  --radius-sm: 6px;

  /* Motion */
  --ease-expo:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════════════
   RESET
═══════════════════════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

body {
  background: var(--bg-0);
  color: var(--text-0);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

body.touch-device {
  cursor: auto;
}

::selection {
  background: var(--accent-dim);
  color: var(--accent);
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--text-2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }
ul { list-style: none; }

/* ═══════════════════════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════════════════════ */

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(20px, 6vw, 72px);
}

.section {
  position: relative;
  padding: clamp(80px, 12vw, 148px) 0;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════
   CURSOR
═══════════════════════════════════════════════════════════ */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition:
    width  0.35s var(--ease-expo),
    height 0.35s var(--ease-expo),
    opacity 0.35s;
  will-change: transform;
}

.cursor.is-hovering {
  width: 42px;
  height: 42px;
  opacity: 0.18;
}

.touch-device .cursor { display: none; }

/* ═══════════════════════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════════════════════ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 6vw, 72px);
  transition: background 0.4s var(--ease-smooth),
              padding    0.4s var(--ease-smooth),
              border-color 0.4s;
}

.nav.is-scrolled {
  background: rgba(6, 10, 16, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-0);
  cursor: none;
  transition: color 0.25s;
}
.nav-logo:hover { color: var(--accent); }
.logo-bracket { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 40px;
}

.nav-link {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-1);
  position: relative;
  padding-bottom: 3px;
  cursor: none;
  transition: color 0.25s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.35s var(--ease-expo);
}

.nav-link:hover             { color: var(--text-0); }
.nav-link:hover::after      { width: 100%; }

/* Language toggle */
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
}

.lang-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-2);
  background: none;
  border: none;
  padding: 4px 3px;
  cursor: none;
  transition: color 0.25s;
  line-height: 1;
}

.lang-btn.is-active { color: var(--accent); }
.lang-btn:not(.is-active):hover { color: var(--text-0); }

.lang-sep {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  pointer-events: none;
  user-select: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--text-0);
  border-radius: 1px;
  transition: transform 0.35s var(--ease-expo), opacity 0.25s;
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(3.25px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  transform: translateY(-3.25px) rotate(-45deg);
}

/* ═══════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px clamp(20px, 6vw, 72px) 90px;
  max-width: 1100px;
  margin: 0 auto;
}

/* Background layer — fixed so it subtly parallaxes on scroll */
.hero-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 30%, transparent 100%);
  opacity: 0.6;
}

.hero-glow {
  position: absolute;
  width: 70vw;
  height: 70vw;
  max-width: 860px;
  max-height: 860px;
  top: -15%;
  left: -10%;
  background: radial-gradient(circle, rgba(0, 229, 160, 0.055) 0%, transparent 68%);
  animation: drift 10s ease-in-out infinite;
}

.hero-glow--2 {
  width: 50vw;
  height: 50vw;
  max-width: 600px;
  max-height: 600px;
  top: 20%;
  left: 50%;
  background: radial-gradient(circle, rgba(0, 110, 255, 0.04) 0%, transparent 68%);
  animation: drift 14s ease-in-out 4s infinite reverse;
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(3%, 4%) scale(1.06); }
  66%       { transform: translate(-2%, 2%) scale(0.97); }
}

/* Ensure hero content sits above the fixed bg */
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

/* Staggered entrance animations */
.hero-eyebrow,
.hero-name,
.hero-role,
.hero-bio,
.hero-cta,
.hero-scroll {
  opacity: 0;
  animation: fadeUp 0.9s var(--ease-expo) forwards;
}

.hero-eyebrow { animation-delay: 0.05s; }
.hero-name    { animation-delay: 0.18s; }
.hero-role    { animation-delay: 0.26s; }
.hero-bio     { animation-delay: 0.36s; }
.hero-cta     { animation-delay: 0.48s; }
.hero-scroll  { animation-delay: 0.64s; }

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

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: blink 2.4s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}

.hero-name {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  line-height: 0.88;
  letter-spacing: 0.025em;
  margin-bottom: 26px;
}

.name-solid {
  font-size: clamp(70px, 15vw, 176px);
  color: var(--text-0);
}

.name-outline {
  font-size: clamp(70px, 15vw, 176px);
  color: transparent;
  -webkit-text-stroke: 2px var(--text-2);
  transition: -webkit-text-stroke-color 0.4s;
}

.hero-name:hover .name-outline {
  -webkit-text-stroke-color: var(--accent-border);
}

.hero-role {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: clamp(14px, 1.8vw, 18px);
  font-weight: 300;
  color: var(--text-1);
  margin-bottom: 28px;
  min-height: 1.6em;
}

.role-dash { color: var(--accent); font-weight: 500; }

.role-label .scramble-ghost { color: var(--text-2); }

.hero-bio {
  font-size: clamp(15px, 1.6vw, 17px);
  font-weight: 300;
  color: var(--text-1);
  max-width: 500px;
  line-height: 1.8;
  margin-bottom: 44px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: clamp(20px, 6vw, 72px);
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.scroll-track {
  width: 1px;
  height: 56px;
  background: var(--border);
  overflow: hidden;
  flex-shrink: 0;
}

.scroll-thumb {
  width: 100%;
  height: 45%;
  background: var(--accent);
  animation: scrollSlide 2s var(--ease-expo) infinite;
}

@keyframes scrollSlide {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(260%);  }
}

.hero-scroll span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-2);
  writing-mode: vertical-rl;
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  cursor: none;
  white-space: nowrap;
  transition: transform 0.3s var(--ease-expo),
              box-shadow 0.3s,
              background 0.25s,
              border-color 0.25s,
              color 0.25s;
}

.btn svg { flex-shrink: 0; transition: transform 0.3s var(--ease-expo); }
.btn:hover svg { transform: translateX(3px); }

.btn-primary {
  background: var(--accent);
  color: #060a10;
}
.btn-primary:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 40px var(--accent-glow);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text-1);
}
.btn-ghost:hover {
  border-color: var(--accent-border);
  color: var(--text-0);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════
   SECTION COMPONENTS
═══════════════════════════════════════════════════════════ */

.section-num {
  position: absolute;
  top: 32px;
  right: -0.04em;
  font-family: var(--font-display);
  font-size: clamp(90px, 16vw, 200px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--text-2);
  opacity: 0.18;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.section-header {
  position: relative;
  z-index: 1;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.section-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 7vw, 76px);
  letter-spacing: 0.025em;
  line-height: 1;
  color: var(--text-0);
}

/* ═══════════════════════════════════════════════════════════
   REVEAL (SCROLL ANIMATION)
═══════════════════════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity   0.75s var(--ease-expo),
    transform 0.75s var(--ease-expo);
}

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

/* ═══════════════════════════════════════════════════════════
   ABOUT
═══════════════════════════════════════════════════════════ */

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 88px);
  align-items: start;
  position: relative;
  z-index: 1;
}

.about-text p {
  font-size: 15.5px;
  font-weight: 300;
  color: var(--text-1);
  line-height: 1.85;
  margin-bottom: 22px;
}
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--text-0); font-weight: 600; }

.skill-group { margin-bottom: 28px; }
.skill-group:last-child { margin-bottom: 0; }

.skill-group-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 12px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 13px;
  border-radius: 4px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-1);
  cursor: none;
  transition: all 0.25s;
}
.tag:hover {
  background: var(--accent-dim);
  border-color: var(--accent-border);
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════
   PROJECTS
═══════════════════════════════════════════════════════════ */

.projects {
  background: var(--bg-1);
}

.projects::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.45;
  pointer-events: none;
}

.projects-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
  perspective: 1200px;
}

/* ─── PROJECT CARD ──── */

.project-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  cursor: none;
  overflow: hidden;
  transition:
    transform     0.45s var(--ease-expo),
    border-color  0.4s,
    box-shadow    0.4s;
  transform-style: preserve-3d;
  will-change: transform;
  --card-accent: var(--accent);
}

/* Gradient shimmer */
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--card-accent) 10%, transparent) 0%,
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.4s;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}

/* Glowing left-edge accent */
.project-card::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 0;
  width: 2px;
  height: 60%;
  background: linear-gradient(to bottom, transparent, var(--card-accent), transparent);
  opacity: 0;
  transition: opacity 0.4s;
  border-radius: 0 1px 1px 0;
  z-index: 2;
}

.project-card:hover {
  border-color: color-mix(in srgb, var(--card-accent) 50%, transparent);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.45),
    0 0 0 1px color-mix(in srgb, var(--card-accent) 30%, transparent),
    0 0 50px color-mix(in srgb, var(--card-accent) 18%, transparent);
}

.project-card:hover::before,
.project-card:hover::after {
  opacity: 1;
}

/* Visual area */
.card-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  flex-shrink: 0;
}

.card-visual-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-expo);
}

.project-card:hover .card-visual-img {
  transform: scale(1.06);
}

.card-visual-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--card-accent) 14%, var(--bg-1)) 0%,
    var(--bg-0) 100%
  );
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 12px 18px;
}

.card-num {
  font-family: var(--font-display);
  font-size: clamp(64px, 8vw, 88px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--card-accent) 35%, transparent);
  user-select: none;
  transition: -webkit-text-stroke-color 0.4s;
}

.project-card:hover .card-num {
  -webkit-text-stroke-color: color-mix(in srgb, var(--card-accent) 60%, transparent);
}

.card-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 35%,
    rgba(12, 18, 25, 0.65) 100%
  );
  pointer-events: none;
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--card-accent);
  background: rgba(6, 10, 16, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid color-mix(in srgb, var(--card-accent) 28%, transparent);
  padding: 4px 9px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 3;
}

.card-ext-link {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 10, 16, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  z-index: 3;
  cursor: none;
  transition: color 0.25s, border-color 0.25s, transform 0.3s var(--ease-expo);
}

.card-ext-link:hover {
  color: var(--card-accent);
  border-color: color-mix(in srgb, var(--card-accent) 40%, transparent);
  transform: translate(2px, -2px);
}

/* Card body */
.card-body {
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.8vw, 30px);
  letter-spacing: 0.04em;
  line-height: 1.05;
  color: var(--text-0);
}

.card-description {
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-1);
  font-weight: 300;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex: 1;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: color 0.25s, border-color 0.25s;
}

.project-card:hover .card-tag {
  color: var(--text-1);
  border-color: rgba(255, 255, 255, 0.1);
}

.card-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--card-accent);
  white-space: nowrap;
  cursor: none;
  flex-shrink: 0;
  transition: gap 0.3s var(--ease-expo);
}

.card-view-btn svg { transition: transform 0.3s var(--ease-expo); }
.card-view-btn:hover { gap: 8px; }
.card-view-btn:hover svg { transform: translateX(2px); }

/* ═══════════════════════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════════════════════ */

.contact-body {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.contact-desc {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.85;
  color: var(--text-1);
  margin-bottom: 44px;
}

.email-link {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(20px, 3.5vw, 40px);
  letter-spacing: 0.04em;
  color: var(--text-0);
  position: relative;
  margin-bottom: 44px;
  cursor: none;
  transition: color 0.3s;
}

.email-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-expo);
}

.email-link:hover             { color: var(--accent); }
.email-link:hover::after      { transform: scaleX(1); }

.social-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-1);
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: none;
  transition:
    color        0.3s,
    border-color 0.3s,
    background   0.3s,
    transform    0.35s var(--ease-expo);
}
.social-btn:hover {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */

.footer {
  border-top: 1px solid var(--border);
  padding: 28px clamp(20px, 6vw, 72px);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--text-2);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — TABLET
═══════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE
═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(6, 10, 16, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 36px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s var(--ease-smooth);
    z-index: 490;
  }

  .nav-links.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links .nav-link {
    font-size: 22px;
    letter-spacing: 0.16em;
  }
}

@media (max-width: 600px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-scroll {
    display: none;
  }

  .name-outline {
    -webkit-text-stroke-width: 1.5px;
  }

  .email-link {
    word-break: break-all;
  }
}

/* Touch device: restore system cursor */
@media (pointer: coarse) {
  body, a, button, .btn, .nav-link, .nav-logo,
  .tag, .social-btn, .card-repo-link, .email-link,
  .project-card, .nav-toggle {
    cursor: auto;
  }
  .cursor { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   PROJECT DETAIL PAGE
═══════════════════════════════════════════════════════════ */

.project-detail {
  --accent-color: var(--accent);
  padding-top: 0;
}

/* Full-bleed hero */
.detail-hero-wrap {
  width: 100%;
  min-height: 72vh;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-1);
  position: relative;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(
    to bottom,
    rgba(6, 10, 16, 0.52) 0%,
    rgba(6, 10, 16, 0.46) 40%,
    rgba(6, 10, 16, 0.9) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 100px 0 52px;
  transition: opacity 0.45s var(--ease-smooth);
}

/* No image: accent-tinted gradient, less tall */
.project-detail:not(.has-hero-image) .detail-hero-wrap {
  min-height: 50vh;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--accent-color) 10%, var(--bg-1)) 0%,
    var(--bg-0) 100%
  );
}

.project-detail:not(.has-hero-image) .detail-hero-overlay {
  background: none;
}

.detail-hero-bottom {
  padding-top: 32px;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(226, 234, 245, 0.72);
  cursor: none;
  transition: color 0.25s, gap 0.3s var(--ease-expo);
}

.detail-back svg { transition: transform 0.3s var(--ease-expo); }
.detail-back:hover { color: var(--accent-color); gap: 12px; }
.detail-back:hover svg { transform: translateX(-3px); }

.detail-category {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-color);
  border: 1px solid color-mix(in srgb, var(--accent-color) 45%, transparent);
  padding: 5px 12px;
  border-radius: 4px;
  margin-bottom: 18px;
}

.detail-title {
  font-family: var(--font-display);
  font-size: clamp(52px, 10vw, 110px);
  letter-spacing: 0.025em;
  line-height: 0.9;
  color: var(--text-0);
  margin-bottom: 28px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Content area */
.project-detail > .container {
  max-width: 900px;
}

.detail-divider { display: none; }

.detail-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: clamp(40px, 6vw, 72px);
  align-items: start;
  padding: clamp(48px, 7vw, 80px) 0;
}

.detail-description {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.9;
  color: var(--text-1);
  margin-bottom: 40px;
}

.detail-highlights-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-color);
  margin-bottom: 20px;
}

.detail-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.detail-highlights li {
  display: flex;
  gap: 14px;
  font-size: 14.5px;
  font-weight: 300;
  color: var(--text-1);
  line-height: 1.6;
}

.detail-highlights li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-color);
  flex-shrink: 0;
  margin-top: 8px;
}

/* Sidebar */
.detail-sidebar {
  position: sticky;
  top: 100px;
}

.detail-meta-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent-color);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.detail-meta-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 8px;
}

.detail-meta-value {
  font-size: 14px;
  color: var(--text-0);
}

.detail-meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-repo-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  background: var(--accent-color);
  color: #060a10;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  cursor: none;
  transition: opacity 0.25s, transform 0.3s var(--ease-expo), box-shadow 0.3s;
}

.detail-repo-btn:hover {
  opacity: 0.88;
  transform: translateY(-2px);
  box-shadow: 0 10px 40px color-mix(in srgb, var(--accent-color) 30%, transparent);
}

.detail-repo-btn svg { flex-shrink: 0; }

/* Not found */
.detail-not-found {
  padding: 200px clamp(20px, 6vw, 72px);
  text-align: center;
}

.detail-not-found h1 {
  font-family: var(--font-display);
  font-size: 60px;
  color: var(--text-0);
  margin-bottom: 16px;
}

.detail-not-found p {
  color: var(--text-1);
  margin-bottom: 32px;
}

@media (max-width: 800px) {
  .detail-hero-wrap { min-height: 58vh; }
  .detail-hero-overlay { padding: 88px 0 44px; }
  .project-detail:not(.has-hero-image) .detail-hero-wrap { min-height: 44vh; }

  .detail-body {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    position: static;
    order: -1;
  }
}

@media (max-width: 600px) {
  .detail-hero-wrap { min-height: 65vh; }
  .detail-hero-overlay { padding: 80px 0 40px; }
  .project-detail:not(.has-hero-image) .detail-hero-wrap { min-height: 50vh; }
}

/* ═══════════════════════════════════════════════════════════
   HERO PLAY BUTTON
═══════════════════════════════════════════════════════════ */

.hero-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(6, 10, 16, 0.48);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid color-mix(in srgb, var(--accent-color) 55%, transparent);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  z-index: 6;
  transition:
    transform    0.4s var(--ease-expo),
    border-color 0.3s,
    background   0.3s,
    box-shadow   0.3s,
    opacity      0.35s var(--ease-smooth);
}

.detail-hero-wrap.is-playing .hero-play-btn {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.75);
}

/* Two expanding rings */
.hero-play-btn::before,
.hero-play-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent-color) 30%, transparent);
  animation: play-ring 2.6s ease-out infinite;
  pointer-events: none;
}

.hero-play-btn::after {
  border-color: color-mix(in srgb, var(--accent-color) 18%, transparent);
  animation-delay: 0.9s;
}

@keyframes play-ring {
  0%   { transform: scale(1);   opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0;   }
}

.hero-play-btn svg {
  margin-left: 4px; /* optical centering */
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent-color) 60%, transparent));
}

.hero-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.12);
  border-color: var(--accent-color);
  background: color-mix(in srgb, var(--accent-color) 22%, rgba(6, 10, 16, 0.55));
  box-shadow: 0 0 40px color-mix(in srgb, var(--accent-color) 40%, transparent);
}

/* ═══════════════════════════════════════════════════════════
   INLINE HERO VIDEO PLAYER
═══════════════════════════════════════════════════════════ */

/* Container that sits between the bg image and the overlay */
.detail-hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-smooth);
}

.detail-hero-wrap.is-playing .detail-hero-video-wrap {
  opacity: 1;
  pointer-events: auto;
}

/* Overlay fades out when video is playing */
.detail-hero-wrap.is-playing .detail-hero-overlay {
  opacity: 0;
  pointer-events: none;
}

/* Local video file — fully visible, letterboxed if needed */
.hero-video-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* YouTube / Vimeo: centered 16:9 box that never overflows the hero */
.hero-iframe-fit {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-iframe-16-9 {
  position: relative;
  aspect-ratio: 16 / 9;
  height: 100%;
  max-width: 100%;
}

.hero-video-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Stop button — top-right corner, appears during playback */
.hero-stop-btn {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(6, 10, 16, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  z-index: 8;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
  transition:
    opacity      0.35s var(--ease-smooth),
    transform    0.4s  var(--ease-expo),
    color        0.25s,
    border-color 0.25s,
    background   0.25s;
}

.detail-hero-wrap.is-playing .hero-stop-btn {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-stop-btn:hover {
  color: var(--text-0);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(6, 10, 16, 0.9);
}

/* ═══════════════════════════════════════════════════════════
   MUSIC
═══════════════════════════════════════════════════════════ */

.music::before {
  content: '';
  position: absolute;
  top: -5%;
  right: -5%;
  width: 65vw;
  height: 65vw;
  max-width: 760px;
  max-height: 760px;
  background: radial-gradient(circle, rgba(0, 229, 160, 0.04) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.music-intro {
  font-size: 15.5px;
  font-weight: 300;
  color: var(--text-1);
  line-height: 1.85;
  max-width: 520px;
  margin-bottom: clamp(40px, 6vw, 64px);
  position: relative;
  z-index: 1;
}

/* ─── COVERS GRID ──── */

.covers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  position: relative;
  z-index: 1;
}

/* ─── COVER CARD ──── */

.cover-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: none;
  transition:
    border-color 0.4s,
    box-shadow   0.4s,
    transform    0.45s var(--ease-expo);
}

.cover-card::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 0;
  width: 2px;
  height: 60%;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.4s;
  border-radius: 0 1px 1px 0;
  z-index: 2;
  pointer-events: none;
}

.cover-card:hover {
  border-color: var(--accent-border);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.45),
    0 0 50px var(--accent-glow);
  transform: translateY(-4px);
}

.cover-card:hover::after { opacity: 1; }

/* Thumbnail */
.cover-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

.cover-thumb > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-expo), opacity 0.35s;
}

.cover-card:hover .cover-thumb > img { transform: scale(1.04); }

.cover-thumb-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--accent) 12%, var(--bg-1)) 0%,
    var(--bg-0) 100%
  );
}

.cover-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(12, 18, 25, 0.7) 100%);
  pointer-events: none;
  transition: opacity 0.35s;
}

/* Play button */
.cover-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.82);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(6, 10, 16, 0.52);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid var(--accent-border);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  opacity: 0;
  z-index: 4;
  transition:
    opacity      0.35s,
    transform    0.4s  var(--ease-expo),
    background   0.3s,
    border-color 0.3s,
    box-shadow   0.3s;
}

.cover-card:hover .cover-play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.cover-play-btn:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  box-shadow: 0 0 32px var(--accent-glow);
}

.cover-play-btn svg {
  margin-left: 3px;
  filter: drop-shadow(0 0 5px rgba(0, 229, 160, 0.55));
}

/* Expanding rings on hover */
.cover-play-btn::before,
.cover-play-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(0, 229, 160, 0.28);
  opacity: 0;
  pointer-events: none;
}

.cover-card:hover .cover-play-btn::before {
  animation: cover-ring 2.2s ease-out infinite;
}
.cover-card:hover .cover-play-btn::after {
  animation: cover-ring 2.2s ease-out 0.75s infinite;
}

@keyframes cover-ring {
  0%   { transform: scale(1); opacity: 0.85; }
  100% { transform: scale(2.1); opacity: 0; }
}

/* Genre badge */
.cover-genre {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(6, 10, 16, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--accent-border);
  padding: 4px 9px;
  border-radius: 4px;
  z-index: 3;
  transition: opacity 0.35s;
}

/* Iframe overlay — hidden by default, shown when playing */
.cover-iframe-wrap {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-smooth);
}

.cover-thumb.is-playing .cover-iframe-wrap {
  opacity: 1;
  pointer-events: auto;
}

/* Fade out thumbnail elements during playback */
.cover-thumb.is-playing > img,
.cover-thumb.is-playing .cover-thumb-overlay,
.cover-thumb.is-playing .cover-play-btn,
.cover-thumb.is-playing .cover-genre,
.cover-thumb.is-playing .cover-thumb-fallback {
  opacity: 0;
  pointer-events: none;
}

.cover-iframe-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

/* Close button */
.cover-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(6, 10, 16, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  z-index: 6;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}

.cover-close-btn:hover {
  color: var(--text-0);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Card text area */
.cover-info {
  padding: 16px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cover-song {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 26px);
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--text-0);
}

.cover-artist {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.cover-note {
  font-size: 12.5px;
  font-weight: 300;
  color: var(--text-1);
  font-style: italic;
  line-height: 1.5;
  margin-top: 2px;
}

.cover-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.cover-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: color 0.25s, border-color 0.25s;
}

.cover-card:hover .cover-tag {
  color: var(--text-1);
  border-color: var(--accent-border);
}

@media (max-width: 600px) {
  .covers-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   REDUCED MOTION
═══════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-eyebrow,
  .hero-name,
  .hero-role,
  .hero-bio,
  .hero-cta,
  .hero-scroll {
    opacity: 1;
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
