@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,100..900;1,100..900&family=Newsreader:ital,opsz,wght@0,6..72,200..800;1,6..72,200..800&display=swap');

:root {
  /* Default: Light minimal theme (Breedlove wash) */
  --bg-primary: #f5f1e8;
  --bg-secondary: #ede8dc;
  --bg-tertiary: #e3dccf;
  
  --text-primary: #1c1b18;
  --text-secondary: #58544d;
  --text-muted: #888277;
  
  --accent-color: #d97736; /* Warm terracotta */
  --accent-gradient: linear-gradient(135deg, #d97736 0%, #b25329 100%);
  --accent-hover: #b25329;
  --accent-rgb: 217, 119, 54;
  
  --success: #6e7f45;
  --card-border: rgba(28, 27, 24, 0.08);
  --card-bg: rgba(237, 232, 220, 0.55);
  
  --font-heading: 'Archivo', sans-serif;
  --font-body: 'Newsreader', serif;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  /* Dark minimal theme (Breedlove dark wash) */
  --bg-primary: #131211;
  --bg-secondary: #1c1b18;
  --bg-tertiary: #272522;
  
  --text-primary: #f5f1e8;
  --text-secondary: #a59f95;
  --text-muted: #7d776d;
  
  --accent-color: #f2a046; /* Peach orange */
  --accent-gradient: linear-gradient(135deg, #f2a046 0%, #d97736 100%);
  --accent-hover: #d97736;
  --accent-rgb: 242, 160, 70;
  
  --success: #8da458;
  --card-border: rgba(245, 241, 232, 0.08);
  --card-bg: rgba(28, 27, 24, 0.55);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.5s ease;
}

body.intro-active {
  overflow: hidden;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

/* Page Transitions & Intro/Preloader Overlay */
#intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-primary);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transition: opacity 1.0s cubic-bezier(0.77, 0, 0.175, 1),
              transform 1.0s cubic-bezier(0.77, 0, 0.175, 1),
              visibility 1.0s;
}

#intro-overlay.fade-out {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
  visibility: hidden;
}

/* Loading panel */
.intro-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  transition: opacity 0.5s ease;
}

.loading-word {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.loading-progress-bar {
  width: 100%;
  height: 2px;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
  border-radius: 1px;
}

.loading-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--accent-color);
  transition: width 0.1s ease-out;
}

.loading-percentage {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
}

/* Welcome panel */
.intro-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  width: 85%;
  max-width: 800px;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.intro-welcome.visible {
  opacity: 1;
  transform: translateY(0);
}

.intro-quote-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.intro-quote {
  font-family: var(--font-body);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-style: italic;
  line-height: 1.3;
  color: var(--text-primary);
  font-weight: 300;
  margin: 0;
}

.intro-subquote {
  font-family: var(--font-heading);
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 500;
}

.intro-explore-btn {
  background: none;
  border: 1px solid var(--text-primary);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  padding: 16px 40px;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition-smooth);
  outline: none;
}

.intro-explore-btn:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.intro-explore-btn svg {
  transition: transform 0.3s ease;
}

.intro-explore-btn:hover svg {
  transform: translateX(4px);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: none;
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--text-muted);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
}

.theme-toggle-btn .sun-icon {
  display: none;
}

.theme-toggle-btn .moon-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle-btn .sun-icon {
  display: block;
}

[data-theme="dark"] .theme-toggle-btn .moon-icon {
  display: none;
}

.page-fade-in {
  animation: fadeInPage 0.8s ease-in-out forwards;
}

@keyframes fadeInPage {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Utility Classes */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 0;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(var(--accent-rgb), 0.5);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  transform: translateY(-2px);
}

/* Scroll Entrance Animations */
.reveal {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(24px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), 
              filter 1.2s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* Header & Navbar */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(var(--accent-rgb), 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  transition: var(--transition-smooth);
}

header.scrolled {
  padding: 10px 0;
  background: var(--bg-primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.nav-links {
  display: flex;
  list-style: none;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  background: none;
  border: none;
}

.menu-toggle span {
  width: 25px;
  height: 2px;
  background-color: var(--text-primary);
  transition: var(--transition-smooth);
}

/* Hero Section */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding-top: 120px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  top: 10%;
  right: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.12) 0%, transparent 70%);
  filter: blur(50px);
  z-index: -1;
}

.hero::before {
  content: '';
  position: absolute;
  bottom: 10%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.08) 0%, transparent 70%);
  filter: blur(50px);
  z-index: -1;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

.hero-text .badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  color: var(--accent-color);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-text h1 {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 10px;
}

.hero-text p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  margin-bottom: 40px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  gap: 16px;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  will-change: transform;
  transition: transform 0.1s ease-out;
}

