/* ===========================
   0. Font Face
   =========================== */
@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/fonts/SpaceGrotesk-Variable.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
  font-style: normal;
}

/* ===========================
   1. Custom Properties
   =========================== */
:root {
  --color-bg: #FAF9F6;
  --color-text: #1A1A2E;
  --color-text-muted: #6B7280;
  --color-accent-1: #FF3366;
  --color-accent-2: #5B5EF4;
  --color-accent-3: #FFBE0B;
  --color-accent-4: #00D4AA;
  --color-accent-5: #FF6B35;
  --color-surface: #FFFFFF;
  --color-border: #E5E7EB;

  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --font-size-hero: clamp(2.5rem, 5vw + 1rem, 4.5rem);
  --font-size-h2: clamp(1.75rem, 3vw + 0.5rem, 2.5rem);
  --font-size-body: clamp(1rem, 0.5vw + 0.875rem, 1.125rem);
  --font-size-small: 0.875rem;

  --space-section: clamp(4rem, 8vw, 8rem);
  --color-surface-glass: rgba(255, 255, 255, 0.4);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.4s ease, color 0.4s ease;
}

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

/* ===========================
   3. Utilities
   =========================== */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--font-size-h2);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--color-accent-1);
  border-radius: 2px;
  transition: background-color 0.4s ease;
}

.section-title--light {
  color: var(--color-bg);
}

.section-title--light::after {
  content: '● ● ●';
  width: auto;
  height: auto;
  background: none;
  font-size: 0.5rem;
  letter-spacing: 0.3rem;
  color: var(--color-accent-3);
}

/* ===========================
   4. Site Controls (top-right toolbar)
   =========================== */
.site-controls {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-toggle {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 50%),
    var(--color-surface-glass);
  backdrop-filter: blur(40px) saturate(200%) brightness(1.04);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.04);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 14px;
  padding: 0 0.75rem;
  height: 36px;
  font-family: var(--font-heading);
  font-size: var(--font-size-small);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06),
    0 4px 20px rgba(0, 0, 0, 0.1),
    0 1px 4px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.25s ease,
              background-color 0.4s ease,
              border-color 0.4s ease,
              color 0.4s ease;
  color: var(--color-text-muted);
}

.lang-toggle:hover {
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06),
    0 6px 24px rgba(0, 0, 0, 0.14),
    0 1px 4px rgba(0, 0, 0, 0.06);
}

.lang-toggle:focus-visible {
  outline: 2px solid var(--color-accent-2);
  outline-offset: 2px;
}

.lang-toggle__separator {
  color: var(--color-border);
}

.lang-toggle__option {
  transition: color 0.2s ease;
}

.lang-toggle__option.active {
  color: var(--color-accent-1);
}

/* ===========================
   4a. Rave Toggle
   =========================== */
.rave-toggle {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 50%),
    var(--color-surface-glass);
  backdrop-filter: blur(40px) saturate(200%) brightness(1.04);
  -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(1.04);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 14px;
  padding: 0.4rem;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06),
    0 4px 20px rgba(0, 0, 0, 0.1),
    0 1px 4px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.25s ease,
              background-color 0.4s ease,
              border-color 0.4s ease,
              color 0.4s ease;
  color: var(--color-text-muted);
}

.rave-toggle:hover {
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(0, 0, 0, 0.06),
    0 6px 24px rgba(0, 0, 0, 0.14),
    0 1px 4px rgba(0, 0, 0, 0.06);
  color: var(--color-accent-3);
}

.rave-toggle:focus-visible {
  outline: 2px solid var(--color-accent-2);
  outline-offset: 2px;
}

.rave-toggle__icon--sun {
  display: none;
}

html.rave-mode .rave-toggle__icon--bolt {
  display: none;
}

html.rave-mode .rave-toggle__icon--sun {
  display: block;
}

/* ===========================
   4b. Memphis Decorative Shapes
   =========================== */
