/* ==========================================================================
   PORTFOLIO — css/style.css
   Salaheddine Lafnouche | UX/UI Designer
   Constitution v1.0.0 | Mobile-first | WCAG 2.2 AA
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. THEME TOKENS — Light & Dark
   -------------------------------------------------------------------------- */

:root {
  /* Board card note palette */
  --note-yellow: #FFF9C4;
  --note-yellow-edge: #C8A800;
  --note-peach: #FFE4CC;
  --note-peach-edge: #C07030;
  --note-sage: #DCEDC8;
  --note-sage-edge: #5E9E30;
  --note-sky: #D0E8F8;
  --note-sky-edge: #2880C0;
  --note-rose: #FAD9DC;
  --note-rose-edge: #C04858;
  /* Colours — Light Theme */
  --bg: #FAFAF8;
  --bg-elevated: #FFFFFF;
  --text: #1A1A1A;
  --text-secondary: #5C5C5C;
  --text-muted: #767676;
  --accent: #A54228;
  --accent-hover: #8C3721;
  --accent-light: rgba(165, 66, 40, 0.1);
  --surface: #FFFFFF;
  --surface-raised: #F5F3EF;
  --border: #E2DDD6;
  --border-light: #EDE9E3;

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Layout */
  --container-max: 1160px;
  --nav-height: 68px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
  --bg: #0A0A0A;
  /* Board card note palette — dark */
  --note-yellow: #252200;
  --note-yellow-edge: #605400;
  --note-peach: #281800;
  --note-peach-edge: #704018;
  --note-sage: #0A1A04;
  --note-sage-edge: #284C10;
  --note-sky: #041420;
  --note-sky-edge: #104870;
  --note-rose: #1E0608;
  --note-rose-edge: #581828;
  --bg-elevated: #141414;
  --text: #F2E9DA;
  --text-secondary: #C8BFB4;
  --text-muted: #B0A89A;
  --accent: #BF5439;
  --accent-hover: #D46F56;
  --accent-light: rgba(191, 84, 57, 0.15);
  --surface: #141414;
  --surface-raised: #1E1E1E;
  --border: #2A2A2A;
  --border-light: #222222;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* --------------------------------------------------------------------------
   2. RESET
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 1.1vw, 1.0625rem);
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  transition: background-color var(--transition-base), color var(--transition-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
video,
picture {
  display: block;
  max-width: 100%;
  height: auto;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* --------------------------------------------------------------------------
   3. ACCESSIBILITY
   -------------------------------------------------------------------------- */

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  z-index: 9999;
  padding: var(--space-sm) var(--space-md);
  background: var(--accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-md);
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus visible — keyboard only */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) {
  outline: none;
}

/* 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;
  }
}

/* --------------------------------------------------------------------------
   4. LAYOUT
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.section {
  padding-block: var(--space-3xl);
}

@media (min-width: 768px) {
  .section {
    padding-block: var(--space-4xl);
  }

  .container {
    padding-inline: var(--space-2xl);
  }
}

/* --------------------------------------------------------------------------
   5. TYPOGRAPHY
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  line-height: 1.15;
  color: var(--text);
  font-weight: 700;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

h4 {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
}

p {
  color: var(--text-secondary);
  font-size: clamp(0.9375rem, 1.1vw, 1rem);
  line-height: 1.75;
  max-width: 68ch;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
  max-width: none;
}

.section-header {
  margin-bottom: var(--space-2xl);
}

.section-title {
  margin-bottom: var(--space-md);
}

.section-desc {
  max-width: 56ch;
}

/* --------------------------------------------------------------------------
   6. NAVIGATION
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

body.is-scrolled .site-header {
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

@media (min-width: 768px) {
  .nav {
    padding-inline: var(--space-2xl);
  }
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.nav-logo:hover {
  color: var(--accent-hover);
}

/* Desktop nav links */
.nav-links {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: var(--space-lg) var(--space-xl) var(--space-xl);
  gap: var(--space-sm);
  z-index: 99;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

@media (min-width: 768px) {
  .nav-links {
    flex-direction: row;
    position: static;
    background: transparent;
    border-bottom: none;
    padding: 0;
    gap: var(--space-xl);
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
  padding-block: var(--space-xs);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
}

.nav-link:hover {
  color: var(--text);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--text);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--surface-raised);
  color: var(--text);
}


/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: background-color var(--transition-fast);
  padding: var(--space-sm);
}

