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

:root {
  --bg-base: #0a0f1e;
  --bg-card: #0d1526;
  --bg-card2: #0e1b2e;
  --bg-glass: rgba(15, 23, 42, 0.7);
  --border: rgba(34, 211, 238, 0.28);
  --border-soft: rgba(255,255,255,0.12);
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --cyan-dim: rgba(34, 211, 238, 0.15);
  --blue-dim: rgba(59, 130, 246, 0.15);
  --text-primary: #f1f5f9;
  --text-secondary: #b0c4de;
  --text-muted: #64748b;
  --green: #4ade80;
  --red: #f87171;
  --yellow: #facc15;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(34, 211, 238, 0.12);
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: url('../assets/img/bg.gif') center center / cover no-repeat fixed, var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   SCANLINE OVERLAY
============================================ */
.scanline {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
  animation: scanMove 8s linear infinite;
}
@keyframes scanMove {
  0% { background-position: 0 0; }
  100% { background-position: 0 100px; }
}

/* ============================================
   HAMBURGER BUTTON
============================================ */
.hamburger {
  position: fixed; top: 20px; left: 20px; z-index: 1000;
  width: 44px; height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(8px);
}
.hamburger:hover { border-color: var(--cyan); box-shadow: 0 0 16px var(--cyan-dim); }
.hamburger span {
  display: block; width: 18px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   SIDEBAR
============================================ */
.sidebar {
  position: fixed; top: 0; left: -300px; width: 280px; height: 100%;
  z-index: 900;
  background: rgba(10, 15, 30, 0.96);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: left 0.35s cubic-bezier(0.4,0,0.2,1);
  padding: 0;
}
.sidebar.open { left: 0; }

.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.sidebar-logo {
  font-family: var(--font-mono);
  font-size: 1.2rem; font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.05em;
}
.sidebar-close {
  background: none; border: 1px solid var(--border-soft);
  color: var(--text-secondary); border-radius: 8px;
  width: 32px; height: 32px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.sidebar-close:hover { border-color: var(--cyan); color: var(--cyan); }

.nav-links {
  list-style: none; flex: 1; padding: 16px 12px; overflow-y: auto;
}
.nav-links li { margin-bottom: 4px; }
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none; font-size: 0.9rem; font-weight: 500;
  transition: var(--transition);
  position: relative;
}
.nav-link i { width: 18px; text-align: center; font-size: 0.85rem; }
.nav-link:hover { background: var(--cyan-dim); color: var(--cyan); }
.nav-link.active {
  background: linear-gradient(135deg, var(--cyan-dim), var(--blue-dim));
  color: var(--cyan);
  border: 1px solid var(--border);
}
.nav-link.active::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--cyan);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-soft);
}
.sidebar-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem; color: var(--text-secondary);
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; } 50% { opacity: 0.4; }
}

/* ============================================
   OVERLAY
============================================ */
.overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}
.overlay.visible { opacity: 1; pointer-events: all; }

/* ============================================
   MAIN CONTENT / SECTIONS
============================================ */
.main-content {
  width: 100%; height: 100vh;
  position: relative; overflow: hidden;
}

.section {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  display: flex; align-items: flex-start; justify-content: center;
}
.section.active {
  opacity: 1; transform: translateY(0);
  pointer-events: all;
}

.section-inner {
  width: 100%; max-width: 1100px;
  padding: 60px 40px 80px;
}
.chat-section-inner {
  display: flex; flex-direction: column;
  height: 100%;
}

/* ============================================
   SECTION HEADER
============================================ */
.section-tag {
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--cyan); letter-spacing: 0.1em; text-transform: uppercase;
  display: block; margin-bottom: 8px;
}
.section-title {
  font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700; color: var(--text-primary);
  line-height: 1.15; margin-bottom: 8px;
  background: linear-gradient(135deg, #f1f5f9, var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-subtitle {
  color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 40px;
}
.section-header { margin-bottom: 40px; }

/* ============================================
   HOME SECTION
============================================ */
#home {
  align-items: center;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(34,211,238,0.07), transparent);
}

.home-grid {
  max-width: 1100px; width: 100%;
  padding: 0 40px;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 60px; align-items: center;
}

