/* =====================================================
   PORTFOLIO — ศราวุฒิ สุภูตัง
   Light Theme — Premium Professional Design
   v2.0 with enhanced interactions
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== CSS VARIABLES — Light Theme ===== */
:root {
  /* Backgrounds */
  --bg-primary:     #f8faff;
  --bg-secondary:   #eef2ff;
  --bg-white:       #ffffff;
  --bg-card:        #ffffff;
  --bg-card-hover:  #f0f4ff;

  /* Borders */
  --border:         rgba(79,70,229,0.12);
  --border-hover:   rgba(79,70,229,0.35);
  --border-strong:  rgba(79,70,229,0.2);

  /* Accent Colors */
  --accent:         #4f46e5;
  --accent-light:   #6366f1;
  --accent-dark:    #3730a3;
  --accent-cyan:    #0891b2;
  --accent-cyan-lt: #06b6d4;
  --accent-green:   #059669;
  --accent-green-lt:#10b981;
  --accent-purple:  #7c3aed;
  --accent-orange:  #d97706;
  --accent-rose:    #e11d48;

  /* Text */
  --text-primary:   #1e1b4b;
  --text-secondary: #4338ca;
  --text-body:      #374151;
  --text-muted:     #6b7280;
  --text-light:     #9ca3af;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(79,70,229,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(79,70,229,0.12), 0 2px 6px rgba(0,0,0,0.05);
  --shadow-lg:  0 10px 40px rgba(79,70,229,0.15), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-glow:0 0 40px rgba(79,70,229,0.2);
  --shadow-card:0 2px 20px rgba(79,70,229,0.1);

  /* Radii */
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
  --font-th: 'Prompt', sans-serif;
  --font-en: 'Inter', sans-serif;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-th);
  background: var(--bg-primary);
  color: var(--text-body);
  line-height: 1.7;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 99px; }

/* ===== CURSOR GLOW ===== */
.cursor-glow {
  pointer-events: none;
  position: fixed;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,70,229,0.07) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  z-index: 0;
  transition: opacity 0.3s;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(248,250,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 0.6rem 0;
}
.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 800;
  font-family: var(--font-en);
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}
.logo-text {
  font-size: 1rem; font-weight: 600;
  color: var(--text-primary);
}
.nav-menu { display: flex; gap: 0.2rem; }
.nav-link {
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: var(--transition);
  font-weight: 500;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: var(--accent);
  background: rgba(79,70,229,0.08);
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 7rem 1.5rem 5rem;
  text-align: center;
  background: linear-gradient(160deg, #f8faff 0%, #eef2ff 40%, #e0e7ff 100%);
}
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
/* Animated mesh grid */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79,70,229,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,70,229,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: grid-shift 20s linear infinite;
}
@keyframes grid-shift {
  0% { transform: translateY(0); }
  100% { transform: translateY(40px); }
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  animation: orb-float 10s ease-in-out infinite;
}
.orb-1 { width: 500px; height: 500px; background: rgba(79,70,229,0.12); top: -150px; right: -100px; animation-delay: 0s; }
.orb-2 { width: 350px; height: 350px; background: rgba(6,182,212,0.1); bottom: -80px; left: -80px; animation-delay: -4s; }
.orb-3 { width: 280px; height: 280px; background: rgba(124,58,237,0.09); top: 40%; left: 20%; animation-delay: -7s; }
@keyframes orb-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-40px) scale(1.08); }
}

.hero-content { position: relative; z-index: 1; max-width: 740px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  border: 1.5px solid rgba(5,150,105,0.35);
  border-radius: 99px;
  font-size: 0.82rem;
  color: var(--accent-green);
  background: rgba(5,150,105,0.08);
  margin-bottom: 1.6rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}