.memphis {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.memphis__shape {
  position: absolute;
  opacity: 0.18;
  animation: memphis-float 20s ease-in-out infinite;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
              translate 0.4s cubic-bezier(0.23, 1, 0.32, 1),
              opacity 0.4s ease,
              filter 0.4s ease;
  will-change: transform, translate;
}

/* Individual shape positions, sizes, rotations */
/* Circles */
.memphis__shape--1  { width: 50px;  top: 6%;   left: 4%;   --r: 15deg;  --depth: 0.03; animation-duration: 22s; }
.memphis__shape--2  { width: 24px;  top: 48%;  right: 3%;  --r: 0deg;   --depth: 0.06; animation-duration: 16s; animation-delay: -5s; }
.memphis__shape--3  { width: 26px;  top: 73%;  left: 14%;  --r: 0deg;   --depth: 0.02; animation-duration: 21s; animation-delay: -8s; }
.memphis__shape--4  { width: 22px;  top: 53%;  left: 28%;  --r: 0deg;   --depth: 0.04; animation-duration: 15s; animation-delay: -4s; }
.memphis__shape--5  { width: 44px;  top: 86%;  left: 78%;  --r: 15deg;  --depth: 0.03; animation-duration: 22s; animation-delay: -7s; }
.memphis__shape--6  { width: 20px;  top: 78%;  left: 38%;  --r: 0deg;   --depth: 0.06; animation-duration: 16s; animation-delay: -9s; }
/* Triangles */
.memphis__shape--7  { width: 40px;  top: 12%;  right: 7%;  --r: -20deg; --depth: 0.05; animation-duration: 18s; animation-delay: -3s; }
.memphis__shape--8  { width: 30px;  top: 80%;  right: 10%; --r: 60deg;  --depth: 0.04; animation-duration: 17s; animation-delay: -1s; }
.memphis__shape--9  { width: 34px;  top: 45%;  left: 12%;  --r: -25deg; --depth: 0.04; animation-duration: 24s; animation-delay: -6s; }
.memphis__shape--10 { width: 36px;  top: 18%;  left: 63%;  --r: -15deg; --depth: 0.05; animation-duration: 21s; animation-delay: -12s; }
/* Crosses */
.memphis__shape--11 { width: 35px;  top: 32%;  left: 2%;   --r: 45deg;  --depth: 0.02; animation-duration: 25s; animation-delay: -7s; }
.memphis__shape--12 { width: 32px;  top: 90%;  left: 42%;  --r: -30deg; --depth: 0.05; animation-duration: 20s; animation-delay: -9s; }
.memphis__shape--13 { width: 28px;  top: 35%;  right: 3%;  --r: -50deg; --depth: 0.02; animation-duration: 22s; animation-delay: -4s; }
/* Squares */
.memphis__shape--14 { width: 42px;  top: 58%;  left: 6%;   --r: 30deg;  --depth: 0.03; animation-duration: 24s; animation-delay: -10s; }
.memphis__shape--15 { width: 38px;  top: 66%;  right: 5%;  --r: 20deg;  --depth: 0.02; animation-duration: 26s; animation-delay: -3s; }
.memphis__shape--16 { width: 22px;  top: 62%;  left: 72%;  --r: 40deg;  --depth: 0.05; animation-duration: 20s; animation-delay: -10s; }
/* Quarter circles */
.memphis__shape--17 { width: 36px;  top: 22%;  left: 86%;  --r: -45deg; --depth: 0.05; animation-duration: 19s; animation-delay: -4s; }
.memphis__shape--18 { width: 34px;  top: 38%;  left: 48%;  --r: -60deg; --depth: 0.06; animation-duration: 18s; animation-delay: -11s; }
.memphis__shape--19 { width: 38px;  top: 70%;  left: 55%;  --r: 25deg;  --depth: 0.03; animation-duration: 19s; animation-delay: -2s; }
/* Zigzags (angular) */
.memphis__shape--20 { width: 60px;  top: 3%;   left: 38%;  --r: -10deg; --depth: 0.04; animation-duration: 20s; animation-delay: -2s; }
.memphis__shape--21 { width: 55px;  top: 42%;  left: 91%;  --r: 5deg;   --depth: 0.03; animation-duration: 23s; animation-delay: -6s; }
.memphis__shape--22 { width: 55px;  top: 15%;  left: 50%;  --r: 10deg;  --depth: 0.03; animation-duration: 21s; animation-delay: -1s; }
/* Parallel lines */
.memphis__shape--23 { width: 35px;  top: 30%;  left: 22%;  --r: -35deg; --depth: 0.06; animation-duration: 23s; animation-delay: -8s; }
.memphis__shape--24 { width: 30px;  top: 95%;  left: 18%;  --r: 15deg;  --depth: 0.02; animation-duration: 17s; animation-delay: -5s; }
/* Arcs */
.memphis__shape--25 { width: 45px;  top: 16%;  left: 32%;  --r: 20deg;  --depth: 0.04; animation-duration: 20s; animation-delay: -3s; }
.memphis__shape--26 { width: 35px;  top: 84%;  left: 60%;  --r: -10deg; --depth: 0.03; animation-duration: 18s; animation-delay: -7s; }
/* Sprinkles */
.memphis__shape--27 { width: 45px;  top: 50%;  left: 75%;  --r: 0deg;   --depth: 0.05; animation-duration: 22s; animation-delay: -5s; }
/* Diamond */
.memphis__shape--28 { width: 30px;  top: 72%;  left: 25%;  --r: 10deg;  --depth: 0.02; animation-duration: 19s; animation-delay: -11s; }

/* ===========================
   5. Hero
   =========================== */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem;
  text-align: center;
  overflow: hidden;
}

