/* ============================================================
   MAHDI KHALIL PORTFOLIO — DESIGN SYSTEM
   Marketing Executive · Brand Identity Specialist · Bahrain

   Stack: Pure HTML/CSS/JS · GitHub Pages
   Palette: Dark editorial with warm muted gold accent
   Fonts: Playfair Display (display) · Inter (body)
   ============================================================ */

/* ============================================================
   1. DESIGN TOKENS (CSS Custom Properties)
   ============================================================ */

/* DARK MODE (default) */
:root,
[data-theme="dark"] {
  --color-bg:           #0A0A0A;
  --color-surface-1:    #111111;
  --color-surface-2:    #1A1A1A;
  --color-surface-3:    #222222;
  --color-text-primary: #F5F2ED;
  --color-text-sec:     #9A948C;
  --color-text-muted:   #5A5550;
  --color-accent:       #C8A96E;
  --color-accent-hover: #D4B97E;
  --color-accent-dim:   rgba(200, 169, 110, 0.10);
  --color-border:       rgba(255, 255, 255, 0.07);
  --color-border-mid:   rgba(255, 255, 255, 0.11);
  --color-overlay:      rgba(10, 10, 10, 0.92);
  --logo-filter:        brightness(0) invert(1);
}

/* LIGHT MODE */
[data-theme="light"] {
  --color-bg:           #F5F2ED;
  --color-surface-1:    #ECEAE4;
  --color-surface-2:    #E2DFD8;
  --color-surface-3:    #D5D2CB;
  --color-text-primary: #1A1816;
  --color-text-sec:     #5A5550;
  --color-text-muted:   #9A948C;
  --color-accent:       #B8913E;
  --color-accent-hover: #C8A04E;
  --color-accent-dim:   rgba(184, 145, 62, 0.10);
  --color-border:       rgba(0, 0, 0, 0.08);
  --color-border-mid:   rgba(0, 0, 0, 0.14);
  --color-overlay:      rgba(245, 242, 237, 0.94);
  --logo-filter:        brightness(0);
}

:root {
  /* Typography */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Type Scale (fluid) */
  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg:   1.125rem;   /* 18px */
  --text-xl:   1.25rem;    /* 20px */
  --text-2xl:  1.5rem;     /* 24px */
  --text-3xl:  2rem;       /* 32px */
  --text-4xl:  2.5rem;     /* 40px */
  --text-5xl:  3.5rem;     /* 56px */

  /* Spacing (8px grid) */
  --sp-1:  0.5rem;   /* 8px  */
  --sp-2:  1rem;     /* 16px */
  --sp-3:  1.5rem;   /* 24px */
  --sp-4:  2rem;     /* 32px */
  --sp-6:  3rem;     /* 48px */
  --sp-8:  4rem;     /* 64px */
  --sp-12: 6rem;     /* 96px */
  --sp-16: 8rem;     /* 128px */

  /* Transitions */
  --ease-smooth:   cubic-bezier(0.25, 0.10, 0.25, 1.00);
  --ease-out:      cubic-bezier(0.00, 0.00, 0.20, 1.00);
  --ease-in-out:   cubic-bezier(0.40, 0.00, 0.20, 1.00);
  --ease-bounce:   cubic-bezier(0.34, 1.56, 0.64, 1.00);
  --dur-fast:  180ms;
  --dur-base:  360ms;
  --dur-slow:  600ms;
  --dur-slower: 900ms;

  /* Layout */
  --container-max: 1200px;
  --container-pad: clamp(1.5rem, 5vw, 4.5rem);
  --section-pad:   clamp(5rem, 10vw, 8rem);
  --nav-h:         72px;

  /* Radius */
  --r-sm:  6px;
  --r-md:  12px;
  --r-lg:  20px;
  --r-xl:  32px;
  --r-2xl: 48px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: none; /* Custom cursor handles it */
}

@media (hover: none) {
  body { cursor: auto; }
}

img,
video {
  display: block;
  max-width: 100%;
}

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

