/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Type scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3.5rem,   1rem    + 7vw,    9rem);

  /* Spacing */
  --sp1: 0.25rem; --sp2: 0.5rem;  --sp3: 0.75rem; --sp4: 1rem;
  --sp5: 1.25rem; --sp6: 1.5rem;  --sp8: 2rem;    --sp10: 2.5rem;
  --sp12: 3rem;   --sp16: 4rem;   --sp20: 5rem;   --sp24: 6rem;
  --sp32: 8rem;

  /* Radii */
  --r-sm: 0.25rem; --r-md: 0.375rem; --r-lg: 0.5rem;
  --r-xl: 0.75rem; --r-2xl: 1.25rem; --r-full: 9999px;

  /* Widths */
  --w-content: 1100px;
  --w-narrow: 640px;

  /* Easing */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.4, 0, 1, 1);
  --ease-inout:  cubic-bezier(0.4, 0, 0.2, 1);
  --t: 180ms var(--ease-out);

  /* Nav height */
  --nav-h: 60px;

  /* Fonts */
  --font-display: 'Clash Display', 'Helvetica Neue', sans-serif;
  --font-body:    'Satoshi', 'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;
}

/* ── PALETTE — dark violet ─────────────────────────────────── */
:root {
  --color-bg:          #07070f;
  --color-bg2:         #0c0c1a;
  --color-surface:     #0f0f1e;
  --color-surface2:    #151526;
  --color-surface3:    #1c1c32;
  --color-border:      rgba(168, 139, 250, 0.10);
  --color-border2:     rgba(168, 139, 250, 0.18);
  --color-border3:     rgba(168, 139, 250, 0.28);

  --color-text:        #ede9fe;
  --color-text-muted:  #a09bc0;
  --color-text-faint:  #524f6e;

  --color-accent:      #a78bfa;   /* violet-400 */
  --color-accent2:     #c4b5fd;   /* violet-300 */
  --color-accent-dim:  rgba(167, 139, 250, 0.10);
  --color-accent-glow: rgba(167, 139, 250, 0.25);
  --color-accent-mid:  rgba(167, 139, 250, 0.50);

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.5);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.6);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.7);
  --shadow-glow: 0 0 50px rgba(167,139,250,0.18);
}

/* ============================================================
   GLOBAL LAYOUT
   ============================================================ */
html {
  background: var(--color-bg);
  /* Hide scrollbar across all browsers while keeping scroll functionality */
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* IE / Edge legacy */
}
html::-webkit-scrollbar {
  display: none;                /* Chrome / Safari / Opera */
}

body {
  background: var(--color-bg);
  overflow-x: hidden;
  position: relative;
}

/* Scan-line texture — very subtle, gives "terminal" depth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.07) 3px,
    rgba(0, 0, 0, 0.07) 4px
  );
  opacity: 0.6;
}

.container {
  width: 100%;
  max-width: var(--w-content);
  margin-inline: auto;
  padding-inline: clamp(var(--sp6), 5vw, var(--sp16));
  position: relative;
}

section {
  padding-block: clamp(var(--sp16), 8vw, var(--sp32));
}

section[id] {
  /* Extra breathing room so heading clears the nav comfortably */
  scroll-margin-top: calc(var(--nav-h) + var(--sp8));
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 200;
  display: flex;
  align-items: center;
  padding-inline: clamp(var(--sp6), 5vw, var(--sp16));
  background: rgba(7, 7, 15, 0.85);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--color-border);
  transition: border-color var(--t);
}

.nav.scrolled {
  border-bottom-color: var(--color-border2);
  box-shadow: var(--shadow-sm);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--w-content);
  margin-inline: auto;
}

/* Logo: monospace wordmark with blinking cursor */
.nav__logo {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 2px;
  user-select: none;
}
.nav__logo-bracket {
  color: var(--color-text-faint);
  font-size: 1.1em;
}
.nav__logo-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--color-accent);
  margin-left: 3px;
  animation: blink 1.1s step-end infinite;
  vertical-align: text-bottom;
  border-radius: 1px;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp1);
  list-style: none;
}