.hamburger:hover {
  background: var(--surface-raised);
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: var(--radius-full);
  transition: transform var(--transition-base), opacity var(--transition-fast);
}

@media (min-width: 768px) {
  .hamburger {
    display: none;
  }
}

/* Mobile nav open state */
body.nav-open {
  overflow: hidden;
}
.nav-open .nav-links {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-open .nav-link {
  font-size: 1.1rem;
  padding-block: var(--space-sm);
}

.nav-open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   7. BUTTONS
   -------------------------------------------------------------------------- */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 2px solid var(--accent);
  transition: background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  min-height: 44px;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-primary.btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  transition: border-color var(--transition-fast), color var(--transition-fast);
  min-height: 44px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-secondary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
  z-index: -1;
}

.btn-secondary:hover {
  border-color: var(--accent);
}

.btn-secondary:hover::before {
  transform: scaleX(1);
}

/* --------------------------------------------------------------------------
   8. HERO SECTION (index.html) - DARK MYSTICAL
   -------------------------------------------------------------------------- */

.hero-mystical {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #1a1a1a;
  /* Pull up behind the header */
  margin-top: calc(-1 * var(--nav-height));
  padding-top: var(--nav-height);
  background: #ffffff;
  /* Deep, almost black night sky */
}

.hero-bg-mystical {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

#particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
}

.mystical-glow {
  position: absolute;
  width: 60vw;
  height: 60vw;
  min-width: 600px;
  min-height: 600px;
  background: radial-gradient(circle, rgba(106, 76, 147, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  animation: pulse-glow 8s ease-in-out infinite alternate;
}

.hero-mystical-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
}

.hero-mystical-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6a4c93;
  /* subtle mystical purple/silver */
  margin-bottom: var(--space-md);
  opacity: 0;
  transform: translateY(10px);
  animation: mystical-fade-up 1.5s ease 0.5s forwards;
}

.hero-mystical-name {
  font-family: 'Cinzel', var(--font-serif);
  font-size: clamp(2.5rem, 7vw, 6rem);
  font-weight: 500;
  line-height: 1.1;
  color: #1a1a1a;
  margin-bottom: var(--space-lg);
  opacity: 0;
  transform: translateY(20px);
  animation: mystical-fade-up 1.5s ease 0.8s forwards;
  position: relative;
  display: inline-block;
  text-shadow: 0 0 40px rgba(0, 0, 0, 0.05);
}

/* Shimmer hover effect on name */
.hero-mystical-name::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right,
      transparent 0%,
      rgba(0, 0, 0, 0.15) 50%,
      transparent 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  transition: opacity 0.3s;
  background-size: 200% 100%;
  background-position: -100% 0;
}

.hero-mystical-name:hover::before {
  opacity: 1;
  animation: shimmer-text 2s infinite linear;
}

.hero-mystical-sub {
  font-family: var(--font-sans);
  font-size: clamp(0.9rem, 1.5vw, 1.15rem);
  font-weight: 300;
  letter-spacing: 0.1em;
  color: rgba(0, 0, 0, 0.7);
  margin-bottom: var(--space-2xl);
  opacity: 0;
  transform: translateY(15px);
  animation: mystical-fade-up 1.5s ease 1.1s forwards;
}

.hero-mystical-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  transform: translateY(15px);
  animation: mystical-fade-up 1.5s ease 1.4s forwards;
}

.btn-ghost-mystical {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: transparent;
  color: #1a1a1a;
  font-family: var(--font-sans);
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 0, 0, 0.2);
  text-decoration: none;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
  min-height: 52px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-ghost-mystical::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.05);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
  z-index: -1;
}