button {
  font-family: var(--font-body);
  background: none;
  border: none;
  cursor: none;
}

@media (hover: none) {
  button { cursor: pointer; }
}

ul,
ol {
  list-style: none;
}

/* Text selection */
::selection {
  background-color: var(--color-accent);
  color: var(--color-bg);
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--color-surface-3);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* 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;
  }
  .cursor,
  .cursor-ring {
    display: none !important;
  }
  body { cursor: auto !important; }
  button { cursor: pointer !important; }
}

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */

/* Eyebrow label */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* Section headings */
.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  margin-top: var(--sp-2);
}

.section-heading em {
  font-style: italic;
  color: var(--color-accent);
}

.subheadline {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 300;
  color: var(--color-text-sec);
  line-height: 1.7;
  max-width: 560px;
  margin-top: var(--sp-3);
}

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

/* ============================================================
   4. LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: var(--section-pad);
}

/* 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;
}

/* ============================================================
   5. BUTTONS
   ============================================================ */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 0.9rem 1.9rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  transition:
    background-color var(--dur-fast) var(--ease-smooth),
    border-color var(--dur-fast) var(--ease-smooth),
    color var(--dur-fast) var(--ease-smooth),
    transform var(--dur-fast) var(--ease-smooth),
    box-shadow var(--dur-fast) var(--ease-smooth);
  white-space: nowrap;
  will-change: transform;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-bg);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200, 169, 110, 0.28);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--color-border-mid);
  color: var(--color-text-primary);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background-color: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* ============================================================
   6. CINEMATIC SPLIT LOADER
   ============================================================ */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  pointer-events: all;
}

/* Two curtain panels */
.loader-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background-color: #0A0A0A;
  display: flex;
  align-items: center;
  will-change: transform;
  transition: none; /* GSAP handles transitions */
}

.loader-panel-left  { left: 0;   justify-content: flex-end;  padding-right: 0.04em; }
.loader-panel-right { right: 0;  justify-content: flex-start; padding-left: 0.04em; }

/* Name split across the two panels */
.loader-name-left,
.loader-name-right {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 9vw, 8.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #F5F2ED;
  white-space: nowrap;
  user-select: none;
}

.loader-name-right {
  color: var(--color-accent);
  font-style: italic;
}

/* Gold seam line in the center */
.loader-seam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--color-accent) 30%,
    var(--color-accent) 70%,
    transparent 100%
  );
  transform: translateX(-50%);
  opacity: 0.5;
}

/* Scroll hint at bottom */
.loader-hint {
  position: absolute;
  bottom: var(--sp-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  z-index: 10;
  animation: loader-hint-pulse 2s ease-in-out infinite;
}

.loader-hint-text {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.loader-hint-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
  transform-origin: top;
}

@keyframes loader-hint-pulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

/* Body locked while loader is visible */
body:not(.loaded) {
  overflow: hidden;
}

/* ============================================================
   6b. THEME TOGGLE BUTTON
   ============================================================ */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--color-border-mid);
  background: transparent;
  color: var(--color-text-sec);
  cursor: pointer;
  transition:
    color var(--dur-fast),
    border-color var(--dur-fast),
    background-color var(--dur-fast),
    transform var(--dur-fast);
}

.theme-toggle:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  transform: rotate(15deg);
}

/* Show/hide sun vs moon based on theme */
[data-theme="dark"]  .icon-moon { display: none; }
[data-theme="dark"]  .icon-sun  { display: block; }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* Light mode: invert grain */
[data-theme="light"] .hero-grain {
  opacity: 0.2;
  filter: invert(1);
}

/* Light mode: marquee bg overlay */
[data-theme="light"] .marquee-wrapper::before {
  background: linear-gradient(to right, var(--color-surface-1), transparent);
}
[data-theme="light"] .marquee-wrapper::after {
  background: linear-gradient(to left, var(--color-surface-1), transparent);
}

/* Light mode: logo filter */
[data-theme="light"] .company-logo-item img {
  filter: var(--logo-filter);
}

