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

:root {
  /* Premium Minimalist Dark Theme (Default) */
  --bg-primary: #0b0c10;      /* Pure Graphite dark */
  --bg-secondary: #12141c;    /* Deep Slate Gray */
  --surface-glass: #171a23;   /* Solid dark panels instead of glass */
  --surface-glass-hover: #1e222e;
  --border-color: #242936;    /* Crisp, clean borders */
  --border-hover: #10b981;    /* Emerald green accent */
  
  --primary: #10b981;         /* Emerald Green */
  --primary-rgb: 16, 185, 129;
  --secondary: #0d9488;       /* Muted Teal */
  --secondary-rgb: 13, 148, 136;
  
  --text-main: #f1f5f9;       /* Off-white */
  --text-muted: #94a3b8;      /* Cool slate text */
  --text-inverse: #0f172a;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 15px 40px rgba(0, 0, 0, 0.5);
  --shadow-accent: 0 0 20px rgba(16, 185, 129, 0.15);
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-round: 9999px;
  
  --glow-color: rgba(16, 185, 129, 0.05);
  --glow-color-2: rgba(13, 148, 136, 0.03);
}

/* Light Theme Variables */
[data-theme="light"] {
  --bg-primary: #fafaf9;      /* Clean Warm Off-White */
  --bg-secondary: #f4f4f3;    /* Light Gray */
  --surface-glass: #ffffff;   /* Clean White panels */
  --surface-glass-hover: #fcfcfb;
  --border-color: #e4e4e0;    /* Muted clean border */
  --border-hover: #059669;    /* Darker Emerald */
  
  --primary: #059669;
  --primary-rgb: 5, 150, 105;
  --secondary: #0d9488;
  --secondary-rgb: 13, 148, 136;
  
  --text-main: #1c1917;       /* Dark slate text */
  --text-muted: #57534e;      /* Muted gray text */
  --text-inverse: #fafaf9;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 15px 40px rgba(0, 0, 0, 0.08);
  --shadow-accent: 0 0 20px rgba(5, 150, 105, 0.1);
  
  --glow-color: rgba(5, 150, 105, 0.02);
  --glow-color-2: rgba(13, 148, 136, 0.02);
}

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

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

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

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-round);
  border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
}

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

/* ==========================================================================
   LAYOUT & CONTAINER
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 8rem 0 4rem;
  position: relative;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-align: center;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.section-title span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 4rem;
  font-size: 1.1rem;
}

/* Ambient Orbs Removed for Minimalist Aesthetic */
.ambient-glow, .ambient-glow-2 {
  display: none;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: var(--radius-round);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1rem;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-inverse);
  box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(var(--primary-rgb), 0.3);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-main);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--primary);
  transform: translateY(-3px);
}

[data-theme="light"] .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.03);
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.header-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(11, 12, 16, 0.75);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

[data-theme="light"] .header-nav {
  background-color: rgba(248, 250, 252, 0.75);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
}

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

.nav-link {
  font-weight: 500;
  position: relative;
  color: var(--text-muted);
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width var(--transition-fast);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Theme Toggle */
.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-round);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: var(--surface-glass);
  border-color: var(--primary);
  transform: rotate(15deg);
}

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

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

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
}

.hero-wrapper {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 4rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-tag {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--secondary);
  margin-bottom: 1rem;
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: var(--radius-round);
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero-title span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 600px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
}

/* Hero Art - Rotating Glassmorphic Card Mockup */
.hero-art-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.profile-glow-circle {
  position: relative;
  width: 320px;
  height: 320px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-img-frame {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 0 35px rgba(var(--primary-rgb), 0.25);
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--bg-primary);
}

