/* ==========================================================================
   Daniele De Rosa - Personal Website
   Typography: Soehne | Theme: Dark with Green-Blue Gradients
   ========================================================================== */

/* --------------------------------------------------------------------------
   Font Faces
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Soehne";
  src: url("../fonts/soehne-buch.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Soehne";
  src: url("../fonts/soehne-kraftig.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Soehne";
  src: url("../fonts/soehne-halbfett.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Soehne";
  src: url("../fonts/soehne-dreiviertelfett.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   CSS Variables
   -------------------------------------------------------------------------- */
:root {
  /* Colors - Derived from logo */
  --color-bg: #050508;
  --color-bg-elevated: #0a0a10;
  --color-bg-card: #0d0d14;

  --color-text: #f0f0f5;
  --color-text-muted: #8888a0;
  --color-text-subtle: #555566;

  /* Brand gradient - matching logo */
  --color-green-start: #a8e063;
  --color-green-end: #d4fc79;
  --color-blue-start: #0099ff;
  --color-blue-end: #00d4ff;

  /* Gradient combinations */
  --gradient-primary: linear-gradient(
    135deg,
    var(--color-green-start) 0%,
    var(--color-blue-start) 100%
  );
  --gradient-glow: linear-gradient(
    135deg,
    rgba(168, 224, 99, 0.3) 0%,
    rgba(0, 153, 255, 0.3) 100%
  );
  --gradient-text: linear-gradient(
    90deg,
    var(--color-green-start) 0%,
    var(--color-blue-end) 100%
  );

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
  --space-2xl: 12rem;

  /* Typography */
  --font-family: "Soehne", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 3rem;
  --font-size-4xl: 4.5rem;
  --font-size-5xl: 7rem;
  --font-size-hero: clamp(3rem, 12vw, 10rem);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Layout */
  --container-max: 1400px;
  --nav-height: 80px;
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Show default cursor on touch devices */
@media (hover: none) {
  body {
    cursor: auto;
  }
  .cursor {
    display: none !important;
  }
}

::selection {
  background: rgba(168, 224, 99, 0.3);
  color: var(--color-text);
}

a {
  color: inherit;
  text-decoration: none;
  cursor: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: none;
  border: none;
  background: none;
}

/* --------------------------------------------------------------------------
   Custom Cursor
   -------------------------------------------------------------------------- */
.cursor {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cursor.is-visible {
  opacity: 1;
}

.cursor-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--color-text);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.1s var(--ease-out-quart);
}

.cursor-ring {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-text);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.5;
  transition: width 0.3s var(--ease-out-expo), height 0.3s var(--ease-out-expo),
    opacity 0.3s var(--ease-out-expo);
}

.cursor.hovering .cursor-ring {
  width: 60px;
  height: 60px;
  opacity: 1;
}

.cursor.hovering .cursor-dot {
  transform: translate(-50%, -50%) scale(1.5);
}

/* --------------------------------------------------------------------------
   Noise Overlay
   -------------------------------------------------------------------------- */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Background Shapes
   -------------------------------------------------------------------------- */
.bg-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
}

.shape-1 {
  width: 600px;
  height: 600px;
  background: var(--color-green-start);
  top: -200px;
  right: -200px;
}

.shape-2 {
  width: 500px;
  height: 500px;
  background: var(--color-blue-start);
  bottom: 20%;
  left: -150px;
}

.shape-3 {
  width: 400px;
  height: 400px;
  background: var(--color-blue-end);
  top: 50%;
  right: 10%;
}

.shape-4 {
  width: 300px;
  height: 300px;
  background: var(--color-green-end);
  bottom: -100px;
  left: 30%;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  backdrop-filter: blur(10px);
  background: rgba(5, 5, 8, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 34px;
  width: auto;
  transition: opacity 0.3s var(--ease-out-expo);
  opacity: 0.9;
}

.nav-logo:hover img {
  opacity: 1;
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
}

.nav-link {
  font-size: var(--font-size-sm);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  position: relative;
  padding: var(--space-xs) 0;
  transition: color 0.3s var(--ease-out-expo);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gradient-primary);
  transition: width 0.3s var(--ease-out-expo);
}

.nav-link:hover {
  color: var(--color-text);
}

.nav-link:hover::after {
  width: 100%;
}