/* Light mode: contact bg text */
[data-theme="light"] .contact-bg-text {
  color: rgba(184, 145, 62, 0.04);
}

/* ============================================================
   7. CUSTOM CURSOR
   ============================================================ */
.cursor,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9998;
  will-change: transform;
  opacity: 0;
  border-radius: 50%;
  transition: opacity var(--dur-fast);
}

.cursor {
  width: 12px;
  height: 12px;
  background-color: var(--color-accent);
  mix-blend-mode: difference;
}

.cursor-ring {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(200, 169, 110, 0.35);
}

@media (hover: none), (pointer: coarse) {
  .cursor,
  .cursor-ring {
    display: none;
  }
}

/* Hide cursor while loader is active */
body:not(.loaded) .cursor,
body:not(.loaded) .cursor-ring {
  display: none;
}

/* ============================================================
   8. NAVIGATION
   ============================================================ */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition:
    background-color var(--dur-slow) var(--ease-smooth),
    border-color var(--dur-slow) var(--ease-smooth),
    backdrop-filter var(--dur-slow);
}

#nav.nav-scrolled {
  background-color: var(--color-overlay);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding-inline: var(--container-pad);
  max-width: var(--container-max);
  margin-inline: auto;
}

/* Logo */
.nav-logo {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.03em;
  text-decoration: none;
  transition: color var(--dur-fast);
}

.nav-logo span {
  color: var(--color-accent);
}

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

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.nav-link {
  position: relative;
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-sec);
  text-decoration: none;
  transition: color var(--dur-fast);
  padding: 0.35rem 0.6rem;
  letter-spacing: 0.02em;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-accent);
  transition: width var(--dur-base) var(--ease-out);
}

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

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

/* Nav CTA button */
.nav-cta {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
  text-decoration: none;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--color-border-mid);
  border-radius: var(--r-md);
  transition:
    border-color var(--dur-fast),
    color var(--dur-fast),
    background-color var(--dur-fast);
}

.nav-cta:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 32px;
  height: 32px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 101;
}

.hamburger-bar {
  display: block;
  width: 22px;
  height: 1.5px;
  background-color: var(--color-text-primary);
  border-radius: 1px;
  transform-origin: center;
  transition:
    transform var(--dur-base) var(--ease-smooth),
    opacity var(--dur-base);
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background-color: var(--color-bg);
  z-index: 99;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--sp-8);
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-in-out);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
}

.mobile-nav-link {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 6vw, 2.5rem);
  font-weight: 400;
  color: var(--color-text-sec);
  text-decoration: none;
  transition: color var(--dur-fast);
}

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

.mobile-nav-cv {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  padding: 0.6rem 1.5rem;
  border-radius: var(--r-md);
  margin-top: var(--sp-4);
}

/* Nav open state */
body.nav-open .mobile-nav {
  display: flex;
  transform: translateX(0);
}

body.nav-open .hamburger-bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
body.nav-open .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

/* ============================================================
   9. HERO SECTION
   ============================================================ */
#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-bg);
  padding-top: var(--nav-h);
}

/* Hero background */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-orb-1 {
  position: absolute;
  top: -10%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 169, 110, 0.08) 0%, transparent 65%);
  filter: blur(60px);
  animation: orb-drift-1 22s ease-in-out infinite alternate;
  will-change: transform;
}

.hero-orb-2 {
  position: absolute;
  bottom: -15%;
  left: -5%;
  width: 45vw;
  height: 45vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 169, 110, 0.05) 0%, transparent 60%);
  filter: blur(80px);
  animation: orb-drift-2 28s ease-in-out infinite alternate;
  will-change: transform;
}

.hero-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  opacity: 0.6;
}

@keyframes orb-drift-1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, 20px) scale(1.05); }
}
@keyframes orb-drift-2 {
  from { transform: translate(0, 0) scale(1.05); }
  to   { transform: translate(-20px, -30px) scale(1); }
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: var(--sp-12);
  padding-bottom: var(--sp-8);
}