.visual-box {
  position: relative;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--card-border);
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.15s ease-out;
}

/* About & Timeline Section */
.section-title {
  font-size: 2.5rem;
  margin-bottom: 12px;
  text-align: center;
}

.section-subtitle {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 60px;
  font-size: 1.1rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.about-details p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.timeline {
  position: relative;
  padding-left: 32px;
  border-left: 2px solid var(--bg-tertiary);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -41px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 4px solid var(--accent-color);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.4);
}

.timeline-date {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 8px;
}

.timeline-title {
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.timeline-institution {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.timeline-desc {
  color: var(--text-muted);
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.skills-category {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 30px;
  backdrop-filter: blur(10px);
}

.skills-category h3 {
  font-size: 1.4rem;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-tag:hover {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.3);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Stacked Scroll Cards (Experience Page) */
.stacked-cards-container {
  display: flex;
  flex-direction: column;
  gap: 80px;
  margin-top: 40px;
  position: relative;
}

.stacked-card {
  position: sticky;
  top: 140px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease;
}

.card-index-1 { z-index: 1; margin-bottom: 40px; }
.card-index-2 { z-index: 2; margin-bottom: 40px; }
.card-index-3 { z-index: 3; }

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.card-timeline-date {
  color: var(--accent-color);
  font-weight: 700;
  font-family: var(--font-heading);
  display: block;
  margin-bottom: 6px;
}

.card-job-title {
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.card-company-name {
  color: var(--text-secondary);
  font-weight: 500;
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.highlight-item strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 8px;
}

.highlight-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Horizontal Scroll Deck (Projects Page) */
.horizontal-scroll-container {
  display: flex;
  gap: 40px;
  overflow-x: auto;
  padding: 30px 10px 60px 10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: auto;
  scroll-behavior: smooth;
  cursor: grab;
}

.horizontal-scroll-container::-webkit-scrollbar {
  height: 8px;
}

.horizontal-scroll-container::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 10px;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 10px;
}

.project-scroll-card {
  flex: 0 0 500px;
  max-width: 90%;
  scroll-snap-align: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.project-scroll-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(var(--accent-rgb), 0.3);
  box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.15);
}

.project-image {
  height: 220px;
  background: var(--bg-secondary);
  overflow: hidden;
  position: relative;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-content {
  padding: 30px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-color);
  background: rgba(var(--accent-rgb), 0.1);
  padding: 4px 10px;
  border-radius: 50px;
}

.project-title {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

/* Project meta bar: tech pills + GitHub link */
.project-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--card-border);
  flex-wrap: wrap;
}

.project-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-pill {
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 50px;
  text-transform: uppercase;
}

.tech-pill.tech-php  { background: rgba(119, 123, 179, 0.18); color: #9b9fe0; border: 1px solid rgba(119,123,179,0.3); }
.tech-pill.tech-html { background: rgba(228, 77, 38, 0.15); color: #f06529; border: 1px solid rgba(228,77,38,0.3); }
.tech-pill.tech-css  { background: rgba(38, 77, 228, 0.15); color: #4a90d9; border: 1px solid rgba(38,77,228,0.3); }
.tech-pill.tech-mysql { background: rgba(0, 117, 143, 0.15); color: #00a8c8; border: 1px solid rgba(0,117,143,0.3); }

.project-github-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-heading);
  padding: 6px 14px;
  border-radius: 50px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--card-border);
  transition: var(--transition-smooth);
  white-space: nowrap;
  text-decoration: none;
}

.project-github-btn:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
  transform: translateY(-1px);
}


/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-tertiary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--accent-color);
  font-size: 1.2rem;
}

.contact-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.contact-value {
  font-weight: 600;
}

.contact-form {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 40px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
  background: var(--bg-primary);
  border: 1px solid var(--card-border);
  padding: 14px 18px;
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.15);
}

/* Input invalid state — shown after JS validation */
.form-group input.input-invalid,
.form-group textarea.input-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
}

/* Per-field inline error text */
.field-error {
  font-size: 0.8rem;
  color: #ef4444;
  font-family: var(--font-heading);
  min-height: 1em;
  margin-top: 4px;
  display: block;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.field-error.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Form-level status banner (success / error) */
.form-status {
  border-radius: 10px;
  padding: 0;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.35s ease, padding 0.35s ease, margin-bottom 0.35s ease;
}

.form-status.visible {
  max-height: 120px;
  opacity: 1;
  padding: 14px 18px;
  margin-bottom: 8px;
}

.form-status.status-success {
  background: rgba(110, 127, 69, 0.12);
  border: 1px solid rgba(110, 127, 69, 0.35);
  color: var(--success);
}

.form-status.status-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Submit button — sending/spinner state */
#form-submit-btn {
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth), opacity 0.2s;
}