.btn-ghost-mystical:hover {
  border-color: rgba(0, 0, 0, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-ghost-mystical:hover::before {
  transform: scaleX(1);
}

@media (max-width: 600px) {
  .hero-mystical {
    min-height: 520px;
  }

  .hero-mystical-sub {
    margin-bottom: var(--space-xl);
  }
}

.scroll-indicator {
  position: absolute;
  bottom: var(--space-md);
  left: 0; width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  animation: mystical-fade-up 1s ease 2s forwards;
  color: rgba(0, 0, 0, 0.4);
  transition: color var(--transition-fast);
  z-index: 2;
}

.scroll-indicator:hover {
  color: #000000;
}

.scroll-mouse {
  width: 22px;
  height: 38px;
  border: 1.5px solid currentColor;
  border-radius: 20px;
  position: relative;
}

.scroll-wheel {
  width: 3px;
  height: 6px;
  background: currentColor;
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%; transform: translateX(-50%);
  animation: scroll-bounce 2s infinite ease-in-out;
}

/* Animations */
@keyframes mystical-fade-up {
  0% {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(4px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes pulse-glow {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
  }
}

@keyframes shimmer-text {
  0% {
    background-position: -100% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@keyframes scroll-bounce {

  0%,
  100% {
    transform: translate(-50%, 0);
    opacity: 1;
  }

  50% {
    transform: translate(-50%, 10px);
    opacity: 0;
  }
}

/* Ensure header items remain readable when overlaying the white hero section */
body:has(.hero-mystical):not(.is-scrolled) .nav-link {
  color: #5C5C5C !important;
}
body:has(.hero-mystical):not(.is-scrolled) .nav-link:hover {
  color: var(--accent) !important;
}
body:has(.hero-mystical):not(.is-scrolled) .nav-link.active {
  color: #1a1a1a !important;
}
body:has(.hero-mystical):not(.is-scrolled) .nav-logo {
  color: var(--accent) !important;
}
body:has(.hero-mystical):not(.is-scrolled) .theme-toggle {
  color: #5C5C5C !important;
}
body:has(.hero-mystical):not(.is-scrolled) .theme-toggle:hover {
  background: rgba(0, 0, 0, 0.05) !important;
  color: #1a1a1a !important;
}
body:has(.hero-mystical):not(.is-scrolled) .hamburger {
  color: #5C5C5C !important;
}
body:has(.hero-mystical):not(.is-scrolled) .hamburger:hover {
  background: rgba(0, 0, 0, 0.05) !important;
  color: #1a1a1a !important;
}

@media (prefers-reduced-motion: reduce) {

  .hero-mystical-label,
  .hero-mystical-name,
  .hero-mystical-sub,
  .hero-mystical-actions,
  .scroll-indicator {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }

  .mystical-glow,
  .scroll-wheel,
  .hero-mystical-name:hover::before {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   11. CTA SECTION
   -------------------------------------------------------------------------- */

.cta-section {
  background: var(--surface-raised);
  border-top: 1px solid var(--border-light);
}

.cta-inner {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
}

.cta-title {
  margin-bottom: var(--space-md);
}

.cta-desc {
  margin-bottom: var(--space-xl);
  margin-inline: auto;
  max-width: 50ch;
}

.cta-actions {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.cta-email-fallback {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: none;
}

.cta-email-fallback strong {
  color: var(--text-secondary);
  user-select: all;
}

/* --------------------------------------------------------------------------
   12. PAGE HERO (projects.html, about.html)
   -------------------------------------------------------------------------- */

.page-hero {
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border-light);
}

.page-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
}

.page-intro {
  margin-top: var(--space-lg);
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  max-width: 60ch;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   13. PROJECTS PAGE
   -------------------------------------------------------------------------- */

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: box-shadow var(--transition-base), border-color var(--transition-base), transform 0.25s cubic-bezier(0.2, 0, 0.2, 1);
  will-change: transform;
}

.project-card:hover,
.project-card:focus-within {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
  transform: translateY(-4px);
}

.project-card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

@media (min-width: 800px) {
  .project-card-link {
    display: grid;
    align-items: stretch;
  }
  .project-card:nth-child(odd) .project-card-link {
    grid-template-columns: 6fr 4fr;
  }
  .project-card:nth-child(even) .project-card-link {
    grid-template-columns: 4fr 6fr;
  }
  .project-card:nth-child(even) .project-thumb {
    order: 2;
    border-right: none;
    border-left: 1px solid var(--border-light);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  }
  .project-card:nth-child(even) .project-info {
    order: 1;
  }
}

.project-thumb {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--surface-raised);
  position: relative;
  border-top-left-radius: calc(var(--radius-lg) - 1px);
  border-top-right-radius: calc(var(--radius-lg) - 1px);
}

@media (min-width: 800px) {
  .project-thumb {
    aspect-ratio: auto;
    border-right: 1px solid var(--border-light);
    border-top-left-radius: calc(var(--radius-lg) - 1px);
    border-bottom-left-radius: calc(var(--radius-lg) - 1px);
    border-top-right-radius: 0;
  }
  .project-card:hover,
  .project-card:focus-within {
    transform: none;
  }
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

/* Variant for off-aspect artwork — show the whole image, no crop.
   Set --thumb-bg per instance to match the artwork's own backdrop. */
.project-thumb--contain {
  background: var(--thumb-bg, #0a0a0a);
}

.project-thumb--contain img {
  object-fit: contain;
  object-position: center;
}

.project-card:hover .project-thumb img {
  transform: scale(1.03);
}

/* Fallback when image fails */
.project-thumb-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: var(--surface-raised);
}

.thumb-fallback .project-thumb-fallback {
  display: flex;
}

.thumb-fallback .project-thumb img {
  display: none;
}

.thumb-initials {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.project-info {
  padding: var(--space-xl);
}

.project-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-muted);
  opacity: 0.4;
  margin-bottom: var(--space-md);
  transition: color var(--transition-base), opacity var(--transition-base);
}

.project-card:hover .project-num {
  color: var(--accent);
  opacity: 1;
}

.project-meta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.project-role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.project-title {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  margin-bottom: var(--space-md);
  color: var(--text);
}

.project-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  max-width: none;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.project-cta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   14. TAGS
   -------------------------------------------------------------------------- */

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  background: var(--accent-light);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   15. ABOUT ME PAGE
   -------------------------------------------------------------------------- */

/* About Hero — Identity Section */
.about-hero {
  padding-block: var(--space-3xl) var(--space-xl);
  text-align: center;
  overflow: hidden;
}

.about-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

/* Photo with orbit rings */
.about-hero-photo {
  position: relative;
  width: 200px;
  height: 200px;
  margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
  .about-hero-photo {
    width: 240px;
    height: 240px;
  }
}

.about-hero-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center bottom;
  position: relative;
  z-index: 2;
  border: 1px solid var(--border);
  background: var(--surface-raised);
}

[data-theme="dark"] .about-hero-img {
  border: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 50%, transparent), 0 8px 32px rgba(0,0,0,0.3);
}

.photo-orbit-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-top-color: var(--accent);
  border-right-color: color-mix(in srgb, var(--accent) 40%, transparent);
  animation: orbit-spin 8s linear infinite;
  z-index: 1;
}

.photo-orbit-ring--delayed {
  inset: -22px;
  border-top-color: color-mix(in srgb, var(--accent) 30%, transparent);
  border-right-color: color-mix(in srgb, var(--accent) 15%, transparent);
  animation-duration: 14s;
  animation-direction: reverse;
}

@keyframes orbit-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Label + Name */
.about-hero-label {
  margin-bottom: var(--space-xs);
}

.about-hero-name {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

/* Role Ribbon — typewriter effect */
.role-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 1.4vw, 1.05rem);
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  min-height: 1.6em;
  margin-bottom: var(--space-lg);
}

.role-ribbon-bracket {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1em;
  opacity: 0.6;
}

.role-ribbon-text {
  color: var(--text);
  font-weight: 500;
  transition: opacity 0.15s ease;
}

.role-ribbon-cursor {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  background: var(--accent);
  margin-left: 1px;
  animation: cursor-blink 0.8s steps(2) infinite;
  vertical-align: text-bottom;
}

@keyframes cursor-blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* Hero Facts */
.about-hero-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md) var(--space-xl);
  margin-top: var(--space-sm);
}