.hero-greeting {
  margin-bottom: var(--sp-3);
  color: var(--color-text-sec);
  letter-spacing: 0.2em;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 8rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--color-text-primary);
  margin-bottom: var(--sp-4);
}

.hero-headline .line {
  display: block;
  overflow: hidden;
}

.hero-headline .accent-word {
  color: var(--color-accent);
  font-style: italic;
}

.hero-title {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 300;
  color: var(--color-text-sec);
  letter-spacing: 0.02em;
  margin-bottom: var(--sp-4);
}

.hero-description {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 300;
  color: var(--color-text-muted);
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: var(--sp-8);
}

/* Hero CTAs */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-12);
}

/* Hero stats */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--color-border);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hero-stat .number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1;
  letter-spacing: -0.03em;
}

.hero-stat .label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: var(--sp-6);
  right: var(--sp-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  color: var(--color-text-muted);
}

/* Hide scroll indicator on narrow viewports to avoid text overlap */
@media (max-width: 900px) {
  .hero-scroll-indicator {
    display: none;
  }
}

.scroll-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; transform: scaleY(0.6); }
  50%       { opacity: 1;   transform: scaleY(1); }
}

/* ============================================================
   10. ABOUT SECTION
   ============================================================ */
#about {
  padding-block: var(--section-pad);
  background-color: var(--color-bg);
}

.about-header {
  margin-bottom: var(--sp-12);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 7rem);
  align-items: start;
}

/* Text column */
.about-text {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.about-intro {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
  font-style: italic;
  color: var(--color-text-primary);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.about-body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 300;
  color: var(--color-text-sec);
  line-height: 1.8;
  max-width: 540px;
}

.about-disciplines {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  margin-top: var(--sp-2);
}

.discipline-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1.1rem;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  transition:
    border-color var(--dur-fast),
    color var(--dur-fast),
    background-color var(--dur-fast);
}

.discipline-tag:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background-color: var(--color-accent-dim);
}

/* Visual column */
.about-visual {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}

.about-profile-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
}

.about-profile {
  width: 85%;
  max-width: 320px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r-xl);
  filter: grayscale(20%) brightness(0.92);
  transition: filter var(--dur-slow) var(--ease-smooth);
  display: block;
  margin: 0 auto var(--sp-4);
}

.about-profile-wrapper:hover .about-profile {
  filter: grayscale(0%) brightness(1);
}

.profile-accent-border {
  position: absolute;
  inset: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  pointer-events: none;
}

/* Career timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.timeline-item {
  display: flex;
  gap: var(--sp-3);
  position: relative;
}

.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 20px;
  width: 2px;
  height: calc(100% + var(--sp-4));
  background: linear-gradient(to bottom, var(--color-accent), var(--color-border-mid), transparent);
  border-radius: 1px;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background-color: var(--color-surface-2);
  flex-shrink: 0;
  margin-top: 3px;
  transition:
    border-color var(--dur-base),
    background-color var(--dur-base);
}

.timeline-item.active .timeline-dot {
  border-color: var(--color-accent);
  background-color: var(--color-accent-dim);
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.timeline-content .role {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
}

.timeline-content .company {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-sec);
}

.timeline-content .year {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

/* ============================================================
   11. COMPANIES / EXPERIENCE SECTION
   ============================================================ */
#experience {
  padding-block: var(--section-pad);
  background-color: var(--color-surface-1);
  overflow: hidden;
}

.experience-header {
  margin-bottom: var(--sp-12);
}

/* Marquee */
.marquee-wrapper {
  position: relative;
  overflow: hidden;
  padding-block: var(--sp-3);
}

.marquee-wrapper::before,
.marquee-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 15%;
  z-index: 2;
  pointer-events: none;
}

.marquee-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--color-surface-1), transparent);
}

.marquee-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--color-surface-1), transparent);
}