.hero__accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  transition: height 0.4s ease, filter 0.4s ease;
  background: linear-gradient(
    90deg,
    var(--color-accent-1),
    var(--color-accent-3),
    var(--color-accent-2),
    var(--color-accent-4),
    var(--color-accent-5),
    var(--color-accent-1)
  );
  background-size: 300% 100%;
  animation: gradient-shift 8s ease infinite;
  z-index: 2;
}

.hero__content {
  max-width: 700px;
  position: relative;
  z-index: 2;
}

.hero__greeting {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.hero__name {
  font-family: var(--font-heading);
  font-size: var(--font-size-hero);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
  color: var(--color-text);
  cursor: default;
  position: relative;
}

/* Magnetic text – individual letter spans */
.hero__letter {
  display: inline-block;
  transition: translate 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: translate;
}

.hero__tagline {
  font-size: clamp(1.125rem, 2vw + 0.5rem, 1.5rem);
  color: var(--color-text);
  margin-bottom: 0.75rem;
  font-weight: 500;
  font-style: italic;
}

.hero__subtitle {
  font-size: var(--font-size-body);
  color: var(--color-text-muted);
  margin-bottom: 2.5rem;
  letter-spacing: 0.02em;
}

.hero__links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__cta {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: var(--font-size-small);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.25s ease;
}

.hero__cta:first-child {
  background: var(--color-accent-1);
  color: #fff;
}

.hero__cta:first-child:hover {
  background: #e6204f;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 51, 102, 0.35);
}

.hero__cta--secondary {
  border: 2px solid var(--color-accent-2);
  color: var(--color-accent-2);
}

.hero__cta--secondary:hover {
  background: var(--color-accent-2);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(91, 94, 244, 0.35);
}

.hero__cta:focus-visible {
  outline: 2px solid var(--color-accent-2);
  outline-offset: 3px;
}

/* Scroll hint chevron */
.hero__scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.5;
  animation: scroll-hint-bounce 2s ease-in-out infinite;
  z-index: 2;
  transition: opacity 0.4s ease, filter 0.4s ease;
}

/* ===========================
   6. About
   =========================== */