.nav__link {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--sp2) var(--sp3);
  border-radius: var(--r-md);
  letter-spacing: 0.04em;
  transition: color var(--t), background var(--t);
  position: relative;
}
.nav__link::before {
  content: attr(data-index);
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 9px;
  color: var(--color-text-faint);
  line-height: 1;
  transition: color var(--t);
}
.nav__link:hover,
.nav__link.active {
  color: var(--color-accent2);
  background: var(--color-accent-dim);
}
.nav__link.active::before,
.nav__link:hover::before {
  color: var(--color-accent-mid);
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--sp2);
}
.nav__hamburger span {
  width: 22px;
  height: 2px;
  background: var(--color-text-muted);
  border-radius: var(--r-full);
  transition: transform 300ms var(--ease-inout), opacity 200ms;
}
.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--color-bg2);
  border-bottom: 1px solid var(--color-border2);
  padding: var(--sp4) clamp(var(--sp6), 5vw, var(--sp16));
  flex-direction: column;
  gap: var(--sp1);
  z-index: 190;
}
.nav__mobile.open { display: flex; }
.nav__mobile-link {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--sp3) var(--sp4);
  border-radius: var(--r-lg);
  letter-spacing: 0.04em;
  transition: color var(--t), background var(--t);
}
.nav__mobile-link:hover { color: var(--color-accent2); background: var(--color-accent-dim); }

/* ============================================================
   HERO
   ============================================================ */
#hero {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding-top: calc(var(--nav-h) + var(--sp12));
  padding-bottom: var(--sp20);
  position: relative;
  overflow: hidden;
}

/* Background grid of dots */
.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(167,139,250,0.12) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image:
    radial-gradient(ellipse 70% 80% at 50% 40%, black 30%, transparent 80%);
}

/* Ambient purple glow behind hero content */
.hero__glow {
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167,139,250,0.08) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: glowPulse 6s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  50%       { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

.hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 860px;
  margin-inline: auto;
}

/* Status chip */
.hero__status {
  display: inline-flex;
  align-items: center;
  gap: var(--sp2);
  background: var(--color-surface);
  border: 1px solid var(--color-border2);
  border-radius: var(--r-full);
  padding: var(--sp1) var(--sp4) var(--sp1) var(--sp2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  margin-bottom: var(--sp8);
  animation: fadeSlideDown 0.7s var(--ease-out) 0.1s both;
}
.hero__status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
  animation: statusPulse 2s ease-in-out infinite;
}
@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(52,211,153,0.6); }
  50%       { box-shadow: 0 0 14px rgba(52,211,153,0.9); }
}

/* Hero name / headline */
.hero__headline {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--color-text);
  margin-bottom: var(--sp6);
  animation: fadeSlideUp 0.8s var(--ease-out) 0.2s both;
}

/* Animated gradient on accent words */
.hero__headline .accent {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent2) 50%, #e879f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 5s ease-in-out infinite;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

/* Glitch effect on the name — subtle, occasional */
.hero__headline .glitch {
  position: relative;
  display: inline-block;
}
.hero__headline .glitch::before,
.hero__headline .glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__headline .glitch::before {
  color: #e879f9;
  -webkit-text-fill-color: #e879f9;
  clip-path: polygon(0 0, 100% 0, 100% 40%, 0 40%);
  transform: translateX(-2px);
  animation: glitchTop 8s step-end infinite;
}
.hero__headline .glitch::after {
  color: var(--color-accent);
  -webkit-text-fill-color: var(--color-accent);
  clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
  transform: translateX(2px);
  animation: glitchBot 8s step-end infinite;
}
@keyframes glitchTop {
  0%, 90%, 100% { transform: translateX(0); opacity: 0; }
  91%            { transform: translateX(-3px); opacity: 0.8; }
  92%            { transform: translateX(3px);  opacity: 0.8; }
  94%            { transform: translateX(-2px); opacity: 0.8; }
  96%            { transform: translateX(0);    opacity: 0; }
}
@keyframes glitchBot {
  0%, 90%, 100% { transform: translateX(0); opacity: 0; }
  91%            { transform: translateX(3px);  opacity: 0.8; }
  93%            { transform: translateX(-3px); opacity: 0.8; }
  95%            { transform: translateX(2px);  opacity: 0.8; }
  97%            { transform: translateX(0);    opacity: 0; }
}

