/* ============================================================
   PORTFOLIO – Anupol Kullasut
   White Theme, Premium Design
   ============================================================ */

/* 1. CSS Variables & Reset
   ============================================================ */
:root {
  --white: #ffffff;
  --off-white: #f8f9fc;
  --gray-50: #f3f4f8;
  --gray-100: #e8eaf2;
  --gray-200: #d1d5e8;
  --gray-400: #9094b0;
  --gray-600: #5a5f7d;
  --gray-800: #2d3050;
  --gray-900: #1a1d35;

  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --primary-pale: #eef0ff;
  --primary-pale2: #e0e2ff;

  --accent: #06b6d4;
  --accent-light: #22d3ee;
  --accent-pale: #ecfeff;

  --success: #10b981;
  --success-pale: #ecfdf5;

  --shadow-sm: 0 1px 3px rgba(99,102,241,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(99,102,241,0.12), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg: 0 12px 40px rgba(99,102,241,0.15), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-xl: 0 24px 64px rgba(99,102,241,0.18), 0 8px 24px rgba(0,0,0,0.08);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;

  --nav-height: 70px;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--gray-800);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--primary-pale2);
  color: var(--primary-dark);
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* 2. Navigation
   ============================================================ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  transition: background var(--transition), box-shadow var(--transition), backdrop-filter var(--transition);
}

#navbar.scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--gray-100), var(--shadow-sm);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

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

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-link {
  display: block;
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-600);
  border-radius: var(--radius-full);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: var(--primary-pale);
}

.nav-cta {
  flex-shrink: 0;
  padding: 0.5rem 1.25rem;
  background: var(--primary);
  color: var(--white) !important;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: 0 2px 8px rgba(99,102,241,0.35);
}

.nav-cta:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(99,102,241,0.45);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-800);
  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); }

/* 3. Hero Section
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--white) 0%, var(--off-white) 50%, var(--primary-pale) 100%);
  padding: var(--nav-height) 0 4rem;
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
}

.shape-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  animation: floatShape 8s ease-in-out infinite;
}

.shape-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(6,182,212,0.12) 0%, transparent 70%);
  bottom: 0;
  left: -50px;
  animation: floatShape 10s ease-in-out infinite reverse;
}

.shape-3 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(16,185,129,0.1) 0%, transparent 70%);
  top: 50%;
  left: 40%;
  animation: floatShape 12s ease-in-out infinite;
}

@keyframes floatShape {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -30px) scale(1.05); }
  66% { transform: translate(-15px, 20px) scale(0.95); }
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  position: relative;
  z-index: 1;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--success-pale);
  border: 1.5px solid rgba(16,185,129,0.3);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--success);
  width: fit-content;
  animation: fadeInUp 0.6s var(--transition) both;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  animation: fadeInUp 0.6s 0.1s var(--transition) both;
}

.name-line { display: block; color: var(--gray-900); }
.name-line.accent { color: var(--primary); }

.hero-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gray-600);
  letter-spacing: 0.01em;
  animation: fadeInUp 0.6s 0.2s var(--transition) both;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--gray-400);
  line-height: 1.7;
  max-width: 460px;
  animation: fadeInUp 0.6s 0.3s var(--transition) both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s 0.4s var(--transition) both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(99,102,241,0.4);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99,102,241,0.5);
}

.btn-outline {
  background: var(--white);
  color: var(--gray-700, #374151);
  border: 2px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hero-social {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s 0.5s var(--transition) both;
}

.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--gray-600);
  font-weight: 500;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-family: var(--font-sans);
}

.social-chip:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Copy hint text inside contact labels */
.copy-hint {
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--gray-400);
  opacity: 0.8;
}

/* Toast notification for copy feedback */
.copy-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--gray-900);
  color: var(--white);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font-sans);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-xl);
}

.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* Avatar / Visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInRight 0.8s 0.2s var(--transition) both;
}

.avatar-wrapper {
  position: relative;
  width: 380px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px dashed var(--gray-200);
  animation: spinSlow 20s linear infinite;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.avatar-container {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-pale) 0%, var(--primary-pale2) 100%);
  border: 4px solid var(--white);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.4s ease;
}