.home-eyebrow {
  font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--cyan); letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 12px;
}
.home-name {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700; line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.cursor {
  display: inline-block;
  color: var(--cyan);
  animation: blink 0.9s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

.home-role {
  font-size: 1.1rem; font-weight: 500;
  color: var(--text-secondary); margin-bottom: 20px;
}
.role-accent { color: var(--cyan); }
.home-bio {
  color: var(--text-secondary); line-height: 1.7;
  font-size: 0.95rem; max-width: 460px; margin-bottom: 32px;
}

.home-cta { display: flex; gap: 14px; margin-bottom: 32px; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #0a0f1e; font-weight: 600; font-size: 0.9rem;
  border: none; cursor: pointer; transition: var(--transition);
  text-decoration: none;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(34,211,238,0.3);
}
.btn-primary.full-width { width: 100%; justify-content: center; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 10px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary); font-weight: 600; font-size: 0.9rem;
  cursor: pointer; transition: var(--transition);
}
.btn-ghost:hover {
  border-color: var(--cyan); color: var(--cyan);
  transform: translateY(-2px);
}

.social-links { display: flex; gap: 12px; }
.social-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
  background: var(--bg-card);
  text-decoration: none;
  font-size: 1rem;
  transition: var(--transition);
}
.social-icon:hover {
  border-color: var(--cyan); color: var(--cyan);
  box-shadow: 0 0 16px var(--cyan-dim);
  transform: translateY(-3px);
}

/* Terminal Card */
.terminal-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow), var(--shadow-glow);
}
.terminal-bar {
  background: rgba(255,255,255,0.04);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border-soft);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #28ca41; }
.terminal-title {
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--text-muted); margin-left: 8px;
}
.terminal-body {
  padding: 24px;
  font-family: var(--font-mono); font-size: 0.82rem;
  line-height: 1.9;
}
.t-key { color: var(--cyan); }
.t-eq { color: var(--text-muted); margin: 0 6px; }
.t-val { color: var(--yellow); }
.t-green { color: var(--green); }
.t-blink { color: var(--cyan); animation: blink 0.9s step-end infinite; margin-top: 4px; }

/* ============================================
   ABOUT SECTION
============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: stretch;
}
.about-media-col {
  display: flex;
  flex-direction: column;
}
.about-text-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.about-intro {
  font-size: 1.05rem; color: var(--text-primary);
  line-height: 1.7; margin-bottom: 16px;
}
.about-intro strong { color: var(--cyan); }
.about-body {
  color: var(--text-secondary); line-height: 1.75;
  font-size: 0.92rem; margin-bottom: 32px;
}
.about-stats { display: flex; gap: 24px; }
.stat-item { text-align: center; }
.stat-num {
  display: block; font-family: var(--font-display);
  font-size: 2rem; font-weight: 700; color: var(--cyan);
}
.stat-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

.media-card { display: none; }

/* ---- Spotify-style player ---- */
.spotify-player {
  background: linear-gradient(160deg, #0e1b2e 0%, #0a1520 100%);
  border: 1px solid rgba(34,211,238,0.28);
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 420px;
}

/* Video as album art / preview */
.sp-video-wrap {
  position: relative;
  width: 100%;
  height: 0;
  flex: 1;
  min-height: 200px;
  background: #000;
  overflow: hidden;
}
.sp-video-wrap video {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}
.sp-video-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(10,21,32,0.95) 100%);
}

/* Hidden audio */
.sp-audio { display: none; }