.marquee-track {
  display: flex;
  gap: var(--sp-3);
  width: fit-content;
  animation: marquee-scroll 35s linear infinite;
  will-change: transform;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.company-logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  height: 96px;
  min-width: 160px;
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  background-color: var(--color-surface-1);
  flex-shrink: 0;
  transition:
    border-color var(--dur-base),
    background-color var(--dur-base),
    transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base);
}

.company-logo-item:hover {
  border-color: var(--color-border-mid);
  background-color: var(--color-surface-2);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.company-logo-item img {
  height: 46px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.45;
  transition: opacity var(--dur-base), filter var(--dur-base);
}

[data-theme="light"] .company-logo-item img {
  filter: brightness(0);
  opacity: 0.5;
}

.company-logo-item:hover img {
  opacity: 0.9;
}

.company-name-text {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  transition: color var(--dur-fast);
}

.company-logo-item:hover .company-name-text {
  color: var(--color-text-sec);
}

.logo-text-fallback {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
}

/* ============================================================
   12. PORTFOLIO / WORK SECTION
   ============================================================ */
#work {
  padding-block: var(--section-pad);
  background-color: var(--color-bg);
}

.work-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-6);
  flex-wrap: wrap;
  margin-bottom: var(--sp-8);
}

/* Filter tabs */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.2rem;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  background: transparent;
  transition:
    border-color var(--dur-fast),
    color var(--dur-fast),
    background-color var(--dur-fast);
}

.filter-tab:hover {
  border-color: var(--color-border-mid);
  color: var(--color-text-sec);
}

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

/* Projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: var(--sp-3);
}

/* Project card */
.project-card {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background-color: var(--color-surface-1);
  transition:
    transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base);
  will-change: transform;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.project-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.project-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease-smooth);
  will-change: transform;
}

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

.project-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 10, 10, 0.95) 0%,
    rgba(10, 10, 10, 0.3) 50%,
    transparent 100%
  );
  display: flex;
  align-items: flex-end;
  padding: var(--sp-3);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-smooth);
}

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

.project-card-hover-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.2rem;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background-color: var(--color-accent);
  color: var(--color-bg);
  border-radius: var(--r-md);
  transform: translateY(8px);
  transition: transform var(--dur-base) var(--ease-out);
}

.project-card:hover .project-card-hover-cta {
  transform: translateY(0);
}

.project-card-info {
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
}

.project-card-category {
  color: var(--color-accent);
  margin-bottom: 0.4rem;
}

.project-card-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-2);
}

.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.project-tag {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--color-text-muted);
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  letter-spacing: 0.04em;
}

/* ============================================================
   13. PROJECT LIGHTBOX
   ============================================================ */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: var(--color-overlay);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: var(--sp-4);
}

.lightbox-panel {
  position: relative;
  background-color: var(--color-surface-1);
  border-radius: var(--r-xl);
  max-width: 880px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--color-border);
  overscroll-behavior: contain;
}

/* Lightbox scrollbar */
.lightbox-panel::-webkit-scrollbar { width: 4px; }
.lightbox-panel::-webkit-scrollbar-track { background: var(--color-surface-1); }
.lightbox-panel::-webkit-scrollbar-thumb { background: var(--color-surface-3); border-radius: 2px; }

.lightbox-close {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text-sec);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    color var(--dur-fast),
    border-color var(--dur-fast),
    background-color var(--dur-fast);
}

.lightbox-close:hover {
  color: var(--color-text-primary);
  border-color: var(--color-border-mid);
  background-color: var(--color-surface-3);
}

/* Carousel */
.lightbox-carousel {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background-color: var(--color-surface-2);
}

.lightbox-slides {
  display: flex;
  height: 100%;
  transition: transform 500ms var(--ease-in-out);
}

.lightbox-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.lightbox-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Carousel navigation */
.carousel-nav {
  position: absolute;
  inset-block: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--sp-2);
  pointer-events: none;
}

.carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  transition:
    background-color var(--dur-fast),
    border-color var(--dur-fast);
}