.hero-fact {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.hero-fact svg {
  color: var(--accent);
  flex-shrink: 0;
}

/* Narrative — full width, no sidebar */
.narrative-inner {
  display: block;
  max-width: 720px;
  margin-inline: auto;
}

.narrative-heading {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  margin-bottom: var(--space-xl);
}

.narrative-text p {
  margin-bottom: var(--space-lg);
}

.narrative-text p:last-child {
  margin-bottom: 0;
}

/* Reduced motion — freeze orbit rings */
@media (prefers-reduced-motion: reduce) {
  .photo-orbit-ring {
    animation: none;
  }

  .role-ribbon-cursor {
    animation: none;
    opacity: 1;
  }
}

.quick-facts {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.quick-fact {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding-block: var(--space-sm);
  border-bottom: 1px solid var(--border-light);
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quick-fact:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.fact-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Resume Dynamic Components
   -------------------------------------------------------------------------- */

/* Bento Card Glassmorphism */
.bento-card {
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.bento-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-light);
}

.bento-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-xl);
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.experience-entry {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border-light);
}

.experience-entry:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.experience-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: var(--space-sm);
}

.experience-period {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.experience-role {
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-sans);
  margin: 0;
}

.experience-org {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
  margin: 0;
}

.experience-link {
  display: inline-block;
  align-self: flex-start;
  margin-top: var(--space-sm);
}

