/* ============================================
   GLOBAL VARIABLES & RESET
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2dd4bf;
  --primary-dark: #14b8a6;
  --primary-light: #5eead4;
  --secondary: #8b5cf6;
  --secondary-dark: #7c3aed;
  --accent: #f43f5e;
  --bg-dark: #030712;
  --bg-darker: #020617;
  --bg-card: rgba(15, 23, 42, 0.6);
  --bg-card-solid: #0f172a;
  --text: #f1f5f9;
  --text-light: #f8fafc;
  --text-dim: #94a3b8;
  --text-muted: #64748b;
  --border-glow: rgba(45, 212, 191, 0.2);
  --border-glow-strong: rgba(45, 212, 191, 0.4);
  --glow-sm: 0 0 10px rgba(45, 212, 191, 0.3);
  --glow-md: 0 0 20px rgba(45, 212, 191, 0.4);
  --glow-lg: 0 0 40px rgba(45, 212, 191, 0.5);
  --shadow-card: 0 20px 40px -12px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

body.light {
  --bg-dark: #f8fafc;
  --bg-darker: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-card-solid: #ffffff;
  --text: #0f172a;
  --text-light: #1e293b;
  --text-dim: #475569;
  --text-muted: #64748b;
  --border-glow: rgba(45, 212, 191, 0.3);
  --shadow-card: 0 20px 40px -12px rgba(0, 0, 0, 0.1);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ============================================
   BACKGROUND EFFECTS
   ============================================ */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 30%, rgba(45, 212, 191, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes gradientFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes glowPulse {
  0%, 100% { text-shadow: 0 0 20px rgba(45, 212, 191, 0.3); }
  50% { text-shadow: 0 0 30px rgba(45, 212, 191, 0.6); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientFlow 8s ease infinite;
}

/* ============================================
   THEME TOGGLE & BACK BUTTON
   ============================================ */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glow);
  border-radius: 50px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  color: var(--primary);
}

.theme-toggle:hover {
  transform: scale(1.05);
  border-color: var(--primary);
  box-shadow: var(--glow-sm);
}

.back-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glow);
  border-radius: 50px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}

.back-btn:hover {
  transform: translateX(-5px);
  border-color: var(--primary);
  box-shadow: var(--glow-sm);
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: 50%;
  color: #030712;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: var(--glow-sm);
}

.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
}

.scroll-top-btn:hover {
  transform: translateY(-5px);
  box-shadow: var(--glow-md);
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  backdrop-filter: blur(20px);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-overlay.hide {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(45, 212, 191, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-overlay p {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ============================================
   HEADER (index.html)
   ============================================ */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.2rem 2rem;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glow);
  z-index: 100;
  transform: translateY(0);
  transition: transform 0.4s ease;
}

body.light header {
  background: rgba(248, 250, 252, 0.85);
}

header.hidden {
  transform: translateY(-100%);
}

header h1 {
  font-family: 'Space Grotesk', monospace;
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.02em;
  animation: glowPulse 4s ease-in-out infinite;
}

/* ============================================
   WELCOME SCREEN (index.html)
   ============================================ */
#welcome {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 7, 18, 0.98);
  backdrop-filter: blur(20px);
  z-index: 200;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

body.light #welcome {
  background: rgba(248, 250, 252, 0.98);
}

#welcome.hide {
  opacity: 0;
  visibility: hidden;
}

.welcome-wrapper {
  max-width: 900px;
  padding: 3rem 2rem;
  text-align: center;
  animation: fadeInUp 0.8s ease;
  z-index: 2;
}

.welcome-wrapper h1 {
  font-size: clamp(2rem, 8vw, 4rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.tagline {
  font-size: clamp(1rem, 4vw, 1.4rem);
  color: var(--text-dim);
  margin: 2rem 0;
  min-height: 4rem;
  font-family: 'Space Grotesk', monospace;
}

#explore-btn {
  padding: 1rem 3rem;
  font-size: 1.2rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: 50px;
  color: #030712;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#explore-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

#explore-btn:hover::before {
  left: 100%;
}

#explore-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--glow-md);
}

.live-clock {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-family: 'Space Grotesk', monospace;
  color: var(--primary);
}

.meta-line {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  opacity: 0.7;
}

/* ============================================
   MAIN CONTENT (index.html)
   ============================================ */
main {
  min-height: 100vh;
  padding: 120px 2rem 100px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  font-family: 'Space Grotesk', monospace;
}