/* Track info */
.sp-info {
  padding: 14px 18px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.sp-track-name {
  font-weight: 700; font-size: 0.95rem; color: #f1f5f9;
  letter-spacing: 0.01em;
}
.sp-track-sub {
  font-size: 0.75rem; color: var(--cyan); margin-top: 2px;
}
.sp-heart {
  background: none; border: none; cursor: pointer;
  color: #64748b; font-size: 1.1rem; padding: 4px;
  transition: color 0.2s;
}
.sp-heart:hover, .sp-heart.liked { color: var(--cyan); }

/* Progress bar */
.sp-progress-wrap {
  padding: 10px 18px 0;
}
.sp-progress-bar {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 2px; cursor: pointer;
  background: #1e3a4a; outline: none; border: none;
  transition: height 0.1s;
}
.sp-progress-bar:hover { height: 6px; }
.sp-progress-bar::-webkit-slider-runnable-track {
  background: linear-gradient(to right, var(--cyan) var(--prog, 0%), #1e3a4a var(--prog, 0%));
  border-radius: 3px; height: 4px;
}
.sp-progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; margin-top: -4px; cursor: pointer;
  box-shadow: 0 0 6px rgba(34,211,238,0.6);
}
.sp-times {
  display: flex; justify-content: space-between;
  font-size: 0.7rem; color: #64748b; margin-top: 4px;
  padding: 0 2px;
}

/* Controls row */
.sp-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 24px; padding: 8px 18px 18px;
}
.sp-btn-secondary {
  background: none; border: none; cursor: pointer;
  color: #64748b; font-size: 1rem; transition: color 0.2s;
}
.sp-btn-secondary:hover { color: var(--cyan); }
.sp-btn-play {
  width: 48px; height: 48px; border-radius: 50%;
  background: #ffffff;
  border: none; cursor: pointer; color: #0a0f1e;
  font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px rgba(255,255,255,0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}
.sp-btn-play:hover {
  transform: scale(1.08);
  box-shadow: 0 0 30px rgba(255,255,255,0.5);
}

/* ============================================
   PROJECT SECTION
============================================ */
.project-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.project-card {
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  position: relative; overflow: hidden;
  transition: var(--transition);
}
.project-card:hover {
  border-color: var(--cyan);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4), var(--shadow-glow);
}
.project-card-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 0%, rgba(34,211,238,0.05), transparent 70%);
  opacity: 0; transition: opacity 0.3s;
}
.project-card:hover .project-card-glow { opacity: 1; }

.project-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--cyan-dim); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--cyan); font-size: 1rem; margin-bottom: 16px;
}
.project-name {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 600;
  color: var(--text-primary); margin-bottom: 8px;
}
.project-desc {
  font-size: 0.82rem; color: var(--text-secondary);
  line-height: 1.6; margin-bottom: 14px;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tag {
  font-size: 0.7rem; font-family: var(--font-mono);
  background: var(--cyan-dim); color: var(--cyan);
  border: 1px solid var(--border);
  padding: 3px 8px; border-radius: 6px;
}
.project-links { display: flex; gap: 8px; }
.project-link {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid var(--border-soft);
  color: var(--text-secondary); text-decoration: none;
  font-size: 0.85rem; transition: var(--transition);
}
.project-link:hover { color: var(--cyan); border-color: var(--cyan); }

/* ============================================
   SKILL SECTION
============================================ */
.skill-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start;
}
.skill-badges {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.skill-badge {
  background: var(--bg-card2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 20px 14px;
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
  font-size: 0.82rem; font-weight: 500; color: var(--text-secondary);
  cursor: default; position: relative; overflow: hidden;
  transition: var(--transition);
}
.skill-badge:hover {
  border-color: var(--cyan); color: var(--cyan);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}
.skill-badge:hover .badge-glow { opacity: 1; }
.badge-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 100%, rgba(34,211,238,0.08), transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.skill-badge i { font-size: 1.6rem; color: var(--cyan); }

.skill-bar-item { margin-bottom: 20px; }
.skill-bar-header {
  display: flex; justify-content: space-between;
  font-size: 0.85rem; font-weight: 500; color: var(--text-primary);
  margin-bottom: 8px;
}
.skill-pct { color: var(--cyan); font-family: var(--font-mono); font-size: 0.78rem; }
.skill-bar-track {
  height: 6px; background: var(--bg-card2);
  border-radius: 3px; overflow: hidden;
  border: 1px solid var(--border-soft);
}
.skill-bar-fill {
  height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  transition: width 1s cubic-bezier(0.4,0,0.2,1) 0.2s;
  box-shadow: 0 0 8px rgba(34,211,238,0.4);
}

/* ============================================
   DOWNLOAD SECTION
============================================ */
#download {
  background: radial-gradient(ellipse 60% 40% at 80% 60%, rgba(59,130,246,0.05), transparent);
}
.downloader-card {
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px;
  max-width: 680px; margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.downloader-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan-dim), var(--blue-dim));
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--cyan); margin-bottom: 24px;
}
.downloader-input-group {
  display: flex; gap: 12px; margin-bottom: 16px;
}
.dl-input {
  flex: 1; padding: 12px 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-primary);
  font-family: var(--font-mono); font-size: 0.82rem;
  outline: none; transition: var(--transition);
}
.dl-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-dim); }
.dl-loading {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-secondary); font-size: 0.88rem; padding: 12px 0;
}
.dl-result {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px;
  margin-top: 16px; font-size: 0.85rem;
}
.dl-result-item { margin-bottom: 8px; color: var(--text-secondary); }
.dl-result-item strong { color: var(--text-primary); }
.dl-download-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px; margin: 4px 4px 0 0;
  background: var(--cyan-dim); border: 1px solid var(--border);
  color: var(--cyan); font-size: 0.8rem; text-decoration: none;
  transition: var(--transition);
}
.dl-download-link:hover { background: var(--cyan); color: #0a0f1e; }
.dl-error {
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.25);
  border-radius: 10px; padding: 14px;
  color: var(--red); font-size: 0.85rem; margin-top: 12px;
}
.supported-platforms {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px;
}
.platform-tag {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.78rem; color: var(--text-muted);
  background: var(--bg-card2); border: 1px solid var(--border-soft);
  padding: 6px 12px; border-radius: 8px;
}