#form-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

#form-submit-btn .btn-label {
  transition: opacity 0.2s ease;
}

#form-submit-btn .btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

#form-submit-btn.sending .btn-label {
  opacity: 0.6;
}

#form-submit-btn.sending .btn-spinner {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Technical Expertise Slider Styles */
.skills-drag-hint {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 8px 20px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-color);
  margin: -35px auto 40px auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(5px);
  z-index: 5;
}

.hand-drag-icon {
  animation: nudge-horizontal 2s infinite ease-in-out;
}

@keyframes nudge-horizontal {
  0%, 100% { transform: translateX(0) scale(1); }
  50% { transform: translateX(-4px) scale(1.08); }
}

.skills-slider-wrapper {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 50px auto 0 auto;
  min-height: 400px;
}

.skills-slider-viewport {
  width: 100%;
  overflow: hidden;
  border-radius: 24px; /* Matches category card radius */
}

.skills-slides-container {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
  width: 500%; /* 5 slides */
}

.skills-slide {
  width: 20%;
  padding: 0 15px;
  flex-shrink: 0;
}

.skills-category-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 40px;
  backdrop-filter: blur(10px);
  min-height: 380px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.3);
}

.skills-category-card h3 {
  font-size: 1.6rem;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.skills-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  background: rgba(30, 41, 66, 0.6);
  border: 1px solid var(--card-border);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-primary);
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-smooth);
}

.skills-slider-arrow:hover {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.4);
}

.skills-slider-arrow.arrow-left {
  left: -80px;
}

.skills-slider-arrow.arrow-right {
  right: -80px;
}

.skills-slider-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.skills-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.skills-dot.active {
  background: var(--accent-color);
  transform: scale(1.2);
  box-shadow: 0 0 8px var(--accent-color);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .skills-slider-arrow.arrow-left {
    left: 10px;
  }
  .skills-slider-arrow.arrow-right {
    right: 10px;
  }
  .hero-text h1 {
    font-size: 3rem;
  }
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .navbar {
    position: relative;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--card-border);
    flex-direction: column;
    padding: 30px;
    gap: 20px;
    display: none;
  }
  .nav-links.active {
    display: flex;
  }
  .menu-toggle {
    display: flex;
  }
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  .hero-text p {
    margin: 0 auto 40px auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-visual {
    order: -1;
  }
  .visual-box {
    width: 280px;
    height: 280px;
  }
}

/* Marquee Divider Styles */
.marquee-divider {
  overflow: hidden;
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  padding: 24px 0;
  white-space: nowrap;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  backdrop-filter: blur(8px);
}

.marquee-track {
  display: inline-block;
  animation: marqueeRun 35s linear infinite;
  padding-left: 100%;
}

.marquee-track span {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  opacity: 0.35;
  text-shadow: 0 0 8px rgba(var(--accent-rgb), 0.08);
}

@keyframes marqueeRun {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* Interactive 3D Perspective Card elements */
.project-scroll-card, .stacked-card, .skills-category-card {
  transition: transform 0.15s ease-out, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
}

@media (max-width: 768px) {
  .project-scroll-card {
    flex: 0 0 100%;
  }
}

/* Skills Slider dragging support */
.skills-slides-container {
  cursor: grab;
  user-select: none;
}
.skills-slides-container.active-drag {
  cursor: grabbing;
}

/* Skill detail popup (styled as contextual popover) */
.skill-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(19, 18, 17, 0.25);
  backdrop-filter: blur(3px);
  z-index: 100000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.skill-modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 24px;
  width: 320px;
  position: absolute;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  transform: scale(0.9) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  color: var(--text-primary);
  opacity: 0;
  pointer-events: none;
  z-index: 100001; /* Renders above overlay */
}

.skill-modal-card.active {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.skill-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.skill-modal-close:hover {
  color: var(--accent-color);
  transform: rotate(90deg);
}

.skill-modal-title {
  font-size: 1.4rem;
  font-family: var(--font-heading);
  margin-bottom: 4px;
  color: var(--text-primary);
  padding-right: 20px;
}

.skill-modal-level {
  font-size: 0.8rem;
  color: var(--accent-color);
  font-weight: 700;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.skill-progress-container {
  margin-bottom: 20px;
}

.skill-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.skill-progress-bg {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  overflow: hidden;
}

.skill-progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent-gradient);
  border-radius: 10px;
  transition: width 1s cubic-bezier(0.1, 0.8, 0.3, 1);
}

.skill-modal-projects-title {
  font-size: 0.9rem;
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.skill-modal-projects {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ======================================
   SCROLL CHARACTER COMPANION
   ====================================== */

#scroll-character {
  position: fixed;
  bottom: 0;
  right: 24px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 150px;
  transform: translateY(100%);
  transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  user-select: none;
}

#scroll-character.char-visible {
  transform: translateY(0);
}