.about {
  padding: var(--space-section) 0;
  position: relative;
  z-index: 1;
}

.about__content {
  border-left: 3px solid var(--color-accent-5);
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 680px;
  transition: border-color 0.4s ease;
}

.about__content p {
  color: var(--color-text);
}

/* ===========================
   7. Timeline
   =========================== */
.timeline-section {
  padding: var(--space-section) 0;
  position: relative;
  z-index: 1;
}

.timeline {
  position: relative;
  padding: 2rem 0;
}

/* Vertical line — dotted bicolor Memphis */
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  transform: translateX(-50%);
  opacity: 0.3;
  background:
    radial-gradient(circle, var(--color-accent-2) 2px, transparent 2px) 0 0 / 4px 16px repeat-y,
    radial-gradient(circle, var(--color-accent-1) 1.5px, transparent 1.5px) 0 8px / 4px 16px repeat-y;
}

.timeline__item {
  position: relative;
  width: 50%;
  margin-bottom: 3rem;
}

/* Odd items: left side */
.timeline__item:nth-child(odd) {
  padding-right: 3rem;
  text-align: right;
  margin-left: 0;
}

/* Even items: right side */
.timeline__item:nth-child(even) {
  margin-left: 50%;
  padding-left: 3rem;
  text-align: left;
}

/* Diamond marker — Memphis */
.timeline__marker {
  position: absolute;
  width: 24px;
  height: 24px;
  background: var(--accent, var(--color-accent-1));
  border: 3px solid var(--color-bg);
  border-radius: 4px;
  top: 0.75rem;
  z-index: 1;
  transform: rotate(45deg);
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.timeline__item:nth-child(odd) .timeline__marker {
  right: -12px;
}

.timeline__item:nth-child(even) .timeline__marker {
  left: -12px;
}

/* Content card — Memphis */
.timeline__content {
  background: var(--color-surface);
  border-radius: 10px;
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  border-left: 4px solid var(--accent, var(--color-accent-1));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease,
              background-color 0.4s ease, border-color 0.4s ease;
}

.timeline__content:hover {
  transform: translateY(-3px) rotate(-0.5deg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.timeline__item:nth-child(odd) .timeline__content {
  border-left: none;
  border-right: 4px solid var(--accent, var(--color-accent-1));
  padding: 1.5rem 1.75rem 1.5rem 1.5rem;
}

.timeline__item:nth-child(odd) .timeline__content:hover {
  transform: translateY(-3px) rotate(0.5deg);
}

/* Memphis stickers on timeline cards */
.timeline__content::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  opacity: 0.18;
  pointer-events: none;
  background-size: contain;
  background-repeat: no-repeat;
  --sticker-r: 0deg;
  transform: rotate(var(--sticker-r));
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline__item:nth-child(even) .timeline__content::after { top: -8px; right: -8px; }
.timeline__item:nth-child(odd) .timeline__content::after { top: -8px; left: -8px; }

/* Item 1: circle (violet) */
.timeline__item:nth-child(1) .timeline__content::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none'%3E%3Ccircle cx='20' cy='20' r='16' stroke='%235B5EF4' stroke-width='3'/%3E%3C/svg%3E");
  --sticker-r: 15deg;
}
/* Item 2: triangle (green) */
.timeline__item:nth-child(2) .timeline__content::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none'%3E%3Cpolygon points='20,2 38,38 2,38' stroke='%2300D4AA' stroke-width='3'/%3E%3C/svg%3E");
  --sticker-r: -10deg;
}
/* Item 3: zigzag (orange) */
.timeline__item:nth-child(3) .timeline__content::after {
  width: 36px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 30' fill='none'%3E%3Cpolyline points='2,28 9,4 16,28 23,4 30,28 37,4 44,28' stroke='%23FF6B35' stroke-width='3' stroke-linejoin='miter'/%3E%3C/svg%3E");
  --sticker-r: 5deg;
}
/* Item 4: cross (yellow) */
.timeline__item:nth-child(4) .timeline__content::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none'%3E%3Cline x1='5' y1='20' x2='35' y2='20' stroke='%23FFBE0B' stroke-width='3'/%3E%3Cline x1='20' y1='5' x2='20' y2='35' stroke='%23FFBE0B' stroke-width='3'/%3E%3C/svg%3E");
  --sticker-r: 20deg;
}
/* Item 5: diamond (pink) */
.timeline__item:nth-child(5) .timeline__content::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none'%3E%3Cpolygon points='20,2 38,20 20,38 2,20' stroke='%23FF3366' stroke-width='3'/%3E%3C/svg%3E");
}