/* --------------------------------------------------------------------------
   Hero Section - Cinematic Manifesto
   -------------------------------------------------------------------------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--nav-height) var(--space-lg) var(--space-lg);
  position: relative;
  overflow: hidden;
}

/* Floating Orbs */
.hero-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    var(--color-green-start) 0%,
    transparent 70%
  );
  top: 10%;
  left: -10%;
  animation: orbFloat1 20s ease-in-out infinite;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    var(--color-blue-start) 0%,
    transparent 70%
  );
  bottom: 10%;
  right: -5%;
  animation: orbFloat2 25s ease-in-out infinite;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    var(--color-blue-end) 0%,
    transparent 70%
  );
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: orbFloat3 18s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  33% {
    transform: translate3d(50px, 30px, 0) scale(1.1);
  }
  66% {
    transform: translate3d(-30px, -20px, 0) scale(0.9);
  }
}

@keyframes orbFloat2 {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-40px, -50px, 0) scale(1.15);
  }
}

@keyframes orbFloat3 {
  0%,
  100% {
    transform: translate3d(-50%, -50%, 0) scale(1);
    opacity: 0.3;
  }
  50% {
    transform: translate3d(-50%, -50%, 0) scale(1.2);
    opacity: 0.5;
  }
}

/* Grid Pattern */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0;
  mask-image: radial-gradient(
    ellipse 80% 80% at 50% 50%,
    black 20%,
    transparent 70%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 80% 80% at 50% 50%,
    black 20%,
    transparent 70%
  );
}

/* Hero Stage */
.hero-stage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  min-height: calc(100vh - var(--nav-height) - var(--space-lg));
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: visible;
}

/* The Statement */
.hero-statement {
  margin-bottom: var(--space-xl);
  overflow: visible;
}

.statement-line {
  display: block;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  padding: 0.05em 0;
}

.word-reveal {
  display: inline-block;
  opacity: 0;
  transform: translateY(80px) rotate(3deg);
  margin-right: 0.2em;
  padding: 0.05em 0;
}

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

.word-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Signature */
.hero-signature {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  opacity: 0;
  transform: translateY(20px);
}

.signature-line {
  width: 60px;
  height: 1px;
  background: var(--gradient-primary);
}

.signature-name {
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.signature-role {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  padding-left: var(--space-md);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

/* CTA Arrow */
.hero-arrow {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  opacity: 0;
  transition: all 0.4s var(--ease-out-expo);
}

.arrow-text {
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.arrow-icon {
  width: 24px;
  height: 24px;
  color: var(--color-text-muted);
  animation: arrowBounce 2s ease-in-out infinite;
}

.arrow-icon svg {
  width: 100%;
  height: 100%;
}

.hero-arrow:hover .arrow-icon {
  color: var(--color-green-start);
}

@keyframes arrowBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

/* Corner Accent */
.hero-corner {
  position: absolute;
  bottom: var(--space-lg);
  right: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  opacity: 0;
}

.corner-year,
.corner-location {
  font-size: var(--font-size-xs);
  color: var(--color-text-subtle);
  letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   Section Common Styles
   -------------------------------------------------------------------------- */
section {
  padding: var(--space-2xl) var(--space-lg);
}

.section-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.label-line {
  width: 40px;
  height: 1px;
  background: var(--gradient-primary);
}

.label-text {
  font-size: var(--font-size-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.title-line {
  display: block;
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --------------------------------------------------------------------------
   About Section - Bento Grid Layout
   -------------------------------------------------------------------------- */
.about {
  position: relative;
  overflow-x: clip;
  overflow-y: visible;
  padding: var(--space-2xl) var(--space-lg);
}

/* Floating Orbs */
.about-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.about-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0;
}

.about-orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    var(--color-green-start) 0%,
    transparent 70%
  );
  top: 10%;
  right: -10%;
  animation: aboutOrbFloat1 18s ease-in-out infinite;
}

.about-orb-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(
    circle,
    var(--color-blue-start) 0%,
    transparent 70%
  );
  bottom: 20%;
  left: -5%;
  animation: aboutOrbFloat2 22s ease-in-out infinite;
}

@keyframes aboutOrbFloat1 {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-30px, 20px, 0) scale(1.1);
  }
}

@keyframes aboutOrbFloat2 {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(20px, -30px, 0) scale(1.15);
  }
}

/* Section Header */
.about-header {
  max-width: var(--container-max);
  margin: 0 auto var(--space-lg);
  position: relative;
  z-index: 1;
}

.label-number {
  margin-left: auto;
  font-size: var(--font-size-xs);
  color: var(--color-text-subtle);
  font-weight: 500;
}

/* Bento Grid */
.about-bento {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto auto auto auto;
  gap: var(--space-md);
  position: relative;
  z-index: 1;
  overflow: visible;
}