/* ---- Speech Bubble ---- */
.char-bubble {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: 16px 16px 16px 4px;
  padding: 8px 14px;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(6px) scale(0.9);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
  pointer-events: none;
}

#scroll-character.char-visible .char-bubble {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ---- Character Figure Wrapper ---- */
.char-figure {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.char-figure img {
  width: 150px;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.18));
  transition: transform 0.5s cubic-bezier(0.34, 1.2, 0.64, 1),
              filter 0.4s ease;
  transform-origin: bottom center;
}

/* ---- Ground Shadow ---- */
.char-shadow {
  width: 80px;
  height: 12px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.18) 0%, transparent 80%);
  border-radius: 50%;
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  transition: width 0.4s ease, opacity 0.4s ease;
}

/* ======================================
   CHARACTER STATE ANIMATIONS
   ====================================== */

/* --- IDLE: gentle floating bob --- */
@keyframes char-idle-float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  30%       { transform: translateY(-10px) rotate(-1.5deg); }
  60%       { transform: translateY(-5px) rotate(1deg); }
}

.char-state-idle .char-figure img {
  animation: char-idle-float 4s ease-in-out infinite;
}

.char-state-idle .char-shadow {
  animation: char-shadow-idle 4s ease-in-out infinite;
}

@keyframes char-shadow-idle {
  0%, 100% { width: 80px; opacity: 0.7; }
  30%       { width: 55px; opacity: 0.35; }
  60%       { width: 65px; opacity: 0.5; }
}

/* --- WAVE: excited side shake --- */
@keyframes char-wave {
  0%   { transform: rotate(0deg) translateX(0); }
  10%  { transform: rotate(-6deg) translateX(-4px); }
  25%  { transform: rotate(8deg) translateX(5px) translateY(-6px); }
  40%  { transform: rotate(-6deg) translateX(-3px) translateY(-8px); }
  55%  { transform: rotate(7deg) translateX(4px) translateY(-6px); }
  70%  { transform: rotate(-4deg) translateX(-2px) translateY(-3px); }
  85%  { transform: rotate(3deg) translateX(1px); }
  100% { transform: rotate(0deg) translateX(0); }
}

.char-state-wave .char-figure img {
  animation: char-wave 1.4s ease-in-out infinite;
}

/* --- WORK: lean forward / typing focus --- */
@keyframes char-work {
  0%, 100% { transform: rotateX(0deg) translateY(0) scale(1); }
  40%       { transform: rotateX(8deg) translateY(6px) scale(0.97); }
  70%       { transform: rotateX(5deg) translateY(4px) scale(0.98); }
}

.char-state-work .char-figure img {
  animation: char-work 2s ease-in-out infinite;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.25));
}

/* --- POINT: lean left and tilt, pointing at the content --- */
@keyframes char-point {
  0%, 100% { transform: translateX(0) rotate(0deg) scale(1); }
  35%       { transform: translateX(-12px) rotate(-8deg) scale(1.05); }
  65%       { transform: translateX(-8px) rotate(-5deg) scale(1.03); }
}

.char-state-point .char-figure img {
  animation: char-point 2.2s ease-in-out infinite;
}

/* --- LOOK: curious tilt and scale up slightly --- */
@keyframes char-look {
  0%, 100% { transform: rotate(0deg) scale(1); }
  20%       { transform: rotate(-4deg) scale(1.05) translateY(-5px); }
  50%       { transform: rotate(3deg) scale(1.08) translateY(-8px); }
  75%       { transform: rotate(-2deg) scale(1.05) translateY(-4px); }
}

.char-state-look .char-figure img {
  animation: char-look 3s ease-in-out infinite;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.22));
}

/* --- BYE: wave and drift --- */
@keyframes char-bye {
  0%   { transform: translateX(0) rotate(0deg); }
  20%  { transform: translateX(-6px) rotate(-5deg) translateY(-4px); }
  45%  { transform: translateX(8px) rotate(6deg) translateY(-8px); }
  65%  { transform: translateX(-4px) rotate(-4deg) translateY(-5px); }
  80%  { transform: translateX(5px) rotate(4deg) translateY(-2px); }
  100% { transform: translateX(0) rotate(0deg); }
}

.char-state-bye .char-figure img {
  animation: char-bye 1.8s ease-in-out infinite;
}

/* ---- Bubble text swap animation ---- */
@keyframes bubble-pop {
  0%   { transform: scale(0.85); opacity: 0; }
  60%  { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.char-bubble-pop {
  animation: bubble-pop 0.4s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}

/* ---- Hide on mobile ---- */
@media (max-width: 900px) {
  #scroll-character {
    display: none;
  }
}