.timeline-stat-highlight {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.resume-bullets {
  list-style-type: disc;
  padding-left: var(--space-xl);
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.resume-bullets li {
  margin-bottom: var(--space-xs);
}



.verified-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.6rem;
  padding: 2px 6px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  border-radius: var(--radius-full);
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}





/* Resume */
.resume-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.resume-download {
  flex-shrink: 0;
}

/* Bento Grid Layout */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .bento-col-span-2 { grid-column: span 2; }
  .bento-col-span-1 { grid-column: span 1; }
  .bento-row-span-2 { grid-row: span 2; }
}

/* --------------------------------------------------------------------------
   16. FOOTER
   -------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  border-top: 1px solid var(--border-light);
  padding-block: var(--space-4xl) var(--space-2xl);
  background: var(--bg-elevated);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -50%;
  left: 0;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-light) 0%, transparent 60%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.site-footer .container {
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-3xl);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-4xl);
  }
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  letter-spacing: -2px;
  margin-bottom: -10px;
}

.footer-bio {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 320px;
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  width: fit-content;
  margin-top: var(--space-sm);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: var(--radius-full);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.footer-nav-group {
  display: flex;
  flex-direction: column;
}

.footer-nav-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  margin-bottom: var(--space-lg);
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-nav-list a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  position: relative;
  transition: all var(--transition-base);
  width: fit-content;
}

.footer-nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background-color: var(--accent);
  transition: width var(--transition-base);
}

.footer-nav-list a:hover {
  color: var(--accent);
  transform: translateX(6px);
}

.footer-nav-list a:hover::after {
  width: 100%;
}

.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid color-mix(in srgb, var(--border-light) 50%, transparent);
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-lg);
  align-items: center;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.back-to-top { background: var(--accent); border: none; color: var(--bg); width: 40px; height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.back-to-top:hover {
  border-color: var(--accent);
  color: var(--bg-elevated);
  background: var(--accent);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 10px 20px rgba(165, 66, 40, 0.2);
}

.back-to-top svg {
  transition: transform 0.3s ease;
}

.back-to-top:hover svg {
  transform: translateY(-2px);
}

.footer-copy {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}/* --------------------------------------------------------------------------
   18. PRINT STYLES
   -------------------------------------------------------------------------- */

@media print {

  .site-header,
  .site-footer,
  .hamburger,
  .theme-toggle,
  .cta-section {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #666;
  }

  a[href^="mailto"]::after,
  a[href^="#"]::after {
    content: none;
  }
}