/* Sticker hover: opacity + bouncy rotation + scale */
@media (hover: hover) {
  .timeline__item .timeline__content:hover::after {
    opacity: 0.55;
    transform: rotate(calc(var(--sticker-r) + 15deg)) scale(1.15);
  }
}

/* Touch feedback via JS-toggled class (touch-only devices) */
@media (hover: none) {
  .timeline__content.is-touching {
    transform: translateY(-3px) rotate(-0.5deg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }
  .timeline__item:nth-child(odd) .timeline__content.is-touching {
    transform: translateY(-3px) rotate(0.5deg);
  }
  .timeline__item .timeline__content.is-touching::after {
    opacity: 0.55;
    transform: rotate(calc(var(--sticker-r) + 15deg)) scale(1.15);
  }
}

.timeline__date {
  display: inline-block;
  font-size: 0.8rem;
  transition: box-shadow 0.4s ease;
  font-weight: 700;
  color: #fff;
  background: var(--accent, var(--color-accent-1));
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.timeline__role {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.3rem;
}

.timeline__company {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.timeline__desc {
  font-size: var(--font-size-small);
  color: var(--color-text);
  line-height: 1.6;
}

/* ===========================
   8. Footer
   =========================== */
.footer {
  background: var(--color-text);
  color: var(--color-bg);
  padding: 0 0 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
  transition: background-color 0.4s ease;
}

/* Footer Memphis shapes */
.footer__memphis {
  position: absolute;
  opacity: 0.12;
  pointer-events: none;
  animation: memphis-float 20s ease-in-out infinite;
  transition: opacity 0.4s ease, filter 0.4s ease;
}
.footer__memphis--1 { width: 22px; top: 15%; left: 8%;  animation-duration: 24s; }
.footer__memphis--2 { width: 20px; top: 40%; right: 12%; animation-duration: 18s; animation-delay: -6s; }
.footer__memphis--3 { width: 28px; bottom: 22%; left: 16%; animation-duration: 21s; animation-delay: -3s; }

html.rave-mode .footer__memphis {
  opacity: 0.25;
  filter: drop-shadow(0 0 4px rgba(250, 249, 246, 0.4));
}

/* Zigzag separator */
.footer__zigzag {
  width: 100%;
  padding: 2.5rem 0 0;
  margin-bottom: 2.5rem;
}

.footer__zigzag svg {
  display: block;
  width: 100%;
  height: 12px;
  opacity: 0.5;
}

.footer__text {
  color: rgba(250, 250, 248, 0.7);
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.footer__links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.footer__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.75rem;
  border: 2px solid rgba(250, 250, 248, 0.3);
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: var(--font-size-small);
  font-weight: 600;
  color: var(--color-bg);
  letter-spacing: 0.02em;
  transition: all 0.25s ease;
}

.footer__link:nth-child(1) { --btn-accent: var(--color-accent-1); border-color: var(--btn-accent); }
.footer__link:nth-child(2) { --btn-accent: var(--color-accent-4); border-color: var(--btn-accent); }
.footer__link:nth-child(3) { --btn-accent: var(--color-accent-2); border-color: var(--btn-accent); }

@media (hover: hover) {
  .footer__link:hover {
    background: var(--btn-accent);
    border-color: var(--btn-accent);
    color: #12122A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }
}

.footer__link:focus-visible {
  outline: 2px solid var(--color-accent-3);
  outline-offset: 3px;
}

.footer__copy {
  font-size: var(--font-size-small);
  color: rgba(250, 250, 248, 0.4);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed rgba(250, 250, 248, 0.15);
}

/* ===========================
   9. Animations
   =========================== */
@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes memphis-float {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  25% { transform: translateY(-12px) rotate(calc(var(--r, 0deg) + 5deg)); }
  50% { transform: translateY(6px) rotate(calc(var(--r, 0deg) - 3deg)); }
  75% { transform: translateY(-8px) rotate(calc(var(--r, 0deg) + 2deg)); }
}


@keyframes scroll-hint-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===========================
   10. Scroll-Driven Animations (Progressive Enhancement)
   =========================== */
@supports (animation-timeline: view()) {
  .timeline__item {
    opacity: 0;
    transform: translateY(30px);
    animation: reveal-up 0.6s ease forwards;
    animation-timeline: view();
    animation-range: entry 10% entry 40%;
  }

  .about__content {
    opacity: 0;
    transform: translateY(20px);
    animation: reveal-up 0.6s ease forwards;
    animation-timeline: view();
    animation-range: entry 10% entry 35%;
  }

  .hero__scroll-hint {
    animation: scroll-hint-bounce 2s ease-in-out infinite, scroll-hint-fade linear forwards;
    animation-timeline: auto, scroll();
    animation-range: normal, 0% 15%;
  }
}

@keyframes scroll-hint-fade {
  from { opacity: 0.5; }
  to { opacity: 0; pointer-events: none; }
}

/* ===========================
   11. Reduced Motion
   =========================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===========================
   11b. Rave Mode (Neon Dark Theme)
   =========================== */
html.rave-mode {
  --color-bg: #1A1A2E;
  --color-text: #FAF9F6;
  --color-text-muted: #9CA3AF;
  --color-surface: #2A2A4E;
  --color-border: #3A3A5E;
  --color-accent-1: #FF4080;
  --color-accent-2: #7B7EFF;
  --color-accent-3: #FFD700;
  --color-accent-4: #00FFD0;
  --color-accent-5: #FF8C5A;
  --color-surface-glass: rgba(255, 255, 255, 0.06);
}

/* Memphis shapes: boost opacity + neon glow */
html.rave-mode .memphis__shape {
  opacity: 0.45;
  filter: drop-shadow(0 0 6px currentColor);
}

/* Shapes with hardcoded #1A1A2E strokes → invert to light */
html.rave-mode .memphis__shape--23 line,
html.rave-mode .memphis__shape--24 line,
html.rave-mode .memphis__shape--27 line {
  stroke: var(--color-text);
}

/* Hero accent bar: neon glow */
html.rave-mode .hero__accent {
  height: 5px;
  filter: drop-shadow(0 0 8px var(--color-accent-1));
}

/* Hero CTA primary hover */
html.rave-mode .hero__cta:first-child:hover {
  background: #FF1A53;
  box-shadow: 0 4px 16px rgba(255, 64, 128, 0.5);
}

/* Hero CTA secondary hover */
html.rave-mode .hero__cta--secondary:hover {
  box-shadow: 0 4px 16px rgba(123, 126, 255, 0.5);
}

/* Timeline vertical line: more visible */
html.rave-mode .timeline::before {
  opacity: 0.5;
}

/* Timeline cards: darker shadow */
html.rave-mode .timeline__content {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

html.rave-mode .timeline__content:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4),
              0 0 12px rgba(123, 126, 255, 0.15);
}

/* Timeline stickers: boost opacity */
html.rave-mode .timeline__content::after {
  opacity: 0.35;
}

html.rave-mode .timeline__content:hover::after {
  opacity: 0.55;
}

/* Timeline date badges: neon glow */
html.rave-mode .timeline__date {
  box-shadow: 0 0 8px currentColor;
}

/* Timeline diamond markers: neon glow */
html.rave-mode .timeline__marker {
  box-shadow: 0 0 8px var(--accent, var(--color-accent-1));
}

/* Footer: keep dark (var(--color-text) becomes light in rave) */
html.rave-mode .footer {
  background: #12122A;
  color: #FAF9F6;
}

/* Footer links: override color, keep accent borders in rave */
html.rave-mode .footer__link {
  color: #FAF9F6;
  border-color: var(--btn-accent, rgba(250, 250, 248, 0.4));
}

/* Footer section title: prevent dark-on-dark */
html.rave-mode .section-title--light {
  color: var(--color-text);
}

/* Footer zigzag: more visible */
html.rave-mode .footer__zigzag svg {
  opacity: 0.7;
}

/* Rave mode: adjust glass for dark background */
html.rave-mode .rave-toggle,
html.rave-mode .lang-toggle {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 50%),
    var(--color-surface-glass);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Rave toggle in rave mode: golden accent */
html.rave-mode .rave-toggle {
  color: var(--color-accent-3);
}

html.rave-mode .rave-toggle:hover {
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 6px 24px rgba(255, 215, 0, 0.25),
    0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Lang toggle hover in rave mode */
html.rave-mode .lang-toggle:hover {
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 6px 24px rgba(255, 255, 255, 0.1),
    0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Scroll hint: neon glow */
html.rave-mode .hero__scroll-hint {
  opacity: 0.7;
  filter: drop-shadow(0 0 6px var(--color-accent-4));
}

/* ===========================
   12. Responsive
   =========================== */
@media (max-width: 768px) {
  .timeline::before {
    left: 1rem;
  }

  .timeline__item,
  .timeline__item:nth-child(odd),
  .timeline__item:nth-child(even) {
    width: 100%;
    margin-left: 0;
    padding-left: 3rem;
    padding-right: 0;
    text-align: left;
  }

  .timeline__marker,
  .timeline__item:nth-child(odd) .timeline__marker,
  .timeline__item:nth-child(even) .timeline__marker {
    left: 0.25rem;
    right: auto;
    width: 20px;
    height: 20px;
  }

  .timeline__item:nth-child(odd) .timeline__content {
    border-right: none;
    border-left: 4px solid var(--accent, var(--color-accent-1));
    padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  }

  .timeline__item:nth-child(odd) .timeline__content:hover {
    transform: translateY(-3px) rotate(-0.5deg);
  }

  /* Stickers always top-right on mobile (single-column layout) */
  .timeline__item:nth-child(odd) .timeline__content::after,
  .timeline__item:nth-child(even) .timeline__content::after {
    top: -6px;
    right: -6px;
    left: auto;
    width: 24px;
    height: 24px;
  }

  .memphis__shape {
    opacity: 0.12;
  }

  .memphis__shape--4,
  .memphis__shape--10,
  .memphis__shape--13,
  .memphis__shape--16,
  .memphis__shape--18,
  .memphis__shape--22,
  .memphis__shape--24,
  .memphis__shape--26,
  .memphis__shape--27,
  .memphis__shape--28 {
    display: none;
  }

  .hero {
    min-height: 80vh;
    padding: 4rem 1.5rem 2rem;
  }

  .site-controls {
    top: 1rem;
    right: 1rem;
  }

  html.rave-mode .memphis__shape {
    opacity: 0.3;
  }
}

@media (max-width: 480px) {
  .hero__links {
    flex-direction: column;
    align-items: center;
  }

  .hero__cta {
    width: 100%;
    max-width: 240px;
    text-align: center;
  }

  .footer__memphis--3 {
    display: none;
  }

  .footer__links {
    flex-direction: column;
    align-items: center;
  }

  .footer__link {
    width: 100%;
    max-width: 200px;
    text-align: center;
  }
}
