/* css/style.css */
/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

html {
  scroll-behavior: smooth;
}

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

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

/* ===== CSS VARIABLES (THEME) ===== */
:root {
  /* Dark Theme (Default) */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --accent: #10b981;
  --accent-dark: #059669;
  --card-bg: #1e293b;
  --border-radius: 12px;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

.light-mode {
  --bg-primary: #f8fafc;
  --bg-secondary: #e2e8f0;
  --bg-tertiary: #cbd5e1;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --accent: #059669;
  --accent-dark: #10b981;
  --card-bg: white;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

/* ===== LOADING SCREEN ===== */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease-out;
}
.loading.hidden {
  opacity: 0;
  pointer-events: none;
}
.spinner {
  width: 60px;
  height: 60px;
  border: 5px solid var(--bg-tertiary);
  border-top: 5px solid var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== SCROLL PROGRESS BAR ===== */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  width: 0%;
  z-index: 9999;
  transition: width 0.3s ease;
}

/* ===== NAVIGATION ===== */
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem 0;
  background: rgba(var(--bg-primary), 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: all 0.3s ease;
}
.navbar.scrolled {
  padding: 0.8rem 0;
  background: rgba(var(--bg-primary), 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.logo {
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--accent);
}
.theme-toggle {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: var(--transition);
  margin: 0 1rem;
}
.light-mode .theme-toggle {
  background: rgba(15, 23, 42, 0.1);
  color: #1e293b;
}
.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}
.light-mode .theme-toggle:hover {
  background: rgba(15, 23, 42, 0.2);
}
.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}
.nav-links a {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
}
.nav-links a:hover {
  color: var(--accent);
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary), var(--bg-tertiary));
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background-image: url('image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="noise" width="10" height="10" patternUnits="userSpaceOnUse"><rect width="10" height="10" fill="hsla(0,0%,100%,0.02)"/><circle cx="5" cy="5" r="1" fill="hsla(0,0%,100%,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23noise)"/></svg>');
  opacity: 0.1;
  animation: noise 20s linear infinite;
}
@keyframes noise {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(5px, 5px); }
  50% { transform: translate(-5px, -5px); }
  75% { transform: translate(-2px, 3px); }
}
.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 2;
}
.hero-text h1 {
  font-size: 3.8rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
  line-height: 1.1;
  color: white;
}
.tagline {
  font-size: 1.6rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}
.elevator-pitch {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 500px;
}
.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn {
  padding: 12px 30px;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--accent);
}
.btn-outline:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
}
.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}
.profile-photo {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--accent), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 4rem;
  box-shadow: 0 20px 40px rgba(16, 185, 129, 0.3);
  animation: pulse 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ===== SECTIONS ===== */
.section {
  padding: 6rem 0;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}
.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--text-primary);
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--accent);
  margin: 0.8rem auto;
  border-radius: 2px;
}

/* ===== ABOUT ===== */
.about {
  background: var(--bg-secondary);
}
.about-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: center;
}
.about-image {
  text-align: center;
}
.about-avatar {
  width: 280px;
  height: 280px;
  border-radius: 20px;
  background: linear-gradient(45deg, var(--accent), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
  margin: 0 auto;
  box-shadow: 0 15px 30px rgba(16, 185, 129, 0.2);
}
.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--accent);
}
.about-text p {
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
}
.resume-btn {
  margin-top: 1.5rem;
}

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}
.skill-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}
.skill-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.skill-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.2);
}
.skill-icon {
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: 1rem;
}
.skill-card h4 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}
.skill-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== PROJECTS ===== */
.projects {
  background: var(--bg-secondary);
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}
.project-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}
.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.2);
}
.project-image {
  height: 180px;
  background: linear-gradient(45deg, var(--accent), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  transition: transform 0.3s ease;
}
.project-content {
  padding: 1.5rem;
}
.project-content h4 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}
.project-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.tech-tag {
  background: rgba(15, 23, 42, 0.1);
  color: var(--accent);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--accent);
}
.project-links {
  display: flex;
  gap: 1rem;
}
.project-link {
  color: var(--accent);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.3s ease;
}
.project-link:hover {
  color: var(--accent-dark);
}

/* ===== CERTIFICATIONS ===== */
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.cert-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: var(--box-shadow);
  border-left: 4px solid var(--accent);
  opacity: 0;
  transform: translateY(20px);
}
.cert-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.cert-card h4 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}
.cert-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ===== CONTACT ===== */
.contact {
  background: var(--bg-primary);
}
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--accent);
}
.contact-info p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
}
.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--bg-tertiary);
  color: white;
  border-radius: 50%;
  transition: var(--transition);
}
.social-link:hover {
  background: var(--accent);
  transform: translateY(-3px);
}
.contact-form {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.2);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid var(--accent);
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-primary);
  color: var(--text-secondary);
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid var(--bg-tertiary);
}
.footer p {
  font-size: 0.95rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .hero-content,
  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .hero-text h1 {
    font-size: 3rem;
  }
  .tagline {
    font-size: 1.4rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    gap: 1.5rem;
  }
  .hero {
    min-height: auto;
    padding: 8rem 0 4rem;
  }
  .hero-text h1 {
    font-size: 2.8rem;
  }
  .profile-photo {
    width: 250px;
    height: 250px;
  }
  .section {
    padding: 4rem 0;
  }
  .section-title {
    font-size: 2.2rem;
  }
  .hero-buttons {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: 1rem;
    font-size: 0.9rem;
  }
  .btn {
    padding: 10px 20px;
    font-size: 0.95rem;
  }
  .section-title {
    font-size: 2rem;
  }
}