.carousel-btn:hover:not(:disabled) {
  background-color: var(--color-surface-2);
  border-color: var(--color-border-mid);
}

.carousel-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.carousel-dots {
  position: absolute;
  bottom: var(--sp-2);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  border: none;
  padding: 0;
  cursor: pointer;
  transition:
    background-color var(--dur-fast),
    width var(--dur-fast),
    border-radius var(--dur-fast);
}

.carousel-dot.active {
  width: 20px;
  border-radius: 3px;
  background-color: var(--color-accent);
}

/* Lightbox body */
.lightbox-body {
  padding: var(--sp-6);
}

.lightbox-category {
  color: var(--color-accent);
  margin-bottom: var(--sp-1);
}

.lightbox-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-3);
}

.lightbox-description {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 300;
  color: var(--color-text-sec);
  line-height: 1.75;
}

.lightbox-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--color-border);
  margin-top: var(--sp-4);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.meta-label {
  color: var(--color-text-muted);
}

.meta-value {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-primary);
}

#lightbox-tags-el {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

/* ============================================================
   14. SKILLS SECTION — Typographic list (no bars)
   ============================================================ */
#skills {
  padding-block: var(--section-pad);
  background-color: var(--color-surface-1);
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 5vw, 6rem);
  margin-top: var(--sp-12);
}

.skills-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.skills-group-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-2);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--color-border);
}

/* Clean typographic skill row */
.skill-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.skill-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--color-border);
  transition: background-color var(--dur-fast);
}

.skill-row:first-child {
  border-top: none;
}

.skill-row:hover {
  padding-inline: var(--sp-2);
  background-color: var(--color-accent-dim);
  border-radius: var(--r-sm);
}

.skill-name {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-sec);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Dotted leader between name and level */
.skill-dots {
  flex: 1;
  border-bottom: 1px dotted var(--color-border-mid);
  margin-bottom: 4px;
  min-width: 20px;
}

.skill-level {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Skills tags */
.skills-tags-section {
  grid-column: 1 / -1;
  padding-top: var(--sp-8);
  border-top: 1px solid var(--color-border);
  margin-top: var(--sp-4);
}

.skills-tags-title {
  margin-bottom: var(--sp-4);
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
}

.skill-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.1rem;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  letter-spacing: 0.06em;
  transition:
    border-color var(--dur-fast),
    color var(--dur-fast);
}

.skill-tag:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ============================================================
   14b. TYPOGRAPHIC PROJECT CARDS (no placeholder images)
   ============================================================ */
.project-card-typographic {
  position: relative;
  background-color: var(--color-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
}

.project-card-bg-text {
  position: absolute;
  font-family: var(--font-display);
  font-size: clamp(5rem, 14vw, 8rem);
  font-weight: 900;
  color: rgba(200, 169, 110, 0.06);
  letter-spacing: -0.06em;
  user-select: none;
  pointer-events: none;
  line-height: 1;
  transition: color var(--dur-slow);
}

.project-card:hover .project-card-bg-text {
  color: rgba(200, 169, 110, 0.1);
}

.project-card-logo-area {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-6);
  text-align: center;
}

.project-card-logo-area img {
  max-height: 60px;
  max-width: 200px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.7;
  transition: opacity var(--dur-base);
}

[data-theme="light"] .project-card-logo-area img {
  filter: brightness(0);
}

.project-card:hover .project-card-logo-area img {
  opacity: 1;
}

.project-card-event-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: center;
}

.project-card-event-year {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* Accent line at bottom of typographic cards */
.project-card-typographic::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--card-accent, var(--color-accent)), transparent);
  opacity: 0;
  transition: opacity var(--dur-base);
}

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

/* ============================================================
   14c. CERTIFICATES SECTION
   ============================================================ */
#certificates {
  padding-block: var(--section-pad);
  background-color: var(--color-bg);
}

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-12);
}