.hero__sub {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--sp10);
  line-height: 1.5;
  animation: fadeSlideUp 0.8s var(--ease-out) 0.35s both;
}

.hero__sub .mono {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--color-accent);
  background: var(--color-accent-dim);
  padding: 0.1em 0.35em;
  border-radius: var(--r-sm);
  border: 1px solid var(--color-border2);
}

/* CTA row */
.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp4);
  flex-wrap: wrap;
  margin-bottom: var(--sp12);
  animation: fadeSlideUp 0.8s var(--ease-out) 0.5s both;
}

/* Scroll indicator */
.hero__scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeSlideUp 0.8s var(--ease-out) 0.65s both;
}
.hero__scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--color-accent-mid), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.1); }
}

/* ============================================================
   SHARED BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp2);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--r-lg);
  padding: var(--sp3) var(--sp6);
  text-decoration: none;
  transition:
    background var(--t),
    color var(--t),
    border-color var(--t),
    box-shadow var(--t),
    transform var(--t);
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(255,255,255,0.06);
  transition: opacity var(--t);
}
.btn:hover::after { opacity: 1; }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--color-accent);
  color: #0a0014;
  border: 1px solid transparent;
  box-shadow: 0 0 0 0 var(--color-accent-glow);
}
.btn--primary:hover {
  background: var(--color-accent2);
  box-shadow: 0 0 24px var(--color-accent-glow);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border2);
}
.btn--ghost:hover {
  color: var(--color-accent2);
  border-color: var(--color-border3);
  background: var(--color-accent-dim);
  transform: translateY(-2px);
}

/* ============================================================
   SECTION LABEL (shared "overline" style)
   ============================================================ */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--sp6);
}
.section-label::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--color-accent);
  opacity: 0.5;
}
.section-label span {
  font-size: 0.9em;
  color: var(--color-text-faint);
}

/* ============================================================
   ABOUT
   ============================================================ */
#about {
  border-top: 1px solid var(--color-border);
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--sp10), 6vw, var(--sp20));
  align-items: start;
}

.about__left {
  position: sticky;
  top: calc(var(--nav-h) + var(--sp8));
}

.about__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text);
  line-height: 1.05;
  margin-bottom: var(--sp6);
}
.about__title .accent { color: var(--color-accent); }

.about__body {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  line-height: 1.75;
  margin-bottom: var(--sp6);
}

/* Stat row */
.about__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp4);
  margin-top: var(--sp8);
}
.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  padding: var(--sp5) var(--sp6);
  transition: border-color var(--t), transform var(--t);
}
.stat-card:hover {
  border-color: var(--color-border2);
  transform: translateY(-2px);
}
.stat-card__num {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.04em;
  line-height: 1;
}
.stat-card__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.06em;
  margin-top: var(--sp1);
}

/* Right column — skills as terminal output */
.about__skills-title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--sp4);
  display: flex;
  align-items: center;
  gap: var(--sp3);
}
.about__skills-title::before {
  content: '$ ';
  color: var(--color-accent);
}