/* ============================================
   CONTACT SECTION
============================================ */
.contact-layout {
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 48px;
}
.contact-info-item {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 24px;
}
.contact-info-item > i {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--cyan-dim); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; color: var(--cyan); flex-shrink: 0;
}
.ci-label {
  display: block; font-size: 0.72rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px;
}
.ci-val {
  color: var(--text-primary); font-size: 0.88rem;
  text-decoration: none; font-weight: 500;
}
.ci-val:hover { color: var(--cyan); }

.contact-form-card {
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 0.78rem; font-weight: 500;
  color: var(--text-secondary); text-transform: uppercase;
  letter-spacing: 0.07em; margin-bottom: 7px;
}
.form-input {
  width: 100%; padding: 11px 14px;
  background: var(--bg-card); border: 1px solid var(--border-soft);
  border-radius: 10px; color: var(--text-primary);
  font-family: var(--font-body); font-size: 0.9rem;
  outline: none; transition: var(--transition);
}
.form-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-dim); }
.form-textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.form-success {
  display: flex; align-items: center; gap: 8px;
  color: var(--green); font-size: 0.88rem; margin-top: 12px;
  background: rgba(74,222,128,0.08); border: 1px solid rgba(74,222,128,0.2);
  border-radius: 8px; padding: 10px 14px;
}

/* ============================================
   AI CHAT SECTION
============================================ */
#aichat { align-items: stretch; }
.chat-section-inner {
  max-width: 800px; padding: 40px 40px 0;
  height: 100%;
}
.chat-container {
  display: flex; flex-direction: column;
  flex: 1; min-height: 0;
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden; margin-bottom: 20px;
}
.chat-messages {
  flex: 1; overflow-y: auto; padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.chat-bubble {
  display: flex; gap: 12px; max-width: 75%;
  animation: fadeUp 0.3s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-bubble.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-bubble.ai   { align-self: flex-start; }
.bubble-avatar {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: var(--cyan-dim); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: var(--cyan);
}
.chat-bubble.user .bubble-avatar { background: var(--blue-dim); color: var(--blue); }
.bubble-content {
  background: var(--bg-card); border: 1px solid var(--border-soft);
  border-radius: 14px; padding: 12px 16px;
  font-size: 0.9rem; line-height: 1.6; color: var(--text-primary);
}
.chat-bubble.user .bubble-content {
  background: linear-gradient(135deg, rgba(34,211,238,0.12), rgba(59,130,246,0.12));
  border-color: rgba(34,211,238,0.2);
}
.bubble-time {
  display: block; font-size: 0.7rem; color: var(--text-muted);
  margin-top: 5px;
}
.chat-typing {
  display: flex; gap: 4px; padding: 4px 0;
}
.chat-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan); opacity: 0.4;
  animation: typingBounce 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%,60%,100% { transform: translateY(0); opacity:0.4; }
  30% { transform: translateY(-6px); opacity:1; }
}

