/* =============================================
   CUSTOM PROPERTIES — DESIGN TOKENS
   ============================================= */
:root {
  --bg-void:        #0d0d0b;
  --bg-deep:        #111110;
  --bg-surface:     #191917;
  --bg-raised:      #1e1e1b;
  --bg-highlight:   #252520;

  --amber:          #e8923a;
  --amber-bright:   #f5a84e;
  --amber-dim:      #a0611f;
  --amber-ghost:    rgba(232, 146, 58, 0.08);
  --amber-glow:     rgba(232, 146, 58, 0.18);

  --green-phosphor: #4adf8a;
  --green-dim:      #1f6640;

  --text-primary:   #e8e4d8;
  --text-secondary: #9a9588;
  --text-muted:     #5a564e;
  --text-amber:     var(--amber);

  --border-dim:     rgba(232, 146, 58, 0.12);
  --border-mid:     rgba(232, 146, 58, 0.25);
  --border-bright:  rgba(232, 146, 58, 0.5);

  --grid-line:      rgba(255, 255, 255, 0.03);

  --font-mono:      'IBM Plex Mono', 'Courier New', monospace;
  --font-serif:     'Libre Baskerville', Georgia, serif;
  --font-sans:      'IBM Plex Sans', sans-serif;

  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  48px;
  --space-2xl: 96px;
  --space-3xl: 144px;

  --radius-sm: 2px;
  --radius-md: 4px;

  --transition-fast:   150ms ease;
  --transition-mid:    300ms ease;
  --transition-slow:   600ms cubic-bezier(0.16, 1, 0.3, 1);

  --nav-height: 60px;
  --max-w: 1200px;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: default;
}

/* Scanline overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* Noise grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: -200%;
  width: 400%;
  height: 400%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
  pointer-events: none;
  z-index: 9998;
  animation: grainShift 0.4s steps(1) infinite;
}

@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, -3%); }
  40%  { transform: translate(3%, 3%); }
  60%  { transform: translate(-3%, 3%); }
  80%  { transform: translate(3%, -3%); }
  100% { transform: translate(0, 0); }
}

/* Grid background lines */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h2.section-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--text-primary);
  margin-bottom: var(--space-xl);
  position: relative;
  display: inline-block;
}

h2.section-title::after {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--amber), transparent);
  margin-top: var(--space-sm);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: var(--space-sm);
  display: block;
}

a {
  color: var(--amber);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--amber-bright); }

::selection {
  background: var(--amber);
  color: var(--bg-void);
}

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: var(--amber-dim);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--amber); }

/* =============================================
   LAYOUT UTILITIES
   ============================================= */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

section {
  padding: var(--space-3xl) 0;
  position: relative;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* =============================================
   NAVIGATION
   ============================================= */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(13, 13, 11, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-dim);
  transition: border-color var(--transition-mid);
}
#navbar.scrolled {
  border-bottom-color: var(--border-mid);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--amber);
  text-transform: uppercase;
  font-weight: 500;
}

.nav-logo span {
  color: var(--text-muted);
  margin: 0 6px;
}

nav ul {
  display: flex;
  gap: var(--space-xl);
  list-style: none;
}

nav ul li a {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
  padding-bottom: 2px;
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--amber);
  transition: width var(--transition-mid);
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--amber);
}
nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--amber);
  transition: transform var(--transition-mid), opacity var(--transition-mid);
}

/* =============================================
   HERO SECTION
   ============================================= */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 0;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.35;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232,146,58,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,146,58,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: calc(var(--nav-height) + var(--space-xl)) var(--space-xl) var(--space-xl);
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 40px;
  height: 1px;
  background: var(--amber);
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 10vw, 9rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: var(--space-xl);
}

.hero-name em {
  color: var(--amber);
  font-style: italic;
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 1.5vw, 0.85rem);
  letter-spacing: 0.18em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: var(--space-xl);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
}

.tagline-sep {
  color: var(--amber-dim);
  font-size: 0.5rem;
}