/* Floating Tech Badges */
.tech-badge {
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.tech-badge:hover {
  transform: scale(1.15);
  border-color: var(--primary);
  box-shadow: var(--shadow-accent);
}

/* Position Tech Badges around the circle */
.badge-html {
  top: 15px;
  right: -10px;
  color: #e34f26;
  animation: float-slow 4s infinite alternate ease-in-out;
}

.badge-css {
  bottom: 80px;
  left: -20px;
  color: #1572b6;
  animation: float-slow 5s infinite alternate-reverse ease-in-out;
}

.badge-js {
  bottom: 10px;
  right: 25px;
  color: #f7df1e;
  animation: float-slow 4.5s infinite alternate ease-in-out;
}

/* Floating Animation */
@keyframes float-slow {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}

/* ==========================================================================
   ABOUT ME SECTION
   ========================================================================== */
.about-wrapper {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4rem;
  align-items: center;
}

.about-img-box {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  background: var(--surface-glass);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-img-box i {
  font-size: 8rem;
  color: var(--primary);
  opacity: 0.3;
}

.about-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

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

.stat-card {
  padding: 1.5rem;
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-align: center;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.stat-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.2rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==========================================================================
   SKILLS SECTION
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.skills-category {
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  transition: all var(--transition-normal);
}

.skills-category:hover {
  transform: translateY(-8px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.category-title {
  font-size: 1.4rem;
  margin-bottom: 1.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-main);
}

.category-title i {
  color: var(--secondary);
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.skill-name {
  font-weight: 500;
  color: var(--text-main);
}

.skill-pct {
  color: var(--text-muted);
}

.skill-bar-bg {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-round);
  overflow: hidden;
  position: relative;
}

[data-theme="light"] .skill-bar-bg {
  background: rgba(0, 0, 0, 0.05);
}

.skill-bar-fill {
  height: 100%;
  border-radius: var(--radius-round);
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  width: 0%; /* Populated by JS on viewport reveal */
  transition: width 1.5s cubic-bezier(0.1, 0.8, 0.2, 1);
}

/* ==========================================================================
   PROJECTS SECTION
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.project-card {
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
}

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

.project-img-box {
  width: 100%;
  aspect-ratio: 16/10;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border-color);
}

.project-img-box i {
  font-size: 5rem;
  color: var(--primary);
  opacity: 0.25;
  transition: transform var(--transition-normal);
}

.project-card:hover .project-img-box i {
  transform: scale(1.15) rotate(5deg);
}

.project-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-tag {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.2rem 0.8rem;
  background: rgba(124, 58, 237, 0.08);
  color: var(--primary);
  border-radius: var(--radius-round);
}

.project-title {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: var(--text-main);
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-links {
  display: flex;
  gap: 1.2rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.project-link:hover {
  color: var(--primary);
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-wrapper {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4rem;
}

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

.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.contact-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: rgba(124, 58, 237, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.contact-details h4 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.contact-details p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-socials-box {
  margin-top: 1.5rem;
}

.contact-socials-box h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.contact-socials {
  display: flex;
  gap: 1rem;
}

.contact-socials a {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--surface-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--transition-fast);
}

.contact-socials a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-inverse);
  transform: translateY(-4px);
}

/* Contact Form */
.contact-form-container {
  background: var(--surface-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem;
}

.form-group {
  margin-bottom: 1.8rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.6rem;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  padding: 1rem 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

[data-theme="light"] .form-input {
  background: rgba(0, 0, 0, 0.02);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.15);
}

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

.form-status {
  margin-top: 1rem;
  font-size: 0.95rem;
  display: none;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.form-status.success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
  display: block;
}

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

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  padding: 4rem 0;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  transition: background-color var(--transition-normal);
}

.footer-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

/* ==========================================================================
   SCROLL ANIMATIONS (Intersection Observer)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Delay modifiers for lists/grids */
.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; }

/* ==========================================================================
   RESPONSIVE DESIGN (Media Queries)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-wrapper {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
  }
  
  .hero-title {
    font-size: 3.2rem;
  }
}

@media (max-width: 900px) {
  section {
    padding: 6rem 0 3rem;
  }
  
  .hero-wrapper {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 4rem;
  }
  
  .hero-content {
    align-items: center;
  }
  
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
  
  .about-wrapper, .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .about-img-box {
    max-width: 400px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none; /* Toggle handled via JavaScript class list */
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  /* Mobile menu active overlay */
  .nav-links.mobile-active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem;
    gap: 1.5rem;
    align-items: center;
    box-shadow: var(--shadow-lg);
  }
  
  .nav-actions {
    gap: 1rem;
  }
  
  .footer-wrapper {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }
  
  .hero-title {
    font-size: 2.6rem;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .contact-form-container {
    padding: 1.5rem;
  }
}