.skills-terminal {
  background: var(--color-surface);
  border: 1px solid var(--color-border2);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.terminal__topbar {
  background: var(--color-surface2);
  border-bottom: 1px solid var(--color-border);
  padding: var(--sp3) var(--sp5);
  display: flex;
  align-items: center;
  gap: var(--sp3);
}
.terminal__dots {
  display: flex;
  gap: var(--sp2);
}
.terminal__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.terminal__dot--red  { background: #ff5f57; }
.terminal__dot--yel  { background: #febc2e; }
.terminal__dot--grn  { background: #28c840; }
.terminal__title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-left: auto;
  margin-right: auto;
  letter-spacing: 0.04em;
}

.terminal__body {
  padding: var(--sp6);
  display: flex;
  flex-direction: column;
  gap: var(--sp4);
}

.terminal__line {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.6;
}
.terminal__prompt {
  color: var(--color-accent);
  margin-right: var(--sp2);
  user-select: none;
}
.terminal__category {
  color: var(--color-text-muted);
}
.terminal__value {
  color: var(--color-text);
}
.terminal__comment {
  color: var(--color-text-faint);
  font-style: italic;
}

/* Tag cloud */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp2);
  margin-top: var(--sp4);
  padding: var(--sp4) var(--sp6);
  border-top: 1px solid var(--color-border);
}
.skill-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-accent);
  background: var(--color-accent-dim);
  border: 1px solid var(--color-border2);
  border-radius: var(--r-md);
  padding: 0.2em 0.6em;
  letter-spacing: 0.04em;
  transition: background var(--t), border-color var(--t), color var(--t), transform var(--t);
}
.skill-tag:hover {
  background: color-mix(in oklab, var(--color-accent) 20%, transparent);
  border-color: var(--color-border3);
  color: var(--color-accent2);
  transform: translateY(-1px);
}

/* ============================================================
   WORK / EXPERIENCE
   ============================================================ */
#work {
  border-top: 1px solid var(--color-border);
}

.work__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp8);
  margin-bottom: clamp(var(--sp10), 5vw, var(--sp16));
}
.work__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text);
  line-height: 1.05;
}

.work__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp3);
}

/* Each job — accordion-style row */
.job {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: border-color var(--t);
}
.job:hover { border-color: var(--color-border2); }
.job.is-open { border-color: var(--color-border3); }

.job__header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--sp6);
  padding: var(--sp6) var(--sp8);
  cursor: pointer;
  user-select: none;
}

.job__index {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.08em;
  min-width: 2ch;
}

.job__info { flex: 1; }

.job__company {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.job__meta {
  display: flex;
  align-items: center;
  gap: var(--sp4);
  margin-top: var(--sp1);
  flex-wrap: wrap;
}
.job__role {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.job__period {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  padding: 0.1em 0.5em;
  border-radius: var(--r-md);
}

.job__chevron {
  width: 20px; height: 20px;
  color: var(--color-text-faint);
  transition: transform 300ms var(--ease-inout), color var(--t);
  flex-shrink: 0;
}
.job.is-open .job__chevron {
  transform: rotate(180deg);
  color: var(--color-accent);
}

.job__body {
  display: none;
  padding: 0 var(--sp8) var(--sp8);
  padding-left: calc(var(--sp8) + 2ch + var(--sp6));
  border-top: 1px solid var(--color-border);
}
.job.is-open .job__body { display: block; }

.job__bullets {
  list-style: none;
  margin-top: var(--sp5);
  display: flex;
  flex-direction: column;
  gap: var(--sp3);
}
.job__bullets li {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.65;
  display: flex;
  gap: var(--sp3);
  max-width: none;
}
.job__bullets li::before {
  content: '→';
  color: var(--color-accent);
  font-family: var(--font-mono);
  flex-shrink: 0;
  margin-top: 0.1em;
}

/* ============================================================
   PROJECTS
   ============================================================ */
#projects {
  border-top: 1px solid var(--color-border);
}

.projects__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp8);
  margin-bottom: clamp(var(--sp8), 4vw, var(--sp12));
  flex-wrap: wrap;
}
.projects__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text);
  line-height: 1.05;
}

/* Filter tabs */
.filter-row {
  display: flex;
  align-items: center;
  gap: var(--sp2);
  flex-wrap: wrap;
}
.filter-btn {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  padding: var(--sp2) var(--sp4);
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color var(--t), background var(--t), border-color var(--t);
}
.filter-btn:hover {
  color: var(--color-accent2);
  border-color: var(--color-border2);
  background: var(--color-accent-dim);
}
.filter-btn.active {
  color: #0a0014;
  background: var(--color-accent);
  border-color: transparent;
}

/* Projects grid — masonry-ish using auto rows */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--sp5);
}