.hero-bio {
  max-width: 520px;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  border-left: 2px solid var(--amber-dim);
  padding-left: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.btn-primary {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bg-void);
  background: var(--amber);
  border: 1px solid var(--amber);
  padding: 12px 28px;
  cursor: pointer;
  transition: background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
  display: inline-block;
  border-radius: var(--radius-sm);
}
.btn-primary:hover {
  background: var(--amber-bright);
  border-color: var(--amber-bright);
  color: var(--bg-void);
  box-shadow: 0 0 24px var(--amber-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  background: transparent;
  border: 1px solid var(--border-mid);
  padding: 12px 28px;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
  display: inline-block;
  border-radius: var(--radius-sm);
}
.btn-secondary:hover {
  border-color: var(--amber);
  color: var(--amber-bright);
  transform: translateY(-1px);
}

.hero-corner-label {
  position: absolute;
  bottom: var(--space-xl);
  right: var(--space-xl);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  z-index: 2;
}

.scroll-indicator {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 2;
}
.scroll-indicator span {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--amber), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.1); }
}

/* =============================================
   ELECTRONICS PROJECTS
   ============================================= */
#projects {
  background: var(--bg-deep);
  border-top: 1px solid var(--border-dim);
}

.projects-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.project-count {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-lg);
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-mid), transform var(--transition-mid), box-shadow var(--transition-mid);
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--amber), transparent);
  opacity: 0;
  transition: opacity var(--transition-mid);
}

.project-card:hover {
  border-color: var(--border-mid);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 32px var(--amber-ghost);
}
.project-card:hover::before { opacity: 1; }

/* Media gallery */
.card-gallery {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-void);
}

.gallery-track {
  display: flex;
  height: 100%;
  transition: transform var(--transition-slow);
}

.gallery-slide {
  flex: 0 0 100%;
  height: 100%;
  position: relative;
  cursor: pointer;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.project-card:hover .gallery-slide img {
  transform: scale(1.03);
}

.gallery-slide iframe {
  width: 100%;
  height: 100%;
  border: none;
  pointer-events: none;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-mid);
}
.gallery-slide:hover .gallery-overlay { background: rgba(0,0,0,0.35); }

.gallery-icon {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity var(--transition-mid), transform var(--transition-mid);
}
.gallery-slide:hover .gallery-icon {
  opacity: 1;
  transform: scale(1);
}
.gallery-icon svg { fill: white; width: 16px; height: 16px; }

/* Gallery nav */
.gallery-nav {
  position: absolute;
  bottom: var(--space-sm);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.gallery-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.gallery-dot.active {
  background: var(--amber);
  transform: scale(1.3);
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--border-dim);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  opacity: 0;
}
.card-gallery:hover .gallery-arrow { opacity: 1; }
.gallery-arrow:hover { background: var(--amber-ghost); border-color: var(--amber); }
.gallery-arrow svg { stroke: white; width: 12px; height: 12px; fill: none; }
.gallery-arrow.prev { left: 8px; }
.gallery-arrow.next { right: 8px; }

/* =============================================
   MODULE DROPDOWNS (Academic Projects, Analog Audio, Music)
   ============================================= */
.module-dropdown {
  grid-column: 1 / -1;
}

.module-toggle {
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: var(--space-xl);
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
}

.module-info {
  display: block;
}

.module-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.dropdown-arrow {
  width: 50px;
  height: 50px;
  color: var(--amber);
  flex-shrink: 0;
  transition: transform var(--transition-mid);
}

.module-dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

.module-content {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-lg);
  transition: max-height .6s ease, opacity .4s ease;
}

.module-dropdown.active .module-content {
  max-height: 8000px; /* comfortably larger than the tallest module will ever be */
  opacity: 1;
}

/* Music module cards are wider, so its grid needs its own column sizing */
.module-content.music-content {
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: var(--space-xl);
}

.module-section {
  margin-bottom: var(--space-2xl);
}

.module-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-dim);
}

.module-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

/* Make module headers full-width in academic projects */
#academic-projects .projects-header {
  grid-column: 1 / -1;
  width: 100%;
  margin-bottom: var(--space-lg);
}

/* Card body */
.card-body {
  padding: var(--space-lg);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.card-number {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--amber-dim);
  flex-shrink: 0;
  margin-top: 3px;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: var(--space-md);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-md);
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
  color: var(--amber-dim);
  background: var(--amber-ghost);
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.tag:hover { border-color: var(--amber); color: var(--amber); }