/* Bento Card Base */
.bento-card {
  background: var(--color-bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: var(--space-lg);
  position: relative;
  transition: all 0.4s var(--ease-out-expo);
  opacity: 0;
  transform: translateY(30px);
  overflow: visible;
}

.bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.03) 0%,
    transparent 50%
  );
  pointer-events: none;
  border-radius: 20px;
  z-index: -1;
}

.bento-card:hover {
  border-color: rgba(168, 224, 99, 0.15);
  transform: translateY(-4px);
}

/* Portrait Card */
.bento-portrait {
  grid-column: span 3;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: 0;
}

.portrait-circle {
  position: relative;
  width: 160px;
  height: 160px;
}

.portrait-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  filter: grayscale(100%) contrast(1.1);
  transition: filter 0.5s var(--ease-out-expo);
}

.bento-portrait:hover .portrait-circle img {
  filter: grayscale(0%) contrast(1);
}

.portrait-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: var(--gradient-primary);
  opacity: 0.4;
  z-index: -1;
  transition: opacity 0.4s var(--ease-out-expo);
}

.bento-portrait:hover .portrait-ring {
  opacity: 0.7;
}

.portrait-info {
  text-align: center;
}

.portrait-name {
  display: block;
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.portrait-location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.location-dot {
  width: 8px;
  height: 8px;
  background: var(--color-green-start);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

/* Statement Card */
.bento-statement {
  grid-column: span 5;
  display: flex;
  align-items: center;
}

.bento-statement-text {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text);
}

/* Stat Cards */
.bento-stat {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--space-lg);
  min-width: 0;
}

.stat-big {
  display: inline-block;
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 700;
  background: var(--gradient-text);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.4;
  margin-bottom: var(--space-xs);
  padding: 0.2em 0.5em;
  white-space: nowrap;
  transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
}

.stat-desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* Philosophy Card */
.bento-philosophy {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(168, 224, 99, 0.08) 0%,
    rgba(0, 153, 255, 0.08) 100%
  );
}

.philosophy-quote {
  font-size: 4rem;
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 0.5;
  margin-bottom: var(--space-sm);
}

.philosophy-content {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
  line-height: 1.6;
  font-style: italic;
}

/* Skills Card */
.bento-skills {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.skills-label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-subtle);
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.skill-tag {
  font-size: var(--font-size-sm);
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  color: var(--color-text-muted);
  transition: all 0.3s var(--ease-out-expo);
}

.skill-tag:hover {
  background: rgba(168, 224, 99, 0.1);
  border-color: rgba(168, 224, 99, 0.3);
  color: var(--color-green-start);
}

/* Focus Card */
.bento-focus {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.focus-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border-radius: 12px;
  transition: background 0.3s var(--ease-out-expo);
}

.focus-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.focus-icon {
  width: 32px;
  height: 32px;
  color: var(--color-green-start);
  flex-shrink: 0;
}

.focus-icon svg {
  width: 100%;
  height: 100%;
}

.focus-text {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
}

