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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background-color: #0f172a; /* slate-900 */
  color: #e5e7eb; /* gray-200 */
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* =========================
   LINKS
========================= */
a {
  color: #38bdf8;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #7dd3fc;
}

/* =========================
   NAVBAR
========================= */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  transition: background-color 0.3s ease;
}

.navbar {
  max-width: 1100px;
  margin: auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: #38bdf8;
}

.navbar ul {
  display: flex;
  list-style: none;
  gap: 1.2rem;
}

.navbar a {
  font-size: 0.95rem;
  color: var(--text-main); 
  position: relative;
}

.navbar a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  left: 0;
  bottom: -4px;
  background: #38bdf8;
  transition: width 0.3s ease;
}

.navbar a:hover::after {
  width: 100%;
}

/* =========================
   HERO
========================= */
.hero {
  max-width: 900px;
  margin: 5rem auto 6rem;
  padding: 0 1.5rem;
  text-align: center;
  animation: fadeUp 1s ease forwards;
}

.profile-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.5rem;
  border: 3px solid #38bdf8;
  transition: transform 0.4s ease;
}

.profile-img:hover {
  transform: scale(1.05);
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.hero h2 {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.hero p {
  max-width: 650px;
  margin: auto;
  font-size: 1rem;
  color: var(--text-muted);
}

/* Desktop Hero Links */
.hero-links {
  margin-top: 1.8rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.hero-links a {
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  color: var(--text-main);
  transition: all 0.3s ease;
  text-align: center;
}

.hero-links a:hover {
  background: var(--accent);
  color: #020617;
  transform: translateY(-3px);
  border-color: var(--accent);
}

/* Primary Button Override */
.hero-links .btn-primary {
  background-color: var(--accent);
  color: #020617;
  font-weight: 600;
  border: 1px solid var(--accent);
}

.hero-links .btn-primary:hover {
  background-color: #0ea5e9; 
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
}

body.light .hero-links .btn-primary {
  color: #ffffff; 
}

/* =========================
   SECTIONS
========================= */
section {
  max-width: 1100px;
  margin: auto;
  padding: 4rem 1.5rem;
}

section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
}

section h2::after {
  content: "";
  width: 60px;
  height: 3px;
  background: #38bdf8;
  display: block;
  margin: 0.6rem auto 0;
  border-radius: 5px;
}

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

.skills-grid li {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  transition: transform 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
}

.skills-grid li:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.1);
}

/* =========================
   EXPERIENCE
========================= */
.experience-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 1.8rem;
  max-width: 800px;
  margin: auto;
  animation: fadeUp 0.8s ease forwards;
  transition: border-color 0.3s ease;
}
.experience-card:hover {
  border-color: var(--accent);
}

.experience-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

.experience-card h4 {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.experience-card ul {
  margin-left: 1rem;
}

.experience-card li {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

/* =========================
   PROJECTS
========================= */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  transition: transform 0.4s ease, border 0.4s ease, box-shadow 0.4s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.project-card img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 1rem;
  object-fit: cover;
}

.project-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

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

.project-status {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.project-status strong {
  color: var(--accent);
}

/* =========================
   EDUCATION
========================= */
.education-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 1.5rem;
  max-width: 700px;
  margin: 1.2rem auto;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.education-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

/* =========================
   CONTACT
========================= */
#contact {
  text-align: center;
}

#contact p {
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

/* =========================
   FOOTER
========================= */
footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-soft);
}

/* =========================
   ANIMATIONS
========================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================
   RESPONSIVE & MOBILE
========================= */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  height: 3px;
  width: 25px;
  background: var(--text-main);
  margin-bottom: 5px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .navbar ul {
    gap: 0.8rem;
  }

  .navbar .nav-links {
    position: absolute;
    top: 70px;
    right: 0;
    background: var(--bg-card);
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    padding: 2rem 0;
    display: none; 
    border-bottom: 1px solid var(--border-soft);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  }

  .nav-links.active {
    display: flex;
    animation: fadeDown 0.4s ease;
  }

  .hero h1 { font-size: 2rem; }
  .hero h2 { font-size: 1rem; }
  
  /* FIXED MOBILE LINKS */
  .hero-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
  }
  
  .hero-links .btn-primary {
    flex: 1 1 100%; /* Forces Resume button to take full width */
    max-width: 400px;
  }
  
  .hero-links a:not(.btn-primary) {
    flex: 1 1 calc(33.333% - 0.8rem); /* Social links split the bottom row evenly */
    min-width: 80px;
    padding: 0.6rem 0.5rem; /* Slightly smaller padding to fit */
    font-size: 0.9rem;
  }
}

/* =========================
   SCROLL REVEAL
========================= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

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

/* =========================
   THEME VARIABLES
========================= */
:root {
  --bg-main: #0f172a;
  --bg-card: #020617;
  --text-main: #e5e7eb;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --border-soft: rgba(148, 163, 184, 0.15);
}

/* Light mode overrides */
body.light {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #020617;
  --text-muted: #475569;
  --accent: #0284c7;
  --border-soft: rgba(15, 23, 42, 0.15);
}

/* =========================
   APPLY VARIABLES
========================= */
body {
  background-color: var(--bg-main);
  color: var(--text-main);
}

header {
  background: rgba(15, 23, 42, 0.85);
}

body.light header {
  background: rgba(248, 250, 252, 0.9);
}

/* =========================
   THEME TOGGLE BUTTON
========================= */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  color: var(--text-main);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  -webkit-user-select: none; /* Prevents text highlighting on quick taps */
  user-select: none;
}

#theme-toggle:hover {
  background: var(--accent);
  color: #020617;
  transform: translateY(-2px);
}