/* --------------------------------------------------------------------------
   19. PROCESS SECTION (Diagram Redesign)
   -------------------------------------------------------------------------- */
.process-diagram-section {
  padding-bottom: var(--space-2xl);
}

.process-diagram {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .process-diagram {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2xl) var(--space-lg);
  }
}

@media (min-width: 1200px) {
  .process-diagram {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
  }
}

.diagram-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px; /* More premium, soft shape */
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  margin-top: 40px; /* Space for the floating visual */
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

/* Removed horizontal scroll widths */

.diagram-step:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  border-color: var(--accent);
}

.diagram-header {
  display: block;
  margin-bottom: var(--space-sm);
  position: static;
}

.diagram-num {
  font-family: var(--font-mono);
  font-size: 4.5rem; /* Massive watermark style */
  font-weight: 800;
  color: var(--text);
  opacity: 0.04;
  line-height: 0.8;
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 0;
  pointer-events: none;
}

.diagram-visual {
  width: 70px;
  height: 70px;
  position: absolute;
  top: -35px; /* Break out of the top edge */
  right: 30px;
  z-index: 3;
  background: var(--bg);
  border: 2px solid var(--accent);
  border-radius: 50%; /* Perfect circle floating out */
  padding: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.diagram-visual svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.diagram-content {
  position: relative;
  z-index: 1; /* Sit above the giant number */
}

.diagram-content h3 {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text);
}

.diagram-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.diagram-evidence {
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
  position: relative;
  z-index: 1;
}

.evidence-desc {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-muted);
  margin: 0;
}

/* Timeline Connectors */
@media (max-width: 767px) {
  .process-diagram::before {
    content: '';
    position: absolute;
    top: 40px; /* Align with visual */
    bottom: 50px;
    right: 65px; /* Center of visual (right 30px + half width 35px) */
    left: auto;
    width: 2px;
    background: var(--accent);
    opacity: 0.2;
    z-index: 1;
    border-radius: 2px;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .process-diagram::before {
    display: none;
  }
  
  .diagram-step:nth-child(odd)::after {
    content: '➔';
    position: absolute;
    top: -12px;
    right: -25px;
    font-size: 1.2rem;
    color: var(--accent);
    background: var(--bg);
    padding: 0 4px;
    z-index: 2;
  }
}

@media (min-width: 1200px) {
  .process-diagram::before {
    content: '';
    position: absolute;
    top: 40px; /* Align exactly with margin-top of cards / center of visual */
    left: 0;
    width: 100%; /* Stretch across the full container */
    height: 2px;
    background: var(--accent);
    opacity: 0.2;
    z-index: 1;
    border-radius: 2px;
  }
  
  .diagram-step::after {
    content: '➔';
    position: absolute;
    top: -12px; /* Align with line */
    right: -25px; /* Between cards */
    font-size: 1.2rem;
    color: var(--accent);
    background: var(--bg); /* To clip the line behind */
    padding: 0 8px;
    z-index: 2;
  }
  
  .diagram-step:last-child::after {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   21. DEAD FEATURES COMPLETION
   -------------------------------------------------------------------------- */

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background-color: var(--accent);
  z-index: 9999;
  transform-origin: left;
}

/* Theme switching transition */
html.theme-switching,
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
  transition: background-color 350ms ease, color 350ms ease, border-color 350ms ease, fill 350ms ease !important;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress {
    display: none;
  }
  
  html.theme-switching,
  html.theme-switching *,
  html.theme-switching *::before,
  html.theme-switching *::after {
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   22. PROCESS EVIDENCE CARDS
   -------------------------------------------------------------------------- */
.process-evidence {
  margin-top: var(--space-lg);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .process-evidence {
    grid-template-columns: 1fr 1fr;
  }
}

.evidence-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.evidence-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--accent);
}

.evidence-title {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.evidence-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  flex-grow: 1;
}

.evidence-card .tag {
  align-self: flex-start;
  margin-top: auto;
}
.section { position: relative; }
.section-watermark { position: absolute; top: -10px; left: 0; font-family: var(--font-serif); font-size: clamp(100px, 15vw, 200px); color: var(--text); opacity: 0.04; pointer-events: none; z-index: 0; line-height: 1; user-select: none; overflow: hidden; }

.nav-backdrop { position: fixed; inset: 0; top: var(--nav-height); background: rgba(0,0,0,0.4); z-index: 98; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }

.email-copy { background: transparent; border: none; font-family: inherit; font-size: inherit; font-weight: 700; color: var(--text); cursor: pointer; padding: 2px 6px; border-radius: 4px; transition: background-color 0.2s, color 0.2s; }
.email-copy:hover, .email-copy:focus-visible { background: var(--surface-raised); color: var(--accent); }
.project-thumb { position: relative; }
.project-thumb.is-loading::before { content: ""; position: absolute; inset: 0; background: var(--surface-raised); animation: pulse-skeleton 1.5s infinite; z-index: 1; }
@keyframes pulse-skeleton { 0% { background: var(--surface-raised); } 50% { background: color-mix(in srgb, var(--surface-raised) 95%, var(--accent)); } 100% { background: var(--surface-raised); } }
.project-thumb img { position: relative; z-index: 2; opacity: 0; transition: opacity 0.3s; }
.project-thumb img.is-loaded { opacity: 1; }
.theme-toggle { position: relative; overflow: hidden; }
.theme-toggle svg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); transition: opacity 0.3s ease, transform 0.3s ease; display: block !important; }
.icon-sun, .icon-moon { opacity: 0; }
[data-theme="light"] .icon-moon { opacity: 1; transform: translate(-50%, -50%) rotate(0deg); }
[data-theme="light"] .icon-sun { opacity: 0; transform: translate(-50%, -50%) rotate(-180deg); }
[data-theme="dark"] .icon-sun { opacity: 1; transform: translate(-50%, -50%) rotate(0deg); }
[data-theme="dark"] .icon-moon { opacity: 0; transform: translate(-50%, -50%) rotate(180deg); }