.avatar-photo:hover {
  transform: scale(1.05);
}


.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-800);
  white-space: nowrap;
}

.fc-icon { font-size: 1.1rem; }

.fc-1 { top: 30px; right: 10px; animation: floatCard 4s ease-in-out infinite; }
.fc-2 { bottom: 50px; right: -10px; animation: floatCard 5s ease-in-out infinite 1s; }
.fc-3 { bottom: 30px; left: 10px; animation: floatCard 6s ease-in-out infinite 0.5s; }

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

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-400);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeIn 1s 1s both;
}

.scroll-line {
  width: 1.5px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--gray-400));
  border-radius: 1px;
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* 4. Sections Common
   ============================================================ */
.section {
  padding: 6rem 0;
}

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

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  padding: 0.3rem 1rem;
  background: var(--primary-pale);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section-subtitle {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--gray-400);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* 5. About Section
   ============================================================ */
.about { background: var(--white); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--gray-600);
  margin-bottom: 1.25rem;
  font-size: 1rem;
  line-height: 1.75;
}

.about-text strong { color: var(--gray-900); font-weight: 600; }

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.stat-card {
  background: var(--off-white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all var(--transition);
  cursor: default;
}



.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-weight: 500;
}

.about-info-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--off-white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-lg);
  transition: none;
}

.info-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--primary-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.info-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.info-value {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-800);
}

/* 6. Skills Section
   ============================================================ */
.skills { background: var(--off-white); }

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.skill-category {
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  transition: none;
}

.skill-cat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.skill-cat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--primary-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.skill-cat-header h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-900);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-100);
  color: var(--gray-600);
  transition: none;
  cursor: default;
}

.skill-tag.primary {
  background: var(--primary-pale);
  border-color: var(--primary-pale2);
  color: var(--primary-dark);
}

.skill-tag.accent {
  background: var(--accent-pale);
  border-color: rgba(6,182,212,0.3);
  color: #0e7490;
}

/* 7. Experience Section
   ============================================================ */
.experience { background: var(--white); }

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

.timeline::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary) 0%, var(--accent) 100%);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-left: 3.5rem;
}

.timeline-dot {
  position: absolute;
  left: 6px;
  top: 1.5rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--primary), var(--shadow-sm);
}

.project-card {
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: none;
  box-shadow: var(--shadow-sm);
}

.project-header {
  padding: 1.75rem 2rem 1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1.5px solid var(--gray-50);
}

.project-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.project-badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-badge.web { background: var(--primary-pale); color: var(--primary-dark); }
.project-badge.game { background: #fef3c7; color: #92400e; }
.project-badge.featured { background: var(--accent-pale); color: #0e7490; }
.project-badge.mini { background: #f5f3ff; color: #6d28d9; }
.project-badge.activity { background: #dcfce7; color: #166534; }

.project-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.4rem;
}

.project-org {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--gray-400);
  font-weight: 500;
}

.project-period {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-pale);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.project-body {
  padding: 1.5rem 2rem;
}

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

.project-achievements li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.65;
}

.project-achievements li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 0.8rem;
  top: 0.1em;
}

.project-achievements strong { color: var(--gray-800); font-weight: 600; }

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

.tech-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-600);
}

.project-achievements code {
  display: inline-block;
  padding: 0.1em 0.45em;
  background: var(--primary-pale);
  border: 1px solid var(--primary-pale2);
  border-radius: 5px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82em;
  color: var(--primary-dark);
  font-weight: 600;
}