.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glow);
  border-radius: 24px;
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.1), transparent);
  transition: left 0.5s ease;
}

.glass-card:hover::before {
  left: 100%;
}

.glass-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: var(--glow-md);
}

.card-icon {
  font-size: 2.8rem;
  margin-bottom: 1.2rem;
  color: var(--primary);
  transition: all 0.3s ease;
}

.glass-card:hover .card-icon {
  transform: scale(1.1);
  text-shadow: var(--glow-sm);
}

.card-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-family: 'Space Grotesk', monospace;
}

.card-subtitle {
  font-size: 0.9rem;
  color: var(--text-dim);
}

.skills-section {
  margin: 4rem 0;
}

.skill-item {
  margin-bottom: 1.5rem;
}

.skill-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 10px;
  width: 0;
  transition: width 1s ease;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.project-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glow);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--glow-md);
}

.project-img {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}

.project-info {
  padding: 1.5rem;
}

.project-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
}

.contact-form {
  max-width: 600px;
  margin: 2rem auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--glow-sm);
}

.submit-btn {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #030712;
}

.submit-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--glow-md);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0;
}

.social-link {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 50%;
  color: var(--primary);
  font-size: 1.3rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-link:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--glow-sm);
  color: var(--primary-light);
}

#infoPanel {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.95);
  backdrop-filter: blur(20px);
  z-index: 150;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

body.light #infoPanel {
  background: rgba(248, 250, 252, 0.95);
}

#infoPanel.show {
  display: flex;
}

.panel-content {
  background: var(--bg-card-solid);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glow);
  border-radius: 28px;
  padding: 2.5rem;
  max-width: 800px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  animation: fadeInUp 0.4s ease;
  box-shadow: var(--shadow-card);
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2.5rem;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s ease;
}

.close-btn:hover {
  color: var(--primary);
  transform: rotate(90deg);
}

.button-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

footer {
  position: relative;
  padding: 2rem;
  text-align: center;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-glow);
  margin-top: 2rem;
}

.scroll-hidden {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.scroll-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   PROJECT PAGE SPECIFIC (project.html)
   ============================================ */
.portfolio-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}

.filter-btn {
  padding: 0.6rem 1.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glow);
  border-radius: 50px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #030712;
  border-color: transparent;
  transform: translateY(-2px);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

.portfolio-item {
  transition: all 0.3s ease;
}

.portfolio-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glow);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  height: 100%;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}

.portfolio-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: var(--glow-md);
}

.portfolio-image {
  height: 200px;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.1), rgba(139, 92, 246, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--primary);
  position: relative;
  overflow: hidden;
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

.view-detail {
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: 50px;
  color: #030712;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.view-detail:hover {
  transform: scale(1.05);
  box-shadow: var(--glow-sm);
}

.portfolio-info {
  padding: 1.5rem;
}

.portfolio-info h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.portfolio-info p {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.portfolio-tags span {
  padding: 0.2rem 0.8rem;
  background: rgba(45, 212, 191, 0.1);
  border-radius: 50px;
  font-size: 0.75rem;
  color: var(--primary);
}

.portfolio-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-glow);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.portfolio-stats i {
  color: var(--primary);
  margin-right: 0.3rem;
}

.project-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.95);
  backdrop-filter: blur(20px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

body.light .project-modal {
  background: rgba(248, 250, 252, 0.95);
}

.project-modal.show {
  display: flex;
}

.modal-content {
  background: var(--bg-card-solid);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-glow);
  border-radius: 32px;
  max-width: 900px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  animation: modalFadeIn 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  box-shadow: var(--shadow-card);
}

.modal-close {
  position: sticky;
  top: 1rem;
  right: 1rem;
  float: right;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-dim);
  transition: all 0.3s ease;
  font-size: 1.5rem;
  margin: 1rem;
}

.modal-close:hover {
  background: var(--primary);
  color: #030712;
  transform: rotate(90deg);
}

#modalBody {
  padding: 1rem 2rem 2rem;
  clear: both;
}

.modal-header {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.modal-header h2 {
  font-size: 2rem;
  font-family: 'Space Grotesk', monospace;
}

.project-badge {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 0.3rem 1rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #030712;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.2rem 0;
}

.modal-tech span {
  padding: 0.4rem 1rem;
  background: rgba(45, 212, 191, 0.1);
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 500;
}

.modal-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  background: rgba(45, 212, 191, 0.05);
  padding: 1.2rem;
  border-radius: 20px;
  margin: 1.2rem 0;
  border: 1px solid var(--border-glow);
}