.badge-dot {
  width: 7px; height: 7px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(5,150,105,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(5,150,105,0); }
}
.hero-name {
  font-size: clamp(2.2rem, 5.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.hero-name span {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-cyan-lt) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-title-wrap {
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 1.3rem;
  min-height: 2.2rem;
}
.typing-text { color: var(--accent); font-weight: 600; }
.typing-cursor { color: var(--accent); animation: blink 1s step-end infinite; }
@keyframes blink { 0%,100%{opacity:1}50%{opacity:0} }

.hero-desc {
  font-size: 1.02rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}
.hero-desc strong { color: var(--accent-cyan); font-weight: 600; }
.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 1.4rem 2rem;
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  display: inline-flex;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}
.stat-num {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-en);
  color: var(--accent);
  line-height: 1;
}
.stat-plus { color: var(--accent-cyan); font-size: 1.2rem; font-weight: 800; display: inline; }
.stat-label { font-size: 0.74rem; color: var(--text-muted); white-space: nowrap; font-weight: 500; }
.stat-divider { width: 1px; height: 36px; background: var(--border-strong); flex-shrink: 0; }
.hero-scroll {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column;
  align-items: center; gap: 0.4rem;
  color: var(--text-light);
  font-size: 0.73rem;
  animation: bounce 2.5s ease-in-out infinite;
}
@keyframes bounce {
  0%,100%{transform:translateX(-50%) translateY(0)}
  50%{transform:translateX(-50%) translateY(8px)}
}
.scroll-arrow {
  width: 18px; height: 18px;
  border-right: 2px solid var(--text-light);
  border-bottom: 2px solid var(--text-light);
  transform: rotate(45deg);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.7rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: var(--font-th);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: opacity 0.2s;
}
.btn:hover::after { opacity: 0.1; }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: white;
  box-shadow: 0 4px 20px rgba(79,70,229,0.35);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(79,70,229,0.45);
}
.btn-outline {
  background: var(--bg-white);
  color: var(--accent);
  border: 1.5px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(79,70,229,0.05);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.85rem; }

/* ===== SECTIONS ===== */
.section { padding: 6rem 0; }
.section-alt {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-tag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(79,70,229,0.08);
  border: 1px solid rgba(79,70,229,0.2);
  padding: 0.3rem 0.9rem;
  border-radius: 99px;
  margin-bottom: 0.8rem;
}
.section-title {
  font-family: var(--font-en);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.section-desc {
  margin-top: 0.8rem;
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.about-lead {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
}
.about-lead strong { color: var(--accent); }
.about-body { color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.8; }
.about-license { margin-bottom: 1.5rem; }
.license-badge {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, rgba(79,70,229,0.05), rgba(99,102,241,0.1));
  border: 1.5px solid rgba(79,70,229,0.2);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.license-badge svg { flex-shrink: 0; color: var(--accent); }
.license-title { display: block; font-weight: 700; font-size: 0.95rem; color: var(--text-primary); }
.license-sub { display: block; font-size: 0.78rem; color: var(--text-muted); }
.about-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.info-item svg { color: var(--accent); flex-shrink: 0; }
.hobbies-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 1.2rem; color: var(--text-primary); }
.hobbies-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.hobby-card {
  display: flex; flex-direction: column;
  align-items: center; gap: 0.5rem;
  padding: 1.4rem 1rem;
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  cursor: default;
}
.hobby-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  color: var(--accent);
}
.hobby-emoji { font-size: 2rem; }