/* Marquee */
.about-marquee {
  max-width: var(--container-max);
  margin: var(--space-xl) auto 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
  mask-image: linear-gradient(
    90deg,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  width: max-content;
  animation: marquee 25s linear infinite;
}

.marquee-item {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 600;
  color: var(--color-text-subtle);
  white-space: nowrap;
  transition: color 0.3s var(--ease-out-expo);
}

.marquee-item:hover {
  color: var(--color-text-muted);
}

.marquee-dot {
  width: 8px;
  height: 8px;
  background: var(--gradient-primary);
  border-radius: 50%;
  flex-shrink: 0;
}

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

/* --------------------------------------------------------------------------
   Projects Section
   -------------------------------------------------------------------------- */
.projects {
  position: relative;
}

.projects-container {
  max-width: var(--container-max);
  margin: 0 auto;
}

.section-header {
  margin-bottom: var(--space-xl);
}

.projects-title {
  font-size: var(--font-size-4xl);
  font-weight: 600;
  line-height: 1.1;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.projects-cta-wrapper {
  display: flex;
  justify-content: center;
  margin-top: var(--space-xl);
}

.projects-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  text-decoration: none;
  transition: all 0.3s ease;
}

.projects-cta-btn:hover {
  background: var(--gradient-primary);
  border-color: transparent;
  color: var(--color-bg);
}

.projects-cta-btn svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.projects-cta-btn:hover svg {
  transform: translateX(4px);
}

.project-card {
  position: relative;
  display: block;
  padding: var(--space-lg);
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.5s var(--ease-out-expo);
}

.card-bg {
  position: absolute;
  inset: 0;
  background: var(--color-bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  transition: border-color 0.5s var(--ease-out-expo);
}

.project-card:hover .card-bg {
  border-color: rgba(168, 224, 99, 0.2);
}

.card-content {
  position: relative;
  z-index: 2;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.card-number {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-subtle);
}

.card-arrow {
  width: 24px;
  height: 24px;
  color: var(--color-text-muted);
  transition: all 0.3s var(--ease-out-expo);
}

.card-arrow svg {
  width: 100%;
  height: 100%;
}

.project-card:hover .card-arrow {
  color: var(--color-green-start);
  transform: translate(4px, -4px);
}

.card-title {
  font-size: var(--font-size-3xl);
  font-weight: 600;
  margin-bottom: var(--space-sm);
  transition: color 0.3s var(--ease-out-expo);
}

.project-card:hover .card-title {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-description {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.card-tags {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.tag {
  font-size: var(--font-size-xs);
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 100px;
  color: var(--color-text-muted);
}

.card-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 80%;
  transform: translate3d(-50%, -50%, 0);
  background: var(--gradient-glow);
  filter: none;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out-expo), filter 0.5s var(--ease-out-expo);
  z-index: 1;
}

.project-card:hover .card-glow {
  filter: blur(80px);
}

.project-card:hover .card-glow {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Contact Section - Minimal
   -------------------------------------------------------------------------- */
.contact {
  position: relative;
  padding: var(--space-xl) var(--space-lg);
}

.contact-minimal {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.contact-label {
  font-size: var(--font-size-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-subtle);
}

.contact-email-link {
  font-size: var(--font-size-lg);
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color 0.3s var(--ease-out-expo);
  position: relative;
}

.contact-email-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gradient-primary);
  transition: width 0.3s var(--ease-out-expo);
}

.contact-email-link:hover {
  color: var(--color-text);
}

.contact-email-link:hover::after {
  width: 100%;
}

/* --------------------------------------------------------------------------
   Footer - Minimal & Refined
   -------------------------------------------------------------------------- */
.footer {
  padding: var(--space-lg) var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.footer-icon {
  opacity: 0.6;
  transition: opacity 0.3s var(--ease-out-expo);
  width: 170px;
  height: auto;
}

.footer-left:hover .footer-icon {
  opacity: 1;
}

.footer-name {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-muted);
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.footer-link {
  font-size: var(--font-size-sm);
  color: var(--color-text-subtle);
  transition: color 0.3s var(--ease-out-expo);
  position: relative;
}

.footer-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gradient-primary);
  transition: width 0.3s var(--ease-out-expo);
}

.footer-link:hover {
  color: var(--color-text);
}

.footer-link:hover::after {
  width: 100%;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-xs);
  color: var(--color-text-subtle);
}

.footer-divider {
  opacity: 0.3;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  /* Bento Grid - Tablet Large */
  .about-bento {
    grid-template-columns: repeat(6, 1fr);
  }

  .bento-portrait {
    grid-column: span 2;
    grid-row: span 2;
  }

  .bento-statement {
    grid-column: span 4;
  }

  .bento-stat {
    grid-column: span 2;
  }

  .bento-philosophy {
    grid-column: span 3;
  }

  .bento-skills {
    grid-column: span 3;
  }

  .bento-focus {
    grid-column: span 6;
    flex-direction: row;
    justify-content: space-around;
  }
}

@media (max-width: 1024px) {
  :root {
    --font-size-4xl: 3rem;
    --font-size-3xl: 2rem;
  }

  /* Hero Section */
  .hero-signature {
    flex-wrap: wrap;
  }

  .signature-role {
    border-left: none;
    padding-left: 0;
    width: 100%;
    margin-top: var(--space-xs);
  }

  .hero-arrow {
    bottom: var(--space-md);
  }

  .hero-corner {
    bottom: var(--space-md);
    right: var(--space-md);
  }

  /* Projects */
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --space-lg: 2rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    --nav-height: 70px;
  }

  .nav-container {
    padding: 0 var(--space-md);
  }

  .nav-links {
    gap: var(--space-md);
  }

  .nav-link {
    font-size: 0.7rem;
  }

  section {
    padding: var(--space-xl) var(--space-md);
  }

  /* Hero */
  .hero {
    padding: var(--nav-height) var(--space-md) var(--space-lg);
  }

  .hero-stage {
    padding: 0 var(--space-sm);
  }

  .statement-line {
    font-size: clamp(2rem, 10vw, 4rem);
  }

  .hero-signature {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .signature-line {
    width: 40px;
  }

  .hero-arrow {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    margin-top: var(--space-xl);
    align-items: flex-start;
  }

  .hero-corner {
    display: none;
  }

  /* Reduce orb intensity on mobile */
  .orb {
    filter: blur(120px);
    opacity: 0.1 !important;
  }

  .orb-1 {
    width: 200px;
    height: 200px;
  }

  .orb-2 {
    width: 180px;
    height: 180px;
  }

  .orb-3 {
    width: 150px;
    height: 150px;
  }

  /* About - Bento Grid */
  .about {
    padding: var(--space-xl) var(--space-md);
  }

  .about-bento {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .bento-portrait {
    grid-column: span 1;
    grid-row: span 1;
    padding: var(--space-md);
  }

  .portrait-circle {
    width: 120px;
    height: 120px;
  }

  .bento-statement {
    grid-column: span 1;
  }

  .bento-statement-text {
    font-size: var(--font-size-lg);
  }

  .bento-stat {
    grid-column: span 1;
  }

  .stat-big {
    font-size: var(--font-size-3xl);
  }

  .bento-philosophy {
    grid-column: span 2;
  }

  .bento-skills {
    grid-column: span 2;
  }

  .bento-focus {
    grid-column: span 2;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: var(--space-sm);
  }

  .focus-item {
    flex: 1 1 calc(50% - var(--space-sm));
  }

  .about-marquee {
    margin-top: var(--space-lg);
  }

  .marquee-item {
    font-size: var(--font-size-xl);
  }

  /* Projects */
  .projects {
    padding: var(--space-xl) var(--space-md);
  }

  .card-title {
    font-size: var(--font-size-2xl);
  }

  /* Contact */
  .contact {
    padding: var(--space-lg) var(--space-md);
  }

  .contact-minimal {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  /* Footer */
  .footer {
    padding: var(--space-md);
  }

  .footer-container {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .footer-left {
    order: 1;
  }

  .footer-nav {
    order: 0;
  }

  .footer-right {
    order: 2;
  }
}

@media (max-width: 480px) {
  .nav-links {
    display: none;
  }

  .nav-logo img {
    height: 28px;
  }

  .statement-line {
    font-size: clamp(1.75rem, 9vw, 3rem);
    line-height: 1.2;
  }

  .word-outline {
    -webkit-text-stroke: 1px var(--color-text);
  }

  /* Bento Grid - Mobile */
  .about-bento {
    grid-template-columns: 1fr;
  }

  .bento-card {
    padding: var(--space-md);
  }

  .bento-portrait {
    grid-column: span 1;
    padding: var(--space-lg);
  }

  .portrait-circle {
    width: 100px;
    height: 100px;
  }

  .bento-statement {
    grid-column: span 1;
  }

  .bento-statement-text {
    font-size: var(--font-size-base);
  }

  .bento-stat {
    grid-column: span 1;
  }

  .stat-big {
    font-size: var(--font-size-2xl);
  }

  .bento-philosophy,
  .bento-skills,
  .bento-focus {
    grid-column: span 1;
  }

  .bento-focus {
    flex-direction: column;
  }

  .focus-item {
    flex: none;
  }

  .marquee-item {
    font-size: var(--font-size-lg);
  }

  .contact-email-link {
    font-size: var(--font-size-base);
  }

  .footer-nav {
    gap: var(--space-md);
  }
}

/* --------------------------------------------------------------------------
   Animation Initial States (for GSAP)
   -------------------------------------------------------------------------- */
.section-header,
.project-card,
.contact-minimal,
.about-header {
  opacity: 0;
  transform: translateY(40px);
}

.orb,
.hero-grid,
.hero-arrow,
.hero-corner,
.hero-signature,
.about-orb {
  opacity: 0;
}

.word-reveal {
  opacity: 0;
  transform: translateY(80px) rotate(3deg);
}

/* Bento cards have their own initial state in the component styles */

/* --------------------------------------------------------------------------
   Swup Page Transitions - Smooth Content Fade
   -------------------------------------------------------------------------- */

/* Hide the overlay - not needed for this transition style */
.transition-overlay {
  display: none;
}

/* Main content container */
.transition-fade {
  opacity: 1;
}

html.is-animating .transition-fade {
  pointer-events: none;
}

/* Leaving animation - slow fade out */
html.is-leaving .transition-fade {
  animation: fadeOut 0.5s ease forwards;
}

/* Entering animation - fade in */
html.is-rendering .transition-fade {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   Legal Pages (Imprint & Privacy)
   -------------------------------------------------------------------------- */
.legal-page {
  min-height: 100vh;
  padding: calc(var(--nav-height) + var(--space-xl)) var(--space-lg) var(--space-xl);
}

.legal-container {
  max-width: 800px;
  margin: 0 auto;
}

.legal-header {
  margin-bottom: var(--space-xl);
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  transition: color 0.3s var(--ease-out-expo);
}

.legal-back svg {
  width: 20px;
  height: 20px;
}

.legal-back:hover {
  color: var(--color-green-start);
}

.legal-title {
  font-size: clamp(2.5rem, 6vw, var(--font-size-4xl));
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.legal-content {
  color: var(--color-text-muted);
  line-height: 1.8;
}

.legal-section {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.legal-section:last-child {
  border-bottom: none;
}

.legal-section h2 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.legal-section h3 {
  font-size: var(--font-size-lg);
  font-weight: 500;
  color: var(--color-text);
  margin-top: var(--space-md);
  margin-bottom: var(--space-sm);
}

.legal-section p {
  margin-bottom: var(--space-sm);
}

.legal-section ul {
  margin: var(--space-sm) 0 var(--space-md) var(--space-md);
}

.legal-section li {
  margin-bottom: var(--space-xs);
}

.legal-section a {
  color: var(--color-green-start);
  transition: color 0.3s var(--ease-out-expo);
}

.legal-section a:hover {
  color: var(--color-blue-start);
}

.legal-updated {
  font-size: var(--font-size-sm);
  color: var(--color-text-subtle);
  font-style: italic;
}

@media (max-width: 768px) {
  .legal-page {
    padding: calc(var(--nav-height) + var(--space-lg)) var(--space-md) var(--space-lg);
  }

  .legal-title {
    font-size: var(--font-size-3xl);
  }

  .legal-section h2 {
    font-size: var(--font-size-lg);
  }

  .legal-section h3 {
    font-size: var(--font-size-base);
  }
}

/* --------------------------------------------------------------------------
   Projects Page
   -------------------------------------------------------------------------- */

/* Projects Hero */
.projects-hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-height) + var(--space-xl)) var(--space-lg) var(--space-xl);
}

.projects-hero-content {
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

.projects-hero-content > * {
  max-width: 800px;
}

.projects-hero-title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin: var(--space-md) 0;
}

.projects-hero-title .title-line {
  display: block;
}

.projects-hero-desc {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  max-width: 600px;
  line-height: 1.7;
}

/* Category Filter */
.projects-filter {
  position: sticky;
  top: var(--nav-height);
  z-index: 90;
  padding: var(--space-md) var(--space-lg);
  transition: top 0.3s ease, background 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
  border-bottom: 1px solid transparent;
}

.projects-filter.is-stuck {
  padding: var(--space-sm) var(--space-lg);
  background: rgba(5, 5, 8, 0.8);
  backdrop-filter: blur(10px);
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.projects-filter.is-stuck .filter-tab {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

.projects-filter.is-stuck .tab-count {
  padding: 0.1rem 0.4rem;
  font-size: 0.6rem;
}

.projects-filter.is-stuck .tab-badge {
  padding: 0.1rem 0.4rem;
  font-size: 0.55rem;
}

.projects-filter.nav-hidden {
  top: 0;
}

.filter-container {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.filter-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.filter-tabs {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--color-bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  color: var(--color-text-muted);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-tab:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--color-text);
  background: var(--color-bg-elevated);
}

.filter-tab.active {
  background: var(--gradient-primary);
  border-color: transparent;
  color: var(--color-bg);
}

.filter-tab:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tab-icon {
  display: flex;
  align-items: center;
}

.tab-icon svg {
  width: 16px;
  height: 16px;
}

.tab-count {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  font-size: 0.7rem;
}

.filter-tab.active .tab-count {
  background: rgba(0, 0, 0, 0.2);
}

.tab-badge {
  background: rgba(168, 224, 99, 0.15);
  color: var(--color-green-start);
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Projects Showcase */
.projects-showcase {
  padding: var(--space-xl) var(--space-lg);
}

.showcase-container {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

/* Showcase Card */
.project-showcase-card {
  position: relative;
  opacity: 0;
  transform: translateY(40px);
}

.showcase-card-inner {
  background: var(--color-bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-showcase-card:hover .showcase-card-inner {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-4px);
}

.showcase-card-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--color-green-start) 0%, transparent 70%);
  opacity: 0;
  filter: none;
  pointer-events: none;
  transition: opacity 0.4s ease, filter 0.4s ease;
  top: 50%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0);
}

.project-showcase-card:hover .showcase-card-glow {
  filter: blur(80px);
}

.project-showcase-card:hover .showcase-card-glow {
  opacity: 0.1;
}

/* Card Header */
.showcase-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.showcase-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.showcase-category {
  font-size: var(--font-size-xs);
  color: var(--color-green-start);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.showcase-divider {
  width: 4px;
  height: 4px;
  background: var(--color-text-subtle);
  border-radius: 50%;
}

.showcase-tech {
  font-size: var(--font-size-xs);
  color: var(--color-text-subtle);
}

.showcase-number {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.03);
  line-height: 1;
}

/* Card Content */
.showcase-content {
  position: relative;
  z-index: 1;
}

.showcase-title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.showcase-tagline {
  font-size: var(--font-size-lg);
  color: var(--color-text);
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.showcase-description {
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 700px;
  margin-bottom: 1.5rem;
}

/* Features Grid */
.showcase-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.feature-item {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  transition: background 0.3s ease;
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.feature-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-glow);
  border-radius: 10px;
}

.feature-icon svg {
  width: 20px;
  height: 20px;
  color: var(--color-green-start);
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.feature-name {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text);
}

.feature-desc {
  font-size: var(--font-size-xs);
  color: var(--color-text-subtle);
}

/* Stats */
.showcase-stats {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-md) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: var(--space-md);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-value {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Actions */
.showcase-actions {
  display: flex;
  gap: var(--space-sm);
}

.showcase-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: 100px;
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.showcase-btn.primary {
  background: var(--gradient-primary);
  color: var(--color-bg);
}

.showcase-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(168, 224, 99, 0.2);
}

.showcase-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.showcase-btn:hover svg {
  transform: translate(2px, -2px);
}

/* Projects Page Responsive */
@media (max-width: 768px) {
  .projects-hero {
    min-height: 50vh;
    padding: calc(var(--nav-height) + var(--space-lg)) var(--space-md) var(--space-lg);
  }

  .projects-hero-title {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .projects-hero-desc {
    font-size: var(--font-size-base);
  }

  .projects-filter {
    position: static;
    padding: var(--space-md) var(--space-md);
    background: none !important;
    backdrop-filter: none !important;
    border-bottom: none !important;
  }

  .projects-filter.is-stuck {
    background: none !important;
    backdrop-filter: none !important;
  }

  .projects-filter.is-stuck .filter-tab {
    padding: 0.875rem 1.25rem;
    font-size: var(--font-size-sm);
  }

  .filter-container {
    display: block;
  }

  .filter-label {
    display: none;
  }

  .filter-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.25rem;
    margin: -0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    cursor: grab;
  }

  .filter-tabs:active {
    cursor: grabbing;
  }

  .filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .filter-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.75rem 1rem;
    min-height: 44px;
    font-size: 0.8rem;
    scroll-snap-align: start;
  }

  .filter-tab .tab-count,
  .filter-tab .tab-badge {
    padding: 0.15rem 0.4rem;
    font-size: 0.6rem;
  }

  .projects-showcase {
    padding: var(--space-lg) var(--space-md);
  }

  .showcase-card-inner {
    padding: var(--space-md);
  }

  .showcase-number {
    font-size: var(--font-size-2xl);
  }

  .showcase-title {
    font-size: var(--font-size-2xl);
  }

  .showcase-features {
    grid-template-columns: 1fr;
  }

  .showcase-stats {
    flex-wrap: wrap;
    gap: var(--space-md);
  }

  .stat-item {
    min-width: 80px;
  }
}

/* =========================
   Contact Drawer (non-blocking side panel)
   ========================= */
.contact-drawer {
  position: fixed;
  top: 50%;
  right: 1.5rem;
  z-index: 9000;
  width: min(400px, calc(100vw - 2rem));
  padding: clamp(1.75rem, 3vw, 2.25rem);
  background: linear-gradient(160deg, rgba(28, 32, 40, 0.92), rgba(10, 12, 16, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(168, 224, 99, 0.05),
    inset 0 0 0 1px rgba(168, 224, 99, 0.05);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(120%, -50%, 0);
  overflow: hidden;
}

.contact-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.contact-drawer-glow {
  position: absolute;
  top: -60%;
  right: -40%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(168, 224, 99, 0.18), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.contact-drawer > *:not(.contact-drawer-glow):not(.contact-drawer-close) {
  position: relative;
  z-index: 1;
}

.contact-drawer-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.3s var(--ease-out-expo),
              color 0.3s var(--ease-out-expo),
              border-color 0.3s var(--ease-out-expo),
              transform 0.4s var(--ease-out-expo);
  z-index: 2;
}

.contact-drawer-close svg {
  width: 16px;
  height: 16px;
}

.contact-drawer-close:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--color-text);
  transform: rotate(90deg);
}

.contact-drawer-label {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--color-text-subtle);
}

.contact-drawer-title {
  margin: 0.5rem 0 0;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.contact-drawer-text {
  margin: 1rem 0 0;
  color: var(--color-text-muted);
  line-height: 1.6;
  font-size: var(--font-size-sm);
}

.contact-drawer-channels {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-drawer-channel {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  transition: background 0.3s var(--ease-out-expo),
              border-color 0.3s var(--ease-out-expo),
              transform 0.4s var(--ease-out-expo);
}

a.contact-drawer-channel:hover {
  background: rgba(168, 224, 99, 0.06);
  border-color: rgba(168, 224, 99, 0.22);
  transform: translateY(-2px);
}

a.contact-drawer-channel:hover .channel-arrow {
  color: var(--color-green-start);
  transform: translate(2px, -2px);
}

.channel-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-glow);
  border-radius: 10px;
  color: var(--color-green-start);
}

.channel-icon svg {
  width: 18px;
  height: 18px;
}

.channel-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.channel-label {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-subtle);
}

.channel-value {
  font-size: var(--font-size-sm);
  color: var(--color-text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-arrow {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--color-text-subtle);
  transition: color 0.3s var(--ease-out-expo),
              transform 0.4s var(--ease-out-expo);
}

.channel-arrow svg {
  width: 100%;
  height: 100%;
}

@media (max-width: 600px) {
  .contact-drawer {
    top: auto;
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    width: auto;
    transform: translate3d(0, 120%, 0);
  }
}

/* =========================
   404 Error Page
   ========================= */
.error-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-md);
  overflow: hidden;
}

.error-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.error-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  animation: errorOrbFloat 18s ease-in-out infinite;
}