.stat-card {
  text-align: center;
  padding: 0.8rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  transition: all 0.2s ease;
}

body.light .stat-card {
  background: rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
  transform: translateY(-3px);
  background: rgba(45, 212, 191, 0.1);
}

.stat-card i {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  display: block;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  display: block;
  color: var(--text);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.modal-section {
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 20px;
  border-left: 3px solid var(--primary);
}

.modal-section h4 {
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-section p {
  color: var(--text-dim);
  line-height: 1.6;
  font-size: 0.9rem;
}

.achievement-list {
  list-style: none;
  padding: 0;
}

.achievement-list li {
  margin: 0.7rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.achievement-list li:before {
  content: "✓";
  color: var(--primary);
  position: absolute;
  left: 0;
  font-weight: bold;
}

.modal-images {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  justify-content: center;
}

.image-preview {
  width: 60px;
  height: 60px;
  background: rgba(45, 212, 191, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: all 0.2s ease;
}

.image-preview:hover {
  transform: scale(1.1);
  background: rgba(45, 212, 191, 0.2);
}

/* ============================================
   RESUME PAGE SPECIFIC (resume.html)
   ============================================ */
.resume-container {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border-radius: 32px;
  border: 1px solid var(--border-glow);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
  z-index: 1;
}

.resume-header {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.1), rgba(139, 92, 246, 0.05));
  padding: 3rem;
  border-bottom: 1px solid var(--border-glow);
  text-align: center;
}

.name {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientFlow 8s ease infinite;
  margin-bottom: 0.5rem;
  font-family: 'Space Grotesk', monospace;
}

.title {
  font-size: 1.3rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.tagline {
  font-size: 1rem;
  color: var(--primary-light);
  max-width: 600px;
  margin: 0 auto;
}

.contact-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-glow);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.contact-item i {
  color: var(--primary);
  width: 20px;
}

.contact-item a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.contact-item a:hover {
  color: var(--primary);
}

.resume-body {
  padding: 2.5rem 3rem;
}

.resume-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2.5rem;
}

.left-col {
  border-right: 1px solid var(--border-glow);
  padding-right: 2rem;
}

.section {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(45, 212, 191, 0.3);
  display: inline-block;
  letter-spacing: 1px;
}

.skill-item {
  margin-bottom: 1rem;
}

.skill-name {
  font-weight: 600;
  margin-bottom: 0.3rem;
  display: block;
  color: var(--text);
}

.skill-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.skill-level {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 3px;
  width: var(--width);
}

.edu-item {
  margin-bottom: 1.2rem;
}

.edu-degree {
  font-weight: 700;
  color: var(--text);
}

.edu-school {
  font-size: 0.9rem;
  color: var(--primary-light);
}

.edu-year {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.cert-item i {
  color: var(--primary);
  width: 20px;
}

.cert-detail {
  margin-left: 1.8rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: -0.3rem;
  margin-bottom: 0.8rem;
}

.lang-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.lang-name {
  font-weight: 500;
  color: var(--text);
}

.lang-level {
  color: var(--primary-light);
  font-size: 0.85rem;
}

.right-col .section {
  margin-bottom: 2rem;
}

.exp-item {
  margin-bottom: 1.8rem;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.exp-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.exp-company {
  color: var(--primary);
}

.exp-date {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.exp-desc {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border-glow);
}

.exp-desc ul {
  padding-left: 1.2rem;
  margin-top: 0.3rem;
}

.exp-desc li {
  margin: 0.3rem 0;
}

.achievement-item {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.achievement-item i {
  color: var(--primary);
  margin-top: 0.2rem;
}

.download-section {
  text-align: center;
  padding: 2rem 3rem;
  border-top: 1px solid var(--border-glow);
  background: rgba(0, 0, 0, 0.2);
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 2rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: 50px;
  color: #030712;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.download-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--glow-md);
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  body {
    background: white;
    padding: 0;
  }
  .resume-container {
    background: white;
    border: none;
    box-shadow: none;
  }
  .name {
    color: #000;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
  }
  .download-section {
    display: none;
  }
  .contact-item a {
    color: #000;
  }
  .skill-level {
    background: #2dd4bf;
  }
  .theme-toggle, .back-btn, .scroll-top-btn, .loading-overlay, #particles-canvas {
    display: none;
  }
}

/* ============================================
   RESPONSIVE DESIGN (common & specific)
   ============================================ */
@media (max-width: 1024px) {
  .resume-grid { gap: 1.5rem; }
  .resume-body { padding: 2rem; }
}

@media (max-width: 768px) {
  body { padding: 0.8rem; }
  header { padding: 0.8rem 1rem; }
  header h1 { font-size: 1.2rem; }
  .welcome-wrapper { padding: 1.5rem; width: 95%; }
  .welcome-wrapper h1 { font-size: clamp(1.8rem, 7vw, 2.5rem); margin-bottom: 1rem; }
  .tagline { font-size: 0.95rem; margin: 1rem 0; min-height: 3rem; }
  .live-clock { font-size: 0.75rem; }
  .meta-line { font-size: 0.7rem; }
  #explore-btn { padding: 0.7rem 2rem; font-size: 1rem; }
  main { padding: 90px 0.8rem 60px; }
  .section-title { font-size: 1.6rem; margin-bottom: 1.5rem; }
  .card-container { grid-template-columns: 1fr !important; gap: 1rem; margin-bottom: 2rem; }
  .glass-card { padding: 1.2rem; }
  .card-title { font-size: 1.2rem; }
  .card-icon { font-size: 2rem; margin-bottom: 0.8rem; }
  .card-subtitle { font-size: 0.8rem; }
  .skills-section { margin: 2rem 0; }
  .skill-header { font-size: 0.85rem; }
  .skill-name { font-size: 0.85rem; }
  .projects-grid { grid-template-columns: 1fr !important; gap: 1rem; margin: 1rem 0; }
  .project-img { height: 140px; font-size: 2.5rem; }
  .project-info { padding: 1rem; }
  .project-title { font-size: 1rem; }
  .project-desc { font-size: 0.8rem; }
  .portfolio-grid { grid-template-columns: 1fr !important; gap: 1rem; }
  .portfolio-image { height: 150px; font-size: 3rem; }
  .portfolio-info { padding: 1rem; }
  .portfolio-info h3 { font-size: 1rem; }
  .portfolio-info p { font-size: 0.8rem; }
  .portfolio-tags span { font-size: 0.65rem; padding: 0.1rem 0.5rem; }
  .portfolio-stats { font-size: 0.7rem; gap: 0.8rem; }
  .portfolio-filter { gap: 0.5rem; margin: 1rem 0; }
  .filter-btn { padding: 0.35rem 0.8rem; font-size: 0.7rem; }
  .contact-form { margin: 1rem auto; width: 100%; }
  .form-group { margin-bottom: 1rem; }
  .form-group input, .form-group textarea { padding: 0.7rem; font-size: 0.85rem; }
  .submit-btn { padding: 0.7rem 1.2rem; font-size: 0.85rem; width: 100%; justify-content: center; }
  .social-links { gap: 0.8rem; margin: 1.5rem 0; }
  .social-link { width: 38px; height: 38px; font-size: 1rem; }
  .button-group { gap: 0.8rem; flex-direction: column; align-items: stretch; margin-top: 1.5rem; }
  .button-group .submit-btn { width: 100%; text-align: center; justify-content: center; }
  .resume-container { margin: 0; border-radius: 20px; }
  .resume-header { padding: 1.5rem; }
  .name { font-size: 1.8rem; }
  .title { font-size: 1rem; }
  .tagline { font-size: 0.8rem; }
  .resume-body { padding: 1.2rem; }
  .resume-grid { grid-template-columns: 1fr !important; gap: 1.2rem; }
  .left-col { border-right: none; padding-right: 0; }
  .section-title { font-size: 1rem; }
  .contact-bar { gap: 0.6rem; margin-top: 1rem; padding-top: 0.8rem; }
  .contact-item { font-size: 0.7rem; }
  .contact-item i { font-size: 0.8rem; width: 18px; }
  .skill-name { font-size: 0.8rem; }
  .exp-header { flex-direction: column; gap: 0.2rem; }
  .exp-title { font-size: 0.95rem; }
  .exp-company { font-size: 0.85rem; }
  .exp-date { font-size: 0.7rem; }
  .exp-desc { font-size: 0.8rem; padding-left: 0.8rem; }
  .exp-desc ul { padding-left: 1rem; }
  .exp-desc li { font-size: 0.8rem; margin: 0.2rem 0; }
  .achievement-item { font-size: 0.8rem; gap: 0.6rem; }
  .achievement-item i { font-size: 0.9rem; }
  .download-section { padding: 1.2rem; }
  .download-btn { padding: 0.6rem 1.2rem; font-size: 0.85rem; width: 100%; justify-content: center; }
  .modal-content { max-width: 95%; max-height: 90vh; border-radius: 20px; }
  .panel-content { padding: 1.5rem; }
  .modal-header h2 { font-size: 1.3rem; }
  .project-badge { font-size: 0.6rem; padding: 0.2rem 0.8rem; }
  .modal-tech { gap: 0.4rem; margin: 0.8rem 0; }
  .modal-tech span { padding: 0.25rem 0.7rem; font-size: 0.7rem; }
  .modal-stats { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; padding: 0.8rem; }
  .stat-card { padding: 0.5rem; }
  .stat-card i { font-size: 1.2rem; }
  .stat-value { font-size: 1rem; }
  .stat-label { font-size: 0.6rem; }
  .stat-desc { font-size: 0.55rem; }
  .modal-section { margin: 1rem 0; padding: 0.8rem; }
  .modal-section h4 { font-size: 0.85rem; }
  .modal-section p { font-size: 0.8rem; }
  .achievement-list li { font-size: 0.8rem; margin: 0.4rem 0; }
  .modal-images { gap: 0.5rem; }
  .image-preview { width: 45px; height: 45px; font-size: 1.5rem; }
  footer { padding: 1rem; font-size: 0.7rem; }
  footer .social-links { margin-bottom: 0.8rem; gap: 0.6rem; }
  footer .social-link { width: 32px; height: 32px; font-size: 0.85rem; }
  .theme-toggle { top: 10px; right: 10px; padding: 6px 10px; font-size: 0.9rem; }
  .back-btn { top: 10px; left: 10px; padding: 6px 10px; font-size: 0.75rem; }
  .back-btn span { display: none; }
  .back-btn i { margin: 0; }
  .scroll-top-btn { bottom: 15px; right: 15px; width: 36px; height: 36px; font-size: 0.9rem; }
}

@media (max-width: 480px) {
  body { padding: 0.5rem; }
  .section-title { font-size: 1.3rem; }
  .glass-card { padding: 1rem; }
  .card-title { font-size: 1rem; }
  .card-icon { font-size: 1.6rem; }
  .card-subtitle { font-size: 0.7rem; }
  .project-title { font-size: 0.9rem; }
  .project-desc { font-size: 0.7rem; }
  .portfolio-info h3 { font-size: 0.9rem; }
  .portfolio-info p { font-size: 0.7rem; }
  .filter-btn { padding: 0.25rem 0.6rem; font-size: 0.65rem; }
  .name { font-size: 1.4rem; }
  .title { font-size: 0.85rem; }
  .tagline { font-size: 0.7rem; }
  .contact-item { font-size: 0.6rem; }
  .contact-item i { font-size: 0.7rem; width: 16px; }
  .modal-stats { grid-template-columns: 1fr; }
  .stat-card { display: flex; align-items: center; text-align: left; gap: 0.8rem; padding: 0.5rem 0.8rem; }
  .stat-card i { margin-bottom: 0; font-size: 1.2rem; }
  .stat-card div { flex: 1; }
  .stat-value { font-size: 0.9rem; display: inline; margin-right: 0.3rem; }
  .stat-label { font-size: 0.6rem; }
  .stat-desc { font-size: 0.55rem; }
  .exp-title { font-size: 0.85rem; }
  .exp-company { font-size: 0.75rem; }
  .exp-desc { font-size: 0.7rem; }
  .achievement-item { font-size: 0.7rem; }
}

@media (max-width: 768px) and (orientation: landscape) {
  main { padding: 80px 1rem 40px; }
  .glass-card { padding: 0.8rem; }
  .card-icon { font-size: 1.4rem; margin-bottom: 0.5rem; }
  .card-title { font-size: 0.9rem; }
  .card-subtitle { font-size: 0.7rem; }
  .welcome-wrapper { padding: 1rem; }
  .welcome-wrapper h1 { font-size: 1.8rem; }
  .tagline { font-size: 0.8rem; margin: 0.8rem 0; }
  .projects-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .resume-grid { grid-template-columns: 1fr 1.5fr !important; }
}

#formStatus {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
  animation: fadeInUp 0.3s ease;
}

.fa-spinner {
  animation: spin 1s linear infinite;
}