/* ===== TIMELINE ===== */
.timeline { position: relative; padding-left: 2.5rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0.6rem; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-cyan-lt), rgba(79,70,229,0.1));
}
.timeline-item { position: relative; margin-bottom: 1.8rem; padding-bottom: 0.3rem; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -2.1rem; top: 0.35rem;
  width: 14px; height: 14px;
  background: var(--bg-white);
  border: 2.5px solid var(--text-light);
  border-radius: 50%;
}
.timeline-dot-active {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(79,70,229,0.15);
}
.timeline-dot-pulse::after {
  content: '';
  position: absolute;
  inset: -5px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  animation: timeline-pulse 2s ease-in-out infinite;
}
@keyframes timeline-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}
.timeline-content {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.3rem 1.5rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.timeline-content:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateX(5px);
}
.timeline-content-highlight {
  border-color: rgba(79,70,229,0.3);
  background: linear-gradient(135deg, rgba(79,70,229,0.03), rgba(99,102,241,0.06));
}
.timeline-period {
  font-size: 0.8rem;
  color: var(--accent);
  font-family: var(--font-en);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-weight: 600;
}
.duration-badge {
  background: rgba(79,70,229,0.1);
  color: var(--accent);
  border: 1px solid rgba(79,70,229,0.2);
  padding: 0.1rem 0.55rem;
  border-radius: 99px;
  font-size: 0.72rem;
}
.duration-badge-current {
  background: rgba(5,150,105,0.1);
  color: var(--accent-green);
  border-color: rgba(5,150,105,0.25);
}
.timeline-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.25rem; color: var(--text-primary); }
.timeline-sub { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.timeline-sub-small { font-size: 0.78rem; color: var(--text-light); margin-bottom: 0.8rem; }
.timeline-duties { margin-top: 0.8rem; display: flex; flex-direction: column; gap: 0.35rem; }
.timeline-duties li {
  font-size: 0.87rem;
  color: var(--text-muted);
  padding-left: 1.2rem;
  position: relative;
}
.timeline-duties li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 1rem;
  line-height: 1.4;
}
.current-badge-wrap { margin-top: 0.8rem; }
.current-badge {
  font-size: 0.82rem;
  color: var(--accent-green);
  background: rgba(5,150,105,0.08);
  border: 1px solid rgba(5,150,105,0.2);
  padding: 0.3rem 0.85rem;
  border-radius: 99px;
}

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
/* Center last card when odd total */
.skills-grid > .skill-category:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: 540px;
  margin: 0 auto;
  width: 100%;
}
.skill-category {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.skill-category:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.skill-cat-icon { font-size: 2rem; margin-bottom: 0.7rem; }
.skill-cat-title { font-size: 1rem; font-weight: 700; margin-bottom: 1.2rem; color: var(--text-primary); }
.skill-list { display: flex; flex-direction: column; gap: 0.85rem; }
.skill-item { display: flex; flex-direction: column; gap: 0.3rem; }
.skill-item span { font-size: 0.87rem; color: var(--text-body); font-weight: 500; }
.skill-bar {
  height: 7px;
  background: var(--bg-secondary);
  border-radius: 99px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-cyan-lt));
  border-radius: 99px;
  transition: width 1.3s cubic-bezier(0.4,0,0.2,1);
}
.skill-note {
  font-size: 0.74rem;
  color: var(--text-light);
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}
.cert-list { display: flex; flex-direction: column; gap: 0.7rem; }
.cert-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(79,70,229,0.04), rgba(99,102,241,0.08));
  border: 1.5px solid rgba(79,70,229,0.18);
  border-radius: var(--radius-md);
}
.cert-item svg { flex-shrink: 0; margin-top: 0.1rem; }
.cert-name { display: block; font-weight: 700; font-size: 0.92rem; color: var(--text-primary); }
.cert-by { display: block; font-size: 0.76rem; color: var(--text-muted); }