.error-orb-1 {
  width: 480px;
  height: 480px;
  top: -120px;
  left: -120px;
  background: radial-gradient(circle, var(--color-green-start), transparent 70%);
}

.error-orb-2 {
  width: 380px;
  height: 380px;
  bottom: -80px;
  right: -100px;
  background: radial-gradient(circle, var(--color-green-end, #6dd5ed), transparent 70%);
  animation-delay: -6s;
}

.error-orb-3 {
  width: 280px;
  height: 280px;
  top: 40%;
  left: 55%;
  background: radial-gradient(circle, rgba(168, 224, 99, 0.4), transparent 70%);
  animation-delay: -12s;
}

@keyframes errorOrbFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(30px, -40px, 0) scale(1.05); }
  66% { transform: translate3d(-20px, 30px, 0) scale(0.95); }
}

.error-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(circle at center, black, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at center, black, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.error-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 640px;
}

.error-label {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--color-text-subtle);
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.02);
}

.error-code {
  margin: 1.5rem 0 0;
  font-size: clamp(7rem, 22vw, 14rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: errorCodeFloat 6s ease-in-out infinite;
}

@keyframes errorCodeFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -8px, 0); }
}

.error-title {
  margin: 1rem 0 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--color-text);
}

.error-message {
  margin: 1rem auto 0;
  max-width: 480px;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.error-actions {
  margin-top: 2.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.error-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.6rem;
  background: var(--gradient-glow);
  border: 1px solid rgba(168, 224, 99, 0.3);
  border-radius: 100px;
  color: var(--color-green-start);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s var(--ease-out-expo);
}

.error-cta svg {
  width: 16px;
  height: 16px;
}

.error-cta:hover {
  background: rgba(168, 224, 99, 0.15);
  border-color: rgba(168, 224, 99, 0.5);
  transform: translateY(-2px);
}

.error-link {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 2px;
  transition: color 0.3s var(--ease-out-expo), border-color 0.3s var(--ease-out-expo);
}

.error-link:hover {
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.4);
}

/* =========================
   Blur stabilization
   Force each blurred element onto its own composite layer so the GPU
   doesn't re-rasterize on every paint (root cause of the flicker).
   ========================= */
.shape,
.orb,
.about-orb,
.error-orb,
.contact-drawer-glow {
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

.contact-drawer-glow {
  transform: translate3d(0, 0, 0);
}

/* backdrop-filter elements: pin to own layer to avoid re-sampling jitter */
.nav,
.contact-drawer,
.projects-filter.is-stuck {
  will-change: backdrop-filter;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