.card-divider {
  height: 1px;
  background: var(--border-dim);
  margin: var(--space-md) 0;
}

.read-more-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color var(--transition-fast);
}
.read-more-toggle:hover { color: var(--amber-bright); }
.read-more-toggle .toggle-icon {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-mid);
}
.read-more-toggle.open .toggle-icon { transform: rotate(180deg); }

.view-project-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-decoration: none;
  transition: color var(--transition-fast);
  margin-top: var(--space-sm);
}
.view-project-btn:hover { color: var(--amber-bright); }
.view-project-btn svg {
  width: 14px;
  height: 14px;
}

.card-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-details.open { max-height: 600px; }
.card-details-inner {
  padding-top: var(--space-md);
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.75;
  border-top: 1px solid var(--border-dim);
  margin-top: var(--space-md);
}
.card-details-inner p { margin-bottom: var(--space-sm); }
.card-details-inner code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--bg-raised);
  padding: 1px 5px;
  border-radius: 2px;
  color: var(--amber);
}

/* =============================================
   MUSIC SECTION
   ============================================= */
#music {
  background: var(--bg-void);
  position: relative;
}

.music-bg-accent {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: radial-gradient(ellipse at 80% 50%, rgba(232,146,58,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: var(--space-xl);
}

.music-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-mid), transform var(--transition-mid), box-shadow var(--transition-mid);
  position: relative;
}
.music-card:hover {
  border-color: rgba(232,146,58,0.3);
  transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(232,146,58,0.08);
}

.music-card-top {
  display: grid;
  grid-template-columns: 120px 1fr;
}

.music-artwork {
  position: relative;
  overflow: hidden;
}
.music-artwork img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  display: block;
  filter: sepia(0.2) brightness(0.85);
  transition: filter var(--transition-mid), transform var(--transition-mid);
}
.music-card:hover .music-artwork img {
  filter: sepia(0) brightness(1);
  transform: scale(1.05);
}

.music-artwork-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(232,146,58,0.15), transparent);
}

.music-meta {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.music-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.2;
}

.music-subtitle {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--amber);
  letter-spacing: 0.12em;
  margin-bottom: var(--space-sm);
}

.music-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.music-player {
  border-top: 1px solid var(--border-dim);
  background: var(--bg-deep);
}

.music-player iframe {
  display: block;
  width: 100%;
  border: none;
}

.music-player-placeholder {
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--amber);
  background: var(--amber-ghost);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
}
.play-btn:hover {
  background: var(--amber-glow);
  box-shadow: 0 0 16px var(--amber-ghost);
}
.play-btn svg { fill: var(--amber); width: 14px; height: 14px; margin-left: 2px; }

.waveform {
  flex: 1;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.waveform-bar {
  flex: 1;
  background: var(--border-dim);
  border-radius: 1px;
  transition: background var(--transition-fast);
  animation: waveAnim 1.5s ease-in-out infinite;
}
.waveform-bar:nth-child(odd) { animation-delay: 0.1s; }
.waveform-bar:nth-child(3n) { animation-delay: 0.2s; }
.waveform-bar:nth-child(4n) { animation-delay: 0.05s; }

@keyframes waveAnim {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

.music-footer {
  padding: var(--space-md) var(--space-md) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.music-link {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  display: flex;
  align-items: center;
  gap: 5px;
}
.music-link svg { width: 10px; height: 10px; }

/* =============================================
   CV SECTION
   ============================================= */
#cv {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-dim);
  border-bottom: 1px solid var(--border-dim);
}

.cv-download-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.cv-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: var(--space-2xl);
}

/* CV Column */
.cv-col h3 {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border-dim);
}

.cv-block { margin-bottom: var(--space-xl); }

/* Education */
.edu-item {
  margin-bottom: var(--space-lg);
  padding-left: var(--space-md);
  border-left: 2px solid var(--border-dim);
}
.edu-degree {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.edu-school {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--amber);
  margin-bottom: 2px;
}
.edu-year {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* Skills */
.skill-item {
  margin-bottom: var(--space-md);
}
.skill-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.skill-name {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
}
.skill-pct {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}
.skill-bar-track {
  height: 3px;
  background: var(--bg-highlight);
  border-radius: 2px;
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--amber-dim), var(--amber));
  border-radius: 2px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.skill-bar-fill.animated { width: var(--w); }