.chat-input-bar {
  display: flex; gap: 10px; padding: 16px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-card);
}
.chat-input {
  flex: 1; padding: 11px 14px;
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text-primary);
  font-family: var(--font-body); font-size: 0.9rem; outline: none;
  transition: var(--transition);
}
.chat-input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-dim); }
.chat-send-btn {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border: none; color: #0a0f1e; font-size: 0.9rem;
  cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.chat-send-btn:hover { transform: scale(1.05); }

/* ============================================
   FEEDBACK SECTION
============================================ */
.feedback-layout {
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 32px;
}
.feedback-form-card {
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  height: fit-content;
}
.fb-form-title {
  font-family: var(--font-display); font-size: 1.1rem;
  font-weight: 600; color: var(--text-primary); margin-bottom: 20px;
}

.star-rating { display: flex; gap: 6px; margin-top: 4px; }
.star {
  font-size: 1.6rem; color: var(--text-muted);
  cursor: pointer; transition: var(--transition);
  user-select: none;
}
.star:hover, .star.active { color: var(--yellow); }
.star.active { text-shadow: 0 0 12px rgba(250,204,21,0.5); }

.feedback-reviews {
  overflow-y: auto; max-height: 520px; padding-right: 4px;
  display: flex; flex-direction: column; gap: 14px;
}
.feedback-reviews::-webkit-scrollbar { width: 4px; }
.feedback-reviews::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.review-card {
  background: var(--bg-card2); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 18px;
  transition: var(--transition);
  animation: fadeUp 0.3s ease;
}
.review-card:hover { border-color: var(--border); transform: translateY(-2px); }
.review-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.review-name {
  font-weight: 600; font-size: 0.9rem; color: var(--text-primary);
}
.review-stars { color: var(--yellow); font-size: 0.85rem; }
.review-date { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 8px; }
.review-comment { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }
.fb-loading {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-muted); font-size: 0.88rem; padding: 20px;
}
.fb-empty {
  text-align: center; padding: 40px 20px;
  color: var(--text-muted); font-size: 0.88rem;
}
.fb-empty i { font-size: 2rem; display: block; margin-bottom: 12px; opacity: 0.4; }

/* ============================================
   MODAL
============================================ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px; max-width: 520px; width: 90%;
  position: relative;
  transform: scale(0.92);
  transition: transform 0.3s ease;
}
.modal-backdrop.open .modal { transform: scale(1); }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: 1px solid var(--border-soft);
  color: var(--text-secondary); border-radius: 8px;
  width: 32px; height: 32px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { border-color: var(--red); color: var(--red); }
.modal-body h3 {
  font-family: var(--font-display); font-size: 1.3rem;
  font-weight: 600; color: var(--text-primary); margin-bottom: 12px;
}
.modal-body p { color: var(--text-secondary); line-height: 1.7; font-size: 0.9rem; }

/* ============================================
   SPINNER
============================================ */
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border-soft);
  border-top-color: var(--cyan);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   UTILITIES
============================================ */
.hidden { display: none !important; }
.flex { display: flex; }
.gap-2 { gap: 8px; }

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; gap: 36px; padding: 0 24px; }
  .home-visual { order: -1; }
  .about-grid { grid-template-columns: 1fr; }
  .about-media-col { order: -1; }
  .spotify-player { flex: none; }
  .sp-video-wrap { height: 220px; min-height: 0; flex: none; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .skill-layout { grid-template-columns: 1fr; gap: 32px; }
  .contact-layout { grid-template-columns: 1fr; }
  .feedback-layout { grid-template-columns: 1fr; }
  .section-inner { padding: 50px 24px 70px; }
  .chat-section-inner { padding: 30px 20px 0; }
}
@media (max-width: 600px) {
  .project-grid { grid-template-columns: 1fr; }
  .skill-badges { grid-template-columns: repeat(2, 1fr); }
  .home-cta { flex-direction: column; }
  .downloader-input-group { flex-direction: column; }
  .home-grid { padding: 0 16px; }
  .section-inner { padding: 40px 16px 60px; }
  .about-stats { gap: 16px; }
}
