/* ==========================================================================
   PORTFOLIO DESIGN SYSTEM & STYLESHEET
   Wuttinon Chokmoa | Web Developer & UI/UX Designer
   ========================================================================== */

:root {
  /* Dark Theme (Default) */
  --bg-primary: #0a0d14;
  --bg-secondary: #111726;
  --bg-card: rgba(19, 26, 43, 0.75);
  --bg-card-hover: rgba(28, 38, 64, 0.9);
  --bg-glass: rgba(15, 23, 42, 0.75);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(249, 115, 22, 0.45);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Brand Accents */
  --accent-orange: #f97316;
  --accent-amber: #f59e0b;
  --accent-gradient: linear-gradient(135deg, #f97316 0%, #fb923c 50%, #f59e0b 100%);
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 35px -5px rgba(249, 115, 22, 0.25);
  --shadow-purple-glow: 0 0 35px -5px rgba(139, 92, 246, 0.25);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --bg-glass: rgba(255, 255, 255, 0.85);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-glow: rgba(249, 115, 22, 0.4);
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 10px 30px -5px rgba(249, 115, 22, 0.15);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Prompt', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Ambient glowing orbs */
.bg-ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.16;
  will-change: transform;
}

.ambient-orb-1 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #f97316 0%, transparent 70%);
  top: -120px;
  right: -60px;
}

.ambient-orb-2 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
  bottom: 10%;
  left: -120px;
}

.ambient-orb-3 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
  top: 45%;
  right: 12%;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */
.header-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--accent-orange);
  object-fit: cover;
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.4);
}

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

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

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  position: relative;
  padding: 0.25rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-orange);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  transition: all var(--transition-fast);
  font-weight: 700;
  font-size: 0.85rem;
}

.btn-icon:hover {
  color: var(--text-main);
  border-color: var(--accent-orange);
  transform: translateY(-1px);
}

.btn-nav-resume {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.15rem;
  background: var(--accent-gradient);
  color: #fff;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-glow);
  transition: all var(--transition-normal);
}

.btn-nav-resume:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.5);
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

/* Mobile Nav Drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  width: 100%;
  height: calc(100vh - 72px);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  padding: 2rem 1.5rem;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 99;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav-link {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  color: var(--accent-orange);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding: 5rem 0 4rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  width: fit-content;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.15);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
  animation: pulseAnimation 2s infinite;
}

@keyframes pulseAnimation {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

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

.hero-subtitle {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--accent-amber);
  margin-top: -0.5rem;
}

.hero-bio {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  background: var(--accent-gradient);
  color: #fff;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  box-shadow: var(--shadow-glow);
  transition: all var(--transition-normal);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(249, 115, 22, 0.5);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-normal);
}

.btn-secondary:hover {
  border-color: var(--accent-orange);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: 1rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  font-weight: 500;
}

/* Hero Visual Card */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-wrapper {
  position: relative;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  padding: 10px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.8), rgba(245, 158, 11, 0.2), rgba(139, 92, 246, 0.8));
  box-shadow: var(--shadow-glow), 0 20px 40px rgba(0, 0, 0, 0.4);
}

.avatar-wrapper::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #8b5cf6);
  z-index: -1;
  filter: blur(14px);
  opacity: 0.6;
}

.hero-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #0a0d14;
}

/* Floating Tech Pills */
.floating-pill {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  color: var(--text-main);
  animation: floatAnim 4s ease-in-out infinite;
  white-space: nowrap;
}

.floating-pill-1 {
  top: 10px;
  left: -20px;
  animation-delay: 0s;
  border-color: rgba(6, 182, 212, 0.4);
}

.floating-pill-2 {
  bottom: 25px;
  left: -30px;
  animation-delay: 1.5s;
  border-color: rgba(139, 92, 246, 0.4);
}

.floating-pill-3 {
  top: 40px;
  right: -30px;
  animation-delay: 2.2s;
  border-color: rgba(249, 115, 22, 0.4);
}

.floating-pill-4 {
  bottom: 10px;
  right: -10px;
  animation-delay: 3s;
  border-color: rgba(34, 197, 94, 0.4);
}

@keyframes floatAnim {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ==========================================================================
   SECTION COMMON STYLES
   ========================================================================== */
section {
  padding: 5rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.25);
  color: var(--accent-orange);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(249, 115, 22, 0.15);
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.feature-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   PROJECTS SECTION
   ========================================================================== */
.project-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.55rem 1.35rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-main);
  border-color: var(--accent-orange);
}

.filter-btn.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 15px rgba(249, 115, 22, 0.4);
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

/* Project Card Layout with Cursor Spotlight */
.project-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.project-card.highlight-focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 30px rgba(249, 115, 22, 0.6);
  transform: scale(1.02);
}

.project-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--accent-gradient);
  opacity: 0.8;
}

.project-preview {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #060910;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
}

.project-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card:hover .project-preview img {
  transform: scale(1.03);
}