.cert-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-4) var(--sp-5);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  background-color: var(--color-surface-1);
  position: relative;
  transition:
    border-color var(--dur-base),
    background-color var(--dur-base),
    transform var(--dur-base) var(--ease-out);
  will-change: transform;
}

.cert-card:hover {
  border-color: var(--color-accent);
  background-color: var(--color-surface-2);
  transform: translateY(-4px);
}

.cert-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background-color: var(--color-accent-dim);
  border: 1px solid rgba(200, 169, 110, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-accent);
  transition: background-color var(--dur-fast);
}

.cert-card:hover .cert-icon {
  background-color: rgba(200, 169, 110, 0.18);
}

.cert-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cert-issuer {
  color: var(--color-accent);
}

.cert-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.cert-meta {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.cert-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--color-accent-dim);
  border: 1px solid rgba(200, 169, 110, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-accent);
  margin-left: auto;
}

.cert-placeholder-note {
  margin-top: var(--sp-6);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
  font-style: italic;
  opacity: 0.7;
}

/* ============================================================
   15. CONTACT SECTION
   ============================================================ */
#contact {
  position: relative;
  padding-block: var(--section-pad);
  background-color: var(--color-bg);
  overflow: hidden;
}

.contact-bg-text {
  position: absolute;
  font-family: var(--font-display);
  font-size: clamp(8rem, 18vw, 22rem);
  font-weight: 900;
  color: rgba(200, 169, 110, 0.025);
  white-space: nowrap;
  top: 50%;
  left: -5%;
  transform: translateY(-50%);
  user-select: none;
  pointer-events: none;
  z-index: 0;
  letter-spacing: -0.05em;
  line-height: 1;
}

.contact-inner {
  position: relative;
  z-index: 1;
}

.contact-header {
  max-width: 700px;
  margin-bottom: var(--sp-12);
}

.contact-headline em {
  color: var(--color-accent);
  font-style: italic;
}

/* Contact channels */
.contact-channels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
  margin-bottom: var(--sp-12);
}

.contact-channel {
  display: flex;
  flex-direction: column;
  padding: var(--sp-4) var(--sp-4) var(--sp-6);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  text-decoration: none;
  transition:
    border-color var(--dur-base),
    background-color var(--dur-base),
    transform var(--dur-base) var(--ease-out);
  will-change: transform;
}

.contact-channel:hover {
  border-color: var(--color-accent);
  background-color: var(--color-accent-dim);
  transform: translateY(-4px);
}

.channel-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background-color: var(--color-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-4);
  transition: background-color var(--dur-fast);
}

.channel-icon svg {
  color: var(--color-text-sec);
  transition: color var(--dur-fast);
}

.contact-channel:hover .channel-icon {
  background-color: var(--color-accent-dim);
}

.contact-channel:hover .channel-icon svg {
  color: var(--color-accent);
}

.channel-label {
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}

.channel-value {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text-primary);
}

/* Contact form layout */
.contact-form-wrapper {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(3rem, 5vw, 6rem);
  align-items: start;
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.9rem 1.1rem;
  background-color: var(--color-surface-1);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: 1.5;
  transition:
    border-color var(--dur-fast),
    background-color var(--dur-fast),
    box-shadow var(--dur-fast);
  outline: none;
  -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--color-border-mid);
  background-color: var(--color-surface-2);
  box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.08);
}

.form-input.error,
.form-textarea.error {
  border-color: rgba(217, 64, 64, 0.6);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
}

.form-error-msg {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  color: #D94040;
  min-height: 1em;
  letter-spacing: 0.02em;
}

.form-submit {
  width: 100%;
  justify-content: center;
  margin-top: var(--sp-1);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.form-success {
  display: none;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid rgba(200, 169, 110, 0.3);
  border-radius: var(--r-md);
  background-color: var(--color-accent-dim);
  color: var(--color-accent);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: center;
  line-height: 1.6;
}

/* Contact aside */
.contact-info-aside {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  padding-top: var(--sp-2);
}

.aside-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.aside-label {
  color: var(--color-text-muted);
}

.aside-value {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-text-sec);
}