/* Languages */
.lang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-dim);
}
.lang-name {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.lang-level {
  display: flex;
  gap: 4px;
}
.lang-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--amber-dim);
  background: transparent;
}
.lang-dot.filled { background: var(--amber); border-color: var(--amber); }

/* Timeline (right col) */
.timeline {
  position: relative;
  padding-left: var(--space-xl);
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--amber-dim), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-xl);
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-xl));
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  border: 2px solid var(--bg-surface);
  box-shadow: 0 0 8px var(--amber-glow);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--amber);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.timeline-role {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.timeline-company {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
}
.timeline-location {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}
.timeline-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.timeline-bullets {
  margin: 0 0 var(--space-sm) 0;
  padding-left: 1.2rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.timeline-bullets li {
  margin-bottom: 4px;
}

/* Certifications */
.cert-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-dim);
}
.cert-icon {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  background: var(--amber-ghost);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cert-icon svg { width: 16px; height: 16px; stroke: var(--amber); fill: none; }
.cert-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.cert-name {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
}
.cert-issuer {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.cert-year {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--amber);
  text-align: right;
}

/* =============================================
   CONTACT SECTION
   ============================================= */
#contact {
  background: var(--bg-void);
  text-align: center;
}

.contact-inner {
  max-width: 640px;
  margin: 0 auto;
}

.contact-tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  line-height: 1.7;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
}

.contact-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
  transition: color var(--transition-fast), transform var(--transition-fast);
}
.contact-link:hover { color: var(--amber); transform: translateY(-3px); }

.contact-link-icon {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-dim);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition-mid), box-shadow var(--transition-mid);
}
.contact-link:hover .contact-link-icon {
  border-color: var(--amber);
  box-shadow: 0 0 16px var(--amber-ghost);
}
.contact-link-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; }

.contact-link-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Contact form */
.contact-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.contact-divider-line {
  flex: 1;
  height: 1px;
  background: var(--border-dim);
}
.contact-divider-text {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-input,
.form-textarea {
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
  padding: 12px var(--space-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 300;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  width: 100%;
  outline: none;
  resize: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 2px var(--amber-ghost);
}

.form-textarea { min-height: 140px; }

.form-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.form-note {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
}

/* =============================================
   FOOTER
   ============================================= */
footer {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-dim);
  background: var(--bg-void);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}
.footer-right {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
}
.footer-right span { color: var(--amber); }

/* =============================================
   LIGHTBOX MODAL
   ============================================= */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.93);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border: 1px solid var(--border-dim);
}

.lightbox-content iframe {
  width: min(900px, 85vw);
  aspect-ratio: 16/9;
  border: none;
}

.lightbox-close {
  position: fixed;
  top: var(--space-xl);
  right: var(--space-xl);
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-mid);
  border-radius: 50%;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.lightbox-close:hover { color: var(--amber); border-color: var(--amber); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .cv-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root {
    --space-xl: 32px;
    --space-2xl: 64px;
    --space-3xl: 96px;
  }
  .container { padding: 0 var(--space-lg); }

  nav ul { display: none; }
  .nav-toggle { display: flex; }
  nav.open ul {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-deep);
    padding: var(--space-xl);
    gap: var(--space-lg);
    border-bottom: 1px solid var(--border-dim);
  }

  .hero-name { font-size: clamp(2.8rem, 13vw, 5rem); }

  .projects-grid { grid-template-columns: 1fr; }
  .module-content { grid-template-columns: 1fr; }
  .music-grid { grid-template-columns: 1fr; }

  .music-card-top { grid-template-columns: 96px 1fr; }
  .music-artwork img { width: 96px; height: 96px; }

  .form-row { grid-template-columns: 1fr; }

  .contact-links { gap: var(--space-lg); }

  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero-tagline { flex-direction: column; align-items: flex-start; gap: 6px; }
  .tagline-sep { display: none; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn-primary,
  .hero-cta .btn-secondary { text-align: center; }
  .cv-download-bar { flex-direction: column; align-items: flex-start; }
}

/* Status indicator */
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-phosphor);
  margin-right: 6px;
  box-shadow: 0 0 8px var(--green-phosphor);
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}