/* Habit Battle Phone Mockup */
.phone-mockup-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #181528, #2a1b40);
  padding: 1.5rem;
}

.phone-mockup {
  width: 220px;
  height: 380px;
  border: 8px solid #2d2b42;
  border-radius: 36px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  background: #0f0c1b;
}

.phone-mockup::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 8px;
  background: #2d2b42;
  border-radius: 4px;
  z-index: 10;
}

.phone-mockup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Quiz Realm Card Preview */
.quiz-realm-preview {
  position: relative;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #2e1065 0%, #0f172a 80%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
}

.quiz-realm-logo {
  max-width: 200px;
  filter: drop-shadow(0 0 15px rgba(249, 115, 22, 0.6));
  z-index: 2;
  margin-bottom: 1rem;
}

.quiz-char-sprite {
  width: 140px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.8));
  z-index: 2;
  animation: floatAnim 3s ease-in-out infinite;
}

.quiz-icons-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  z-index: 2;
}

.quiz-mini-icon {
  width: 32px;
  height: 32px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Project Card Info */
.project-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.project-badge {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-orange);
  background: rgba(249, 115, 22, 0.12);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
}

.project-year {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dim);
  background: var(--bg-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
}

.project-name {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.project-description {
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.project-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.project-points li {
  font-size: 0.92rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  line-height: 1.5;
}

.project-points li::before {
  content: '✦';
  color: var(--accent-orange);
  font-size: 0.9rem;
  margin-top: 2px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.tech-tag {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tech-tag:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
  transform: translateY(-1px);
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn-case-study {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  background: var(--accent-gradient);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
  transition: all var(--transition-fast);
}

.btn-case-study:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
}

.btn-demo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.92rem;
  transition: all var(--transition-fast);
}

.btn-demo-link:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
  transform: translateY(-2px);
}

/* ==========================================================================
   INTERACTIVE GAMIFICATION TEASER (QUIZ REALM MINI-GAME)
   ========================================================================== */
.quiz-teaser-section {
  padding: 4rem 0;
}

.quiz-teaser-card {
  background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.15), rgba(19, 26, 43, 0.9));
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-purple-glow);
  position: relative;
  overflow: hidden;
}

.quiz-teaser-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.quiz-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-full);
  font-weight: 700;
  color: #fbbf24;
}

.quiz-questions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.quiz-item-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.quiz-item-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.quiz-option-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.quiz-option-label:hover {
  border-color: var(--accent-orange);
  background: var(--bg-card-hover);
}

.quiz-option-label.correct {
  border-color: #22c55e !important;
  background: rgba(34, 197, 94, 0.15) !important;
  color: #4ade80 !important;
}

.quiz-option-label.wrong {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
}

.quiz-submit-btn-wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.quiz-result-msg {
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-amber);
}

/* ==========================================================================
   SKILLS SECTION
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.skill-category-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: all var(--transition-normal);
}

.skill-category-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.skill-cat-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.skill-cat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(249, 115, 22, 0.15);
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.skill-cat-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.skill-items-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skill-pill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.skill-pill-item:hover {
  border-color: var(--accent-orange);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.skill-name-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
}

.skill-level-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(249, 115, 22, 0.15);
  color: var(--accent-orange);
}

/* Spoken Languages Box */
.spoken-languages-card {
  grid-column: 1 / -1;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.spoken-lang-items {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.spoken-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.spoken-flag {
  font-size: 1.5rem;
}

.spoken-detail {
  display: flex;
  flex-direction: column;
}

.spoken-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.spoken-level {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   EDUCATION & REFERENCE SECTION
   ========================================================================== */
.edu-ref-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 7px;
  width: 2px;
  background: linear-gradient(to bottom, #f97316, #8b5cf6, transparent);
}

.timeline-item {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all var(--transition-normal);
}

.timeline-item:hover {
  border-color: var(--border-glow);
  transform: translateX(4px);
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 1.5rem;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent-orange);
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.8);
}

.timeline-year {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-orange);
  background: rgba(249, 115, 22, 0.12);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.timeline-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.timeline-inst {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-amber);
  margin-bottom: 0.75rem;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Reference Card */
.reference-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.reference-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.2) 0%, transparent 70%);
  filter: blur(20px);
}

.ref-tag {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-orange);
  margin-bottom: 0.75rem;
}

.ref-quote-icon {
  font-size: 2.5rem;
  color: rgba(249, 115, 22, 0.3);
  line-height: 1;
  margin-bottom: 1rem;
}

.ref-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.ref-role {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.ref-contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.ref-contact-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.ref-contact-row a {
  color: var(--accent-orange);
  font-weight: 600;
}

.ref-contact-row a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3rem;
  align-items: flex-start;
}

.contact-info-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.contact-item-card:hover {
  border-color: var(--accent-orange);
  transform: translateY(-2px);
}