.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-2xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
  position: relative;
}
.project-card:hover {
  border-color: var(--color-border3);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}
.project-card.hidden {
  display: none;
}

/* Top strip — coloured accent bar */
.project-card__bar {
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent2), #e879f9);
  background-size: 200% 100%;
  animation: barSlide 4s linear infinite;
}
@keyframes barSlide {
  0%   { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

.project-card__body {
  padding: var(--sp6);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--sp3);
}

.project-card__type {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.project-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
  flex: 1;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp2);
  margin-top: var(--sp2);
}
.project-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-radius: var(--r-sm);
  padding: 0.1em 0.5em;
}

.project-card__links {
  display: flex;
  align-items: center;
  gap: var(--sp3);
  padding: var(--sp4) var(--sp6);
  border-top: 1px solid var(--color-border);
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color var(--t);
}
.project-link:hover { color: var(--color-accent); }
.project-link svg { width: 13px; height: 13px; }

/* ============================================================
   CONTACT
   ============================================================ */
#contact {
  border-top: 1px solid var(--color-border);
}

.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--sp10), 6vw, var(--sp20));
  align-items: center;
}

.contact__left {}

.contact__headline {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--color-text);
  margin-bottom: var(--sp6);
}
.contact__headline .accent {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent2) 50%, #e879f9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 5s ease-in-out infinite;
}

.contact__body {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: var(--sp8);
}

/* Contact card links (right column) */
.contact__cards {
  display: flex;
  flex-direction: column;
  gap: var(--sp3);
}

.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-xl);
  padding: var(--sp5) var(--sp6);
  display: flex;
  align-items: center;
  gap: var(--sp4);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color var(--t), background var(--t), transform var(--t);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--color-accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 300ms var(--ease-out);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.contact-card:hover {
  border-color: var(--color-border3);
  background: var(--color-accent-dim);
  transform: translateX(4px);
}
.contact-card:hover::before { transform: scaleY(1); }

.contact-card__icon {
  width: 40px; height: 40px;
  border-radius: var(--r-lg);
  background: var(--color-surface2);
  border: 1px solid var(--color-border2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--color-accent);
}
.contact-card__icon svg { width: 18px; height: 18px; }

.contact-card__info { flex: 1; }
.contact-card__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.contact-card__value {
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 500;
  margin-top: 2px;
}

.contact-card__action {
  color: var(--color-text-faint);
  transition: color var(--t);
}
.contact-card:hover .contact-card__action { color: var(--color-accent); }
.contact-card__action svg { width: 16px; height: 16px; }

/* Discord copy feedback */
.contact-card.copied .contact-card__action { color: #34d399; }
.contact-card.copied { border-color: rgba(52, 211, 153, 0.3); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--color-border);
  padding-block: var(--sp8);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp4);
  flex-wrap: wrap;
}
.footer__copy {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.06em;
}
.footer__copy .accent { color: var(--color-accent); }
.footer__links {
  display: flex;
  gap: var(--sp5);
}
.footer__link {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color var(--t);
}
.footer__link:hover { color: var(--color-accent); }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { }
.reveal.hidden-init {
  opacity: 0;
  clip-path: inset(12px 0 0 0);
  transition:
    opacity 600ms var(--ease-out),
    clip-path 600ms var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

/* Stagger delay for children */
.reveal.d1 { transition-delay: 0.05s; }
.reveal.d2 { transition-delay: 0.10s; }
.reveal.d3 { transition-delay: 0.15s; }
.reveal.d4 { transition-delay: 0.20s; }
.reveal.d5 { transition-delay: 0.25s; }

/* ============================================================
   HERO KEYFRAMES
   ============================================================ */
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .about__grid   { grid-template-columns: 1fr; }
  .about__left   { position: static; }
  .contact__inner { grid-template-columns: 1fr; }
  .contact__headline { font-size: var(--text-2xl); }
  .work__header  { flex-direction: column; align-items: flex-start; }
  .projects__header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 700px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
  .job__header { grid-template-columns: auto 1fr auto; gap: var(--sp4); padding: var(--sp5) var(--sp5); }
  .job__body { padding-left: var(--sp5); }
  .about__stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .hero__actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .about__stats { grid-template-columns: 1fr; }
}