.fade-up:not(.is-revealed), [data-reveal]:not(.is-revealed) { opacity: 0; transform: translateY(16px); pointer-events: none; }
.fade-up.is-revealed, [data-reveal].is-revealed { animation: reveal-up 0.6s ease-out both; }
@keyframes reveal-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
[data-reveal-stagger] > :nth-child(1) { animation-delay: 0.08s; }
[data-reveal-stagger] > :nth-child(2) { animation-delay: 0.16s; }
[data-reveal-stagger] > :nth-child(3) { animation-delay: 0.24s; }
[data-reveal-stagger] > :nth-child(4) { animation-delay: 0.32s; }
[data-reveal-stagger] > :nth-child(5) { animation-delay: 0.40s; }
[data-reveal-stagger] > :nth-child(6) { animation-delay: 0.48s; }
.lang-bar-fill { transform: scaleX(0); transform-origin: left; transition: transform 1.2s ease-out; height: 100%; background: var(--accent); border-radius: 99px; }
.is-revealed .lang-bar-fill, .lang-item.is-revealed .lang-bar-fill { transform: scaleX(var(--target-fill, 1)); }
@keyframes breathe { 0% { transform: scale(1); } 50% { transform: scale(1.015); } 100% { transform: scale(1); } }
.hero-mystical-inner, .about-hero-photo { animation: breathe 6s infinite ease-in-out; }
.theme-ripple { position: fixed; inset: 0; z-index: 9999; pointer-events: none; transition: clip-path 0.6s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .fade-up, [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero-mystical-inner, .about-hero-photo { animation: none; }
  .theme-ripple { display: none; }
}

.language-fill { width: 100%; transform: scaleX(0); transform-origin: left; transition: transform 1.2s ease-out; }
.is-revealed .language-fill, .is-visible .language-fill { transform: scaleX(var(--target-fill, 1)); }
@media (prefers-reduced-motion: reduce) { .language-fill { transform: scaleX(var(--target-fill, 1)); transition: none; } }