.contact-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(249, 115, 22, 0.15);
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.contact-card-content {
  flex-grow: 1;
}

.contact-card-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 600;
}

.contact-card-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  word-break: break-all;
}

.contact-card-btn {
  padding: 0.4rem 0.85rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.contact-card-btn:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

/* Contact Quick Form */
.contact-form-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
}

.contact-form-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

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

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

.form-input, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-fast);
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.2);
}

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

.btn-form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem;
  background: var(--accent-gradient);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: var(--shadow-glow);
  transition: all var(--transition-normal);
}

.btn-form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(249, 115, 22, 0.5);
}

/* ==========================================================================
   FOOTER & BACK TO TOP
   ========================================================================== */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-copy {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.btn-back-top {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-back-top:hover {
  color: var(--accent-orange);
  border-color: var(--accent-orange);
}

/* Floating Back-To-Top Button */
.floating-back-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  color: var(--accent-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
  z-index: 90;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all var(--transition-normal);
}

.floating-back-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.floating-back-top:hover {
  background: var(--accent-orange);
  color: #fff;
  transform: translateY(-3px);
}

/* ==========================================================================
   MODAL SYSTEMS (RESUME, CASE STUDIES & LIVE IFRAME PREVIEW)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.modal-backdrop.active {
  display: flex;
  opacity: 1;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  transform: translateY(20px) scale(0.98);
  transition: all var(--transition-normal);
}

.modal-backdrop.active .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  z-index: 10;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  color: #fff;
  background: #ef4444;
  border-color: #ef4444;
}

.modal-body {
  padding: 1.75rem;
}

/* Resume Modal Specifics */
.resume-modal-dialog {
  max-width: 800px;
}

.resume-preview-img {
  width: 100%;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--border-subtle);
}

/* Habit Battle Interactive Mockup in Modal */
.habit-mockup-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: center;
}

.habit-phone-frame {
  width: 100%;
  max-width: 280px;
  height: 520px;
  border: 10px solid #2d2b42;
  border-radius: 42px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  background: #0f0c1b;
  margin: 0 auto;
}

.habit-phone-frame::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 10px;
  background: #2d2b42;
  border-radius: 5px;
  z-index: 10;
}

.habit-phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s ease;
}

.habit-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.habit-tab-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  text-align: left;
}

.habit-tab-btn:hover {
  border-color: var(--accent-orange);
  color: var(--text-main);
}

.habit-tab-btn.active {
  background: rgba(249, 115, 22, 0.15);
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

/* Project Detail Modal Gallery */
.modal-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.modal-gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #000;
  max-height: 220px;
}

.modal-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-fast);
}

.modal-gallery-item:hover img {
  transform: scale(1.05);
}

/* ==========================================================================
   LIVE IFRAME PREVIEW MODAL WITH DEVICE TOGGLES
   ========================================================================== */
.live-preview-modal-dialog {
  max-width: 1100px;
  height: 90vh;
  display: flex;
  flex-direction: column;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.75rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.preview-viewport-controls {
  display: flex;
  gap: 0.5rem;
}

.preview-viewport-btn {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.preview-viewport-btn:hover {
  border-color: var(--accent-orange);
  color: var(--text-main);
}

.preview-viewport-btn.active {
  background: var(--accent-orange);
  color: #fff;
  border-color: var(--accent-orange);
}

.preview-iframe-wrapper {
  flex-grow: 1;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1rem;
}

.preview-iframe-container {
  width: 100%;
  height: 100%;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.preview-iframe-container.viewport-tablet {
  width: 768px;
  height: 90%;
  border: 4px solid #334155;
  border-radius: 16px;
}

.preview-iframe-container.viewport-mobile {
  width: 375px;
  height: 92%;
  border: 6px solid #334155;
  border-radius: 28px;
}

.preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 0.85rem 1.5rem;
  background: #22c55e;
  color: #fff;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(34, 197, 94, 0.4);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-normal);
  pointer-events: none;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }
  
  .hero-content {
    align-items: center;
  }
  
  .hero-bio {
    margin: 0 auto;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .project-card {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.75rem;
  }
  
  .quiz-questions-grid {
    grid-template-columns: 1fr;
  }
  
  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .edu-ref-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .habit-mockup-container {
    grid-template-columns: 1fr;
  }
  
  .habit-phone-frame {
    height: 420px;
  }
}

@media (max-width: 768px) {
  .nav-links, .btn-nav-resume {
    display: none;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .hero-title {
    font-size: 2.3rem;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
  }
  
  .about-features {
    grid-template-columns: 1fr;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .spoken-languages-card {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .spoken-lang-items {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Print Styles */
@media print {
  .header-nav, .bg-ambient, .hero-actions, .project-filters, .project-actions, .contact-form-card, .footer, .btn-icon, .modal-backdrop, .quiz-teaser-section, .floating-back-top {
    display: none !important;
  }
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .project-card, .skill-category-card, .timeline-item, .reference-card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
}