.project-description {
  font-size: 0.92rem;
  color: var(--gray-600);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

/* 8. Education Section
   ============================================================ */
.education { background: var(--off-white); }

.edu-card {
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  transition: none;
}

.edu-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-pale) 0%, var(--primary-pale2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.edu-content { flex: 1; }

.edu-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.edu-degree {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.3rem;
}

.edu-university {
  font-size: 0.9rem;
  color: var(--gray-400);
  font-weight: 500;
}

.edu-period {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-pale);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.edu-courses h4 {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.course-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.course-tag {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  background: var(--off-white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: none;
  cursor: default;
}

/* 9. Contact Section
   ============================================================ */
.contact { background: var(--white); }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--off-white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-xl);
  transition: all var(--transition);
  cursor: pointer;
  font-family: var(--font-sans);
  text-align: left;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.contact-card:not(.no-link):hover {
  border-color: var(--primary-light);
  background: var(--primary-pale);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.contact-card.no-link { cursor: default; }

.contact-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
  transition: all var(--transition);
}

.contact-card:not(.no-link):hover .contact-card-icon {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.contact-card-body { flex: 1; }

.contact-card-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.contact-card-value {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-800);
}

.contact-arrow {
  color: var(--gray-300);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.contact-card:not(.no-link):hover .contact-arrow {
  color: var(--primary);
  transform: translateX(4px);
}

/* 10. Footer
   ============================================================ */
.footer {
  background: var(--gray-900);
  padding: 3rem 2rem;
  text-align: center;
}

.footer-container {
  max-width: 600px;
  margin: 0 auto;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.footer-logo .dot { color: var(--primary-light); }

.footer-text {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.35rem;
}

.footer-sub {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
}

/* 11. Animations
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* 12. Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .hero-container { gap: 2.5rem; }
  .avatar-wrapper { width: 300px; height: 300px; }
  .avatar-container { width: 180px; height: 180px; }
  .about-grid { gap: 2.5rem; }
}

@media (max-width: 768px) {
  :root { --nav-height: 60px; }

  .nav-links { 
    display: none; 
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    border-bottom: 1px solid var(--gray-100);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-link { padding: 0.75rem 1rem; border-radius: var(--radius-md); }
  .nav-cta { display: none; }
  .hamburger { display: flex; }

  .hero { padding-top: var(--nav-height); }
  .hero-container { 
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .hero-visual { order: -1; }
  .avatar-wrapper { width: 220px; height: 220px; }
  .avatar-container { width: 140px; height: 140px; }
  .fc-1 { top: 0; right: -20px; }
  .fc-2 { bottom: 0; right: -20px; }
  .fc-3 { bottom: 0; left: -20px; }
  .hero-badge, .hero-actions, .hero-social { justify-content: center; }
  .hero-subtitle { margin: 0 auto; }

  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-stats { grid-template-columns: repeat(3, 1fr); }

  .skills-grid { grid-template-columns: 1fr; }

  .project-header { flex-direction: column; gap: 0.75rem; }
  .project-period { align-self: flex-start; }

  .edu-card { flex-direction: column; gap: 1rem; }
  .edu-header { flex-direction: column; gap: 0.5rem; }
  .edu-period { align-self: flex-start; }

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

  .section { padding: 4rem 0; }
}

@media (max-width: 480px) {
  .hero-name { font-size: 2.4rem; }
  .about-stats { grid-template-columns: 1fr; }
  .floating-card { display: none; }
}

/* ============================================================
   Screenshot Gallery & Lightbox
   ============================================================ */

/* Gallery label */
.screenshots-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin: 1.25rem 0 0.75rem;
}

/* Grid of screenshots */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.screenshots-single {
  grid-template-columns: 1fr;
  max-width: 560px;
}

/* Individual screenshot thumbnail */
.screenshot-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 16 / 9;
  background: var(--gray-50);
}

.screenshot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hover overlay */
.screenshot-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: inherit;
}

.screenshot-overlay svg {
  filter: none;
}

.screenshot-item:hover .screenshot-overlay {
  opacity: 1;
}

/* ── Lightbox ── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(245, 246, 252, 0.96);
  backdrop-filter: blur(16px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  animation: lightboxIn 0.35s cubic-bezier(0.4,0,0.2,1) both;
}

@keyframes lightboxIn {
  from { transform: scale(0.88) translateY(24px); opacity: 0; }
  to   { transform: scale(1)    translateY(0);    opacity: 1; }
}

.lightbox-content img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
  object-fit: contain;
  display: block;
}

.lightbox-caption {
  color: var(--gray-600);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-align: center;
  margin: 0;
}

.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray-800);
  transition: background var(--transition), transform var(--transition);
}

.lightbox-close:hover {
  background: var(--gray-200);
  transform: rotate(90deg);
}

@media (max-width: 640px) {
  .screenshots-grid { grid-template-columns: 1fr; }
}