/* ===== PORTFOLIO ===== */
.project-card {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.2rem;
  margin-bottom: 2rem;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
/* Top accent strip */
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-cyan-lt));
  opacity: 0;
  transition: opacity 0.3s;
}
.project-card:hover::before { opacity: 1; }
.project-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.project-header {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
  align-items: flex-start;
}
.project-icon {
  width: 58px; height: 58px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-md);
}
.project-meta { flex: 1; }
.project-tag-row { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.project-tag {
  font-size: 0.72rem; font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.project-tag-blue { background: rgba(8,145,178,0.08); border-color: rgba(8,145,178,0.2); color: var(--accent-cyan); }
.project-tag-purple { background: rgba(124,58,237,0.08); border-color: rgba(124,58,237,0.2); color: var(--accent-purple); }
.project-tag-cyan { background: rgba(6,182,212,0.08); border-color: rgba(6,182,212,0.2); color: var(--accent-cyan); }
.project-tag-green { background: rgba(5,150,105,0.08); border-color: rgba(5,150,105,0.2); color: var(--accent-green); }
.project-tag-orange { background: rgba(217,119,6,0.08); border-color: rgba(217,119,6,0.2); color: var(--accent-orange); }
.project-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.4rem; color: var(--text-primary); }
.project-desc { font-size: 0.9rem; color: var(--text-muted); line-height: 1.7; }

.project-screenshot-wrap {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.3rem;
  margin-bottom: 1.2rem;
}
.project-screenshot-label {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.statement-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.sf-card {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.8rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.sf-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.sf-icon { font-size: 1.2rem; flex-shrink: 0; line-height: 1.5; }
.sf-content { flex: 1; }
.sf-content strong { display: block; font-size: 0.76rem; font-weight: 700; margin-bottom: 0.2rem; color: var(--text-primary); }
.sf-content p { font-size: 0.72rem; color: var(--text-muted); line-height: 1.5; }

.project-features { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.feature-tag {
  font-size: 0.8rem;
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-body);
}
.project-actions { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }
.built-with-badge {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.45rem 1rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
}

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.contact-info { display: flex; flex-direction: column; gap: 1rem; }
.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.3rem;
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.contact-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateX(5px);
}
.contact-icon {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, rgba(79,70,229,0.1), rgba(99,102,241,0.15));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.contact-label { font-size: 0.76rem; color: var(--text-light); margin-bottom: 0.2rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.contact-value { font-size: 0.95rem; color: var(--text-body); font-weight: 600; line-height: 1.5; transition: var(--transition); }
a.contact-value:hover { color: var(--accent); }

.cta-box {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 50%, var(--accent-cyan) 100%);
  border-radius: var(--radius-xl);
  padding: 2.2rem;
  text-align: center;
  height: 100%;
  display: flex; flex-direction: column; align-items: center;
  color: white;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute;
  top: -50%; right: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 70% 30%, rgba(255,255,255,0.1), transparent 60%);
}
.cta-emoji { font-size: 2.5rem; margin-bottom: 0.8rem; }
.cta-box h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.7rem; }
.cta-box p { font-size: 0.9rem; opacity: 0.9; line-height: 1.7; margin-bottom: 1.2rem; }
.cta-services { display: flex; flex-direction: column; gap: 0.4rem; width: 100%; text-align: left; }
.cta-services span {
  font-size: 0.85rem;
  opacity: 0.9;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
.cta-box .btn-outline {
  background: rgba(255,255,255,0.2);
  color: white;
  border-color: rgba(255,255,255,0.4);
  backdrop-filter: blur(4px);
  margin-top: 1.5rem;
}
.cta-box .btn-outline:hover {
  background: rgba(255,255,255,0.3);
  border-color: white;
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  text-align: center;
  background: var(--bg-white);
}
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.footer-logo { display: flex; align-items: center; gap: 0.6rem; font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.2rem; }
.footer-desc { font-size: 0.85rem; color: var(--text-muted); }
.footer-copy { font-size: 0.76rem; color: var(--text-light); }

/* ===== PDF MODAL ===== */
.pdf-modal {
  display: none;
  position: fixed; inset: 0;
  z-index: 2000;
  align-items: center; justify-content: center;
}
.pdf-modal.open { display: flex; }
.pdf-modal-overlay {
  position: absolute; inset: 0;
  background: rgba(30,27,75,0.6);
  backdrop-filter: blur(8px);
}
.pdf-modal-content {
  position: relative; z-index: 1;
  width: 90vw; max-width: 900px;
  height: 88vh;
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.25s ease;
}
@keyframes modal-in {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.pdf-modal-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}
.pdf-modal-header h3 { font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.pdf-modal-close {
  background: none; border: none;
  cursor: pointer;
  color: var(--text-muted); padding: 0.3rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex;
}
.pdf-modal-close:hover { color: var(--accent); background: rgba(79,70,229,0.08); }
.pdf-modal-body { flex: 1; overflow: hidden; }
.pdf-modal-body iframe { width: 100%; height: 100%; }
.pdf-modal-footer {
  padding: 0.9rem 1.4rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end;
  background: var(--bg-secondary);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== FLOATING SHAPES (decorative) ===== */
.shape-blob {
  position: absolute;
  border-radius: 60% 40% 50% 60% / 50% 60% 40% 50%;
  background: linear-gradient(135deg, rgba(79,70,229,0.06), rgba(99,102,241,0.1));
  animation: blob-morph 14s ease-in-out infinite;
  pointer-events: none;
}
@keyframes blob-morph {
  0%,100% { border-radius: 60% 40% 50% 60% / 50% 60% 40% 50%; }
  33% { border-radius: 40% 60% 70% 30% / 60% 40% 60% 40%; }
  66% { border-radius: 70% 30% 40% 60% / 40% 70% 30% 60%; }
}

/* ===== TOOLTIP ===== */
[data-tooltip] {
  position: relative;
  cursor: default;
}
[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--text-primary);
  color: white;
  font-size: 0.75rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  font-family: var(--font-th);
}
[data-tooltip]:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .nav-menu {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(248,250,255,0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    padding: 1rem;
    gap: 0.2rem;
  }
  .nav-menu.open { display: flex; }
  .nav-link { padding: 0.75rem 1rem; }
  .hamburger { display: flex; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .statement-feature-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 1.2rem; padding: 1.2rem 1.4rem; }
  .project-header { flex-direction: column; }
  .about-info-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
  .statement-feature-grid { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; align-items: center; }
}

/* Hide print-only elements by default on screen */
.print-only-title { display: none; }

/* ===== PRINT ===== */
@media print {
  /* Force all scroll-reveal items to be fully visible immediately on print */
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* Hide non-resume sections and elements */
  .navbar, 
  .hero-scroll, 
  .hero-buttons, 
  .hamburger,
  .pdf-modal, 
  .hero-badge, 
  .hero-orb, 
  .hero-bg, 
  .cursor-glow,
  .about-hobbies,
  .hero-stats,
  #portfolio, 
  #blog,
  .contact-cta, 
  .footer,
  .current-badge-wrap,
  .timeline-dot-pulse {
    display: none !important;
  }

  /* Reset body and fonts for printing */
  body {
    background: white !important;
    color: #111827 !important;
    font-size: 10pt;
    line-height: 1.4;
    font-family: 'Prompt', 'Inter', sans-serif;
  }

  /* Adjust Container & Page Margins */
  @page {
    size: A4;
    margin: 1cm 1.2cm 1cm 1.2cm;
  }

  .container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Compact section styling */
  .section, .section-alt {
    background: white !important;
    padding: 0.8rem 0 !important;
    margin: 0 !important;
    border-bottom: 1px dashed #e5e7eb;
  }
  .section:last-of-type {
    border-bottom: none;
  }

  /* Section Header adjustments */
  .section-header {
    margin-bottom: 0.6rem !important;
    text-align: left !important;
  }
  .section-tag {
    display: none !important;
  }
  .section-title {
    font-size: 13pt !important;
    font-weight: 700;
    color: #1e1b4b !important;
    border-bottom: 2px solid #4f46e5;
    padding-bottom: 2px;
    display: inline-block;
    margin-bottom: 0.2rem !important;
  }
  .section-desc {
    display: none !important;
  }

  /* Hero Section as a Resume Header */
  .hero {
    min-height: auto !important;
    padding: 0 0 0.8rem 0 !important;
    text-align: left !important;
    background: none !important;
    border-bottom: 2px solid #1e1b4b;
  }
  .hero-content {
    max-width: 100% !important;
    text-align: left !important;
  }
  .hero-name {
    font-size: 20pt !important;
    font-weight: 800;
    margin-bottom: 0.2rem !important;
    color: #1e1b4b !important;
  }
  .hero-name span {
    background: none !important;
    -webkit-text-fill-color: initial !important;
    color: #4f46e5 !important;
  }
  .hero-title-wrap {
    display: none !important;
  }
  .print-only-title {
    display: block !important;
    font-size: 11pt;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 0.4rem;
  }
  .hero-desc {
    font-size: 9.5pt !important;
    margin-bottom: 0 !important;
    color: #4b5563 !important;
  }

  /* About Section */
  .about-grid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }
  .about-lead {
    font-size: 10pt !important;
    margin-bottom: 0.4rem !important;
  }
  .about-body {
    font-size: 9pt !important;
    margin-bottom: 0.6rem !important;
  }
  .license-badge {
    padding: 0.4rem 0.6rem !important;
    background: #f3f4f6 !important;
    border: 1px solid #d1d5db !important;
    display: inline-flex !important;
    margin-bottom: 0.6rem !important;
    align-items: center;
  }
  .license-badge svg {
    width: 16px !important;
    height: 16px !important;
  }
  .license-title {
    font-size: 9pt !important;
  }
  .license-sub {
    font-size: 7.5pt !important;
  }
  .about-info-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.3rem !important;
  }
  .info-item {
    font-size: 8.5pt !important;
  }

  /* Timeline & Experience & Education */
  .timeline {
    padding-left: 1.2rem !important;
  }
  .timeline::before {
    left: 0.2rem !important;
    background: #e5e7eb !important;
  }
  .timeline-dot {
    left: -1.2rem !important;
    width: 8px !important;
    height: 8px !important;
    border-width: 1.5px !important;
    background: white !important;
    border-color: #9ca3af !important;
  }
  .timeline-dot-active {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
  }
  .timeline-item {
    margin-bottom: 0.8rem !important;
    padding-bottom: 0 !important;
    page-break-inside: avoid;
  }
  .timeline-content {
    padding: 0.5rem 0.7rem !important;
    border: 1px solid #e5e7eb !important;
    background: white !important;
    box-shadow: none !important;
    transform: none !important;
  }
  .timeline-content:hover {
    transform: none !important;
    border-color: #e5e7eb !important;
  }
  .timeline-period {
    font-size: 8.5pt !important;
    color: #4f46e5 !important;
    margin-bottom: 0.15rem !important;
  }
  .duration-badge {
    background: #f3f4f6 !important;
    color: #4b5563 !important;
    border: 1px solid #e5e7eb !important;
    font-size: 7pt !important;
  }
  .timeline-title {
    font-size: 10pt !important;
    margin-bottom: 0.1rem !important;
  }
  .timeline-sub {
    font-size: 9pt !important;
    margin-bottom: 0.1rem !important;
  }
  .timeline-sub-small {
    font-size: 8pt !important;
    margin-bottom: 0.3rem !important;
  }
  .timeline-duties {
    margin-top: 0.3rem !important;
    gap: 0.15rem !important;
  }
  .timeline-duties li {
    font-size: 8.5pt !important;
  }

  /* Skills & Licenses */
  .skills-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.6rem !important;
  }
  .skills-grid > .skill-category:last-child:nth-child(odd) {
    grid-column: span 1 !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  .skill-category {
    padding: 0.6rem !important;
    border: 1px solid #e5e7eb !important;
    background: white !important;
    box-shadow: none !important;
    transform: none !important;
  }
  .skill-category:hover {
    transform: none !important;
    border-color: #e5e7eb !important;
  }
  .skill-cat-icon {
    display: none !important;
  }
  .skill-cat-title {
    font-size: 9.5pt !important;
    margin-bottom: 0.4rem !important;
    color: #1e1b4b !important;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 2px;
  }
  .skill-list {
    gap: 0.3rem !important;
  }
  .skill-item span {
    font-size: 8pt !important;
  }
  .skill-bar {
    display: none !important; /* Hide progress bars in print mode */
  }
  .cert-item {
    padding: 0.4rem !important;
    border: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
  }
  .cert-name {
    font-size: 8.5pt !important;
  }
  .cert-by {
    font-size: 7.5pt !important;
  }

  /* Contact Section */
  #contact {
    border-bottom: none !important;
  }
  .contact-grid {
    grid-template-columns: 1fr !important;
  }
  .contact-info {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 0.8rem !important;
  }
  .contact-card {
    flex: 1 1 180px !important;
    padding: 0.5rem !important;
    border: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
    box-shadow: none !important;
  }
  .contact-card:hover {
    transform: none !important;
    border-color: #e5e7eb !important;
  }
  .contact-icon {
    width: 28px !important;
    height: 28px !important;
  }
  .contact-label {
    font-size: 7pt !important;
  }
  .contact-value {
    font-size: 8.5pt !important;
  }
}