/* ============================================================
   PROJECT MEDIA + CATEGORY ACCENTS  (Minecraft dev additions)
   ============================================================ */

/* Optional project image / thumbnail at the top of a card */
.project-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-surface2);
  border-bottom: 1px solid var(--color-border);
}
.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease-out);
}
.project-card:hover .project-card__media img {
  transform: scale(1.04);
}

/* Placeholder shown when a project has no image yet */
.project-card__media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-faint);
  background:
    radial-gradient(circle at 50% 50%, var(--color-accent-dim), transparent 70%),
    var(--color-surface2);
  background-image: radial-gradient(rgba(167,139,250,0.12) 1px, transparent 1px);
  background-size: 18px 18px;
}
.project-card__media--empty svg {
  width: 34px;
  height: 34px;
  opacity: 0.7;
}

/* Per-category coloured top bar — quick visual cue per project type */
.project-card[data-category="skript"] .project-card__bar {
  background: linear-gradient(90deg, #34d399, #6ee7b7, #34d399);
  background-size: 200% 100%;
}
.project-card[data-category="addon"] .project-card__bar {
  background: linear-gradient(90deg, #22d3ee, #67e8f9, #22d3ee);
  background-size: 200% 100%;
}
.project-card[data-category="plugin"] .project-card__bar {
  background: linear-gradient(90deg, #fb923c, #fdba74, #fb923c);
  background-size: 200% 100%;
}
.project-card[data-category="bot"] .project-card__bar {
  background: linear-gradient(90deg, #818cf8, #a5b4fc, #818cf8);
  background-size: 200% 100%;
}

/* Tint the small type label to match its category */
.project-card[data-category="skript"] .project-card__type { color: #6ee7b7; }
.project-card[data-category="addon"]  .project-card__type { color: #67e8f9; }
.project-card[data-category="plugin"] .project-card__type { color: #fdba74; }
.project-card[data-category="bot"]    .project-card__type { color: #a5b4fc; }

/* ============================================================
   EXTRA ANIMATIONS  (added to liven things up)
   All respect prefers-reduced-motion via base.css.
   ============================================================ */

/* ── Project cards: 3D tilt + glow follow ─────────────────── */
.projects__grid { perspective: 1200px; }

.project-card {
  transform-style: preserve-3d;
  transition:
    border-color var(--t),
    transform 300ms var(--ease-out),
    box-shadow 300ms var(--ease-out);
  will-change: transform;
}
/* JS sets --mx / --my (0–100%) for the spotlight glow */
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 250ms var(--ease-out);
  background: radial-gradient(
    320px circle at var(--mx, 50%) var(--my, 0%),
    rgba(167, 139, 250, 0.16),
    transparent 60%
  );
  z-index: 2;
}
.project-card:hover::after { opacity: 1; }

/* Title nudges with the accent colour on hover */
.project-card:hover .project-card__title { color: var(--color-accent2); }
.project-card__title { transition: color var(--t); }

/* Tags lift slightly, staggered, when the card is hovered */
.project-card__tags .project-tag {
  transition: transform 200ms var(--ease-out), border-color var(--t), color var(--t), background var(--t);
}
.project-card:hover .project-tag {
  border-color: var(--color-border2);
  color: var(--color-accent2);
}

/* ── Skill tags: gentle pop-in once revealed ──────────────── */
.skill-tags.is-visible .skill-tag {
  animation: tagPop 0.45s var(--ease-out) both;
}
.skill-tags.is-visible .skill-tag:nth-child(1)  { animation-delay: 0.02s; }
.skill-tags.is-visible .skill-tag:nth-child(2)  { animation-delay: 0.05s; }
.skill-tags.is-visible .skill-tag:nth-child(3)  { animation-delay: 0.08s; }
.skill-tags.is-visible .skill-tag:nth-child(4)  { animation-delay: 0.11s; }
.skill-tags.is-visible .skill-tag:nth-child(5)  { animation-delay: 0.14s; }
.skill-tags.is-visible .skill-tag:nth-child(6)  { animation-delay: 0.17s; }
.skill-tags.is-visible .skill-tag:nth-child(7)  { animation-delay: 0.20s; }
.skill-tags.is-visible .skill-tag:nth-child(8)  { animation-delay: 0.23s; }
.skill-tags.is-visible .skill-tag:nth-child(9)  { animation-delay: 0.26s; }
.skill-tags.is-visible .skill-tag:nth-child(10) { animation-delay: 0.29s; }
.skill-tags.is-visible .skill-tag:nth-child(11) { animation-delay: 0.32s; }
.skill-tags.is-visible .skill-tag:nth-child(12) { animation-delay: 0.35s; }
@keyframes tagPop {
  from { opacity: 0; transform: translateY(8px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* ── Buttons: sweeping shine on hover ─────────────────────── */
.btn { isolation: isolate; }
.btn::before {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: skewX(-18deg);
  transition: left 600ms var(--ease-out);
  z-index: 1;
  pointer-events: none;
}
.btn:hover::before { left: 140%; }

/* ── Nav links: animated underline ────────────────────────── */
.nav__link::after {
  content: '';
  position: absolute;
  left: var(--sp3); right: var(--sp3);
  bottom: 2px;
  height: 1.5px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms var(--ease-out);
  border-radius: 2px;
}
.nav__link:hover::after,
.nav__link.active::after { transform: scaleX(1); }

/* ── Stat cards: number gets a subtle accent pulse on reveal ─ */
.stat-card.is-visible .stat-card__num {
  animation: statPop 0.6s var(--ease-out) both;
}
@keyframes statPop {
  0%   { transform: scale(0.8); opacity: 0; }
  60%  { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); }
}

/* ── Section labels: the leading dash draws in ────────────── */
.section-label.is-visible::before {
  animation: dashGrow 0.6s var(--ease-out) both;
}
@keyframes dashGrow {
  from { width: 0; opacity: 0; }
  to   { width: 28px; opacity: 0.5; }
}

/* ── Hero: floating Minecraft-style cube ──────────────────── */
.hero__cube {
  position: absolute;
  top: 18%;
  right: 12%;
  width: 64px;
  height: 64px;
  pointer-events: none;
  opacity: 0.55;
  animation: cubeFloat 7s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(167,139,250,0.4));
  z-index: 0;
}
.hero__cube svg { width: 100%; height: 100%; }
.hero__cube--2 {
  top: auto;
  bottom: 20%;
  right: auto;
  left: 10%;
  width: 44px;
  height: 44px;
  opacity: 0.4;
  animation: cubeFloat 9s ease-in-out infinite reverse;
  animation-delay: -2s;
}
@keyframes cubeFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-22px) rotate(8deg); }
}
@media (max-width: 700px) {
  .hero__cube { display: none; }
}

/* ── Project image placeholder: prompt blinks ─────────────── */
.project-card__media--empty svg { animation: promptPulse 2.4s ease-in-out infinite; }
@keyframes promptPulse {
  0%, 100% { opacity: 0.55; transform: translateX(0); }
  50%      { opacity: 0.9;  transform: translateX(2px); }
}

/* ── Filter buttons: bouncy active state ──────────────────── */
.filter-btn { transition: color var(--t), background var(--t), border-color var(--t), transform 200ms var(--ease-out); }
.filter-btn:active { transform: scale(0.94); }
.filter-btn.active { animation: filterPulse 0.35s var(--ease-out); }
@keyframes filterPulse {
  0% { transform: scale(0.9); }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* ── Contact card icon: tiny wiggle on hover ──────────────── */
.contact-card:hover .contact-card__icon { animation: iconWiggle 0.5s var(--ease-out); }
@keyframes iconWiggle {
  0%, 100% { transform: rotate(0); }
  30%      { transform: rotate(-8deg) scale(1.08); }
  60%      { transform: rotate(6deg)  scale(1.08); }
}