.aside-link {
  color: var(--color-text-sec);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--color-border-mid);
  transition:
    color var(--dur-fast),
    text-decoration-color var(--dur-fast);
}

.aside-link:hover {
  color: var(--color-accent);
  text-decoration-color: var(--color-accent);
}

/* Availability indicator */
.aside-availability {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  margin-top: var(--sp-2);
}

.availability-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #4CAF50;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
  animation: pulse-green 2.5s ease-in-out infinite;
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2); }
  50%       { box-shadow: 0 0 0 6px rgba(76, 175, 80, 0); }
}

.aside-availability .aside-value {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-sec);
}

/* ============================================================
   16. FOOTER
   ============================================================ */
footer {
  padding-block: var(--sp-8) var(--sp-6);
  border-top: 1px solid var(--color-border);
  background-color: var(--color-bg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.footer-copy {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  gap: var(--sp-6);
  flex-wrap: wrap;
}

.footer-link {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--dur-fast);
}

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

/* ============================================================
   17. SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}

.reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}

.reveal.revealed,
.reveal-left.revealed,
.reveal-right.revealed,
.reveal-scale.revealed {
  opacity: 1;
  transform: none;
}

/* Stagger delays */
.stagger-1 { transition-delay: 80ms; }
.stagger-2 { transition-delay: 160ms; }
.stagger-3 { transition-delay: 240ms; }
.stagger-4 { transition-delay: 320ms; }
.stagger-5 { transition-delay: 400ms; }
.stagger-6 { transition-delay: 480ms; }

/* ============================================================
   18. RESPONSIVE — TABLET (max-width: 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }

  .about-visual {
    order: -1;
  }

  .about-profile-wrapper {
    max-width: 400px;
  }

  .contact-form-wrapper {
    grid-template-columns: 1fr;
  }

  .contact-channels {
    grid-template-columns: repeat(3, 1fr);
  }

  .skills-grid {
    gap: var(--sp-8);
  }
}

/* ============================================================
   19. RESPONSIVE — TABLET/MOBILE (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --section-pad: clamp(4rem, 8vw, 6rem);
  }

  /* Nav */
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  /* Hero */
  .hero-stats {
    gap: var(--sp-4);
  }

  .hero-stat .number {
    font-size: var(--text-3xl);
  }

  /* Companies */
  .contact-channels {
    grid-template-columns: 1fr;
  }

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

  /* Work header */
  .work-header {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Skills */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }

  .skills-tags-section {
    grid-column: 1;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-3);
  }
}

/* ============================================================
   20. RESPONSIVE — SMALL MOBILE (max-width: 480px)
   ============================================================ */
@media (max-width: 480px) {
  :root {
    --container-pad: 1.25rem;
    --section-pad: 3.5rem;
  }

  .hero-headline {
    font-size: clamp(3rem, 14vw, 4.5rem);
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: var(--sp-4);
  }

  .hero-stat {
    flex: 1 1 40%;
  }

  .about-grid {
    gap: var(--sp-6);
  }

  .filter-tabs {
    gap: 0.35rem;
  }

  .filter-tab {
    padding: 0.4rem 0.9rem;
    font-size: 0.65rem;
  }

  .lightbox-panel {
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    max-height: 95vh;
    align-self: flex-end;
  }

  #lightbox {
    align-items: flex-end;
    padding: 0;
  }

  .lightbox-carousel {
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    aspect-ratio: 4/3;
  }

  .lightbox-body {
    padding: var(--sp-4);
  }

  .lightbox-meta {
    flex-direction: column;
    gap: var(--sp-3);
  }

  .contact-channels {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   21. PRINT STYLES
   ============================================================ */
@media print {
  #loader,
  .cursor,
  .cursor-ring,
  #nav,
  .hero-scroll-indicator,
  .hero-bg,
  .filter-tabs,
  #lightbox,
  footer {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    cursor: auto;
  }

  #hero {
    min-height: auto;
    padding-top: 2rem;
  }
}
