/* =========================================
   1. VARIABLES & RESET
========================================= */
:root {
  /* -- Colors -- */
  --bg-dark: #0f172a;
  /* Deep Blue Background */
  --bg-card: #1e293b;
  /* Lighter Card Background */
  --bg-darker: #020617;
  /* Section Contrast */

  --primary: #38bdf8;
  /* Sky Blue Accent */
  --primary-hover: #0ea5e9;

  --text-main: #ffffff;
  --text-muted: #cbd5e1;

  /* -- Spacing & Layout -- */
  --nav-height: 80px;
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', Arial, sans-serif;
  /* Clean modern font */
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

/* =========================================
   2. NAVBAR
========================================= */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--nav-height);
  padding: 0 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.9);
  /* Glass effect base */
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1000;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.highlight {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

/* =========================================
   3. HERO SECTION
========================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--nav-height);
}

.hero-content {
  animation: fadeUp 1s ease-out;
  max-width: 800px;
  padding: 20px;
}

.greeting {
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.9rem;
  margin-bottom: 10px;
  display: block;
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 15px;
}

.hero h2 {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 25px;
}

.hero p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
  font-size: 1.1rem;
}

/* Buttons */
.hero-btns {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn {
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  transition: var(--transition);
}

.primary-btn {
  background: var(--primary);
  color: var(--bg-dark);
}

.primary-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px rgba(56, 189, 248, 0.5);
}

.secondary-btn {
  background: transparent;
  border: 2px solid var(--text-muted);
  color: var(--text-main);
}

.secondary-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* =========================================
   4. COMMON SECTIONS
========================================= */
section {
  padding: 100px 20px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin: 0 auto 60px auto; /* Centers the block itself */
    position: relative;
    display: table;           /* Ensures underline stays with text */
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary);
  margin: 10px auto 0;
  border-radius: 2px;
}

/* About */
.about {
  background: var(--bg-darker);
  text-align: center;
}

.about p {
  max-width: 800px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Skills */
.skills {
  background: var(--bg-dark);
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  max-width: 900px;
  margin: 0 auto;
}

.skill-card {
  background: var(--bg-card);
  padding: 15px 25px;
  border-radius: 8px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.skill-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Projects */
.projects {
  background: var(--bg-darker);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.project-card {
  background: var(--bg-card);
  padding: 30px;
  border-radius: var(--border-radius);
  transition: var(--transition);
  border: 1px solid transparent;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: rgba(56, 189, 248, 0.3);
}

.project-card h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--text-main);
}

.project-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.project-card .tech-stack {
  font-size: 0.85rem;
  color: var(--primary);
  font-family: monospace;
  background: rgba(56, 189, 248, 0.1);
  padding: 5px 10px;
  border-radius: 4px;
  display: inline-block;
}

/* Experience & Education */
.experience,
.education {
  background: var(--bg-dark);
}

.timeline-card {
  background: var(--bg-card);
  padding: 30px;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  border-left: 4px solid var(--primary);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.timeline-header h3 {
  font-size: 1.2rem;
}

.timeline-header .date {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.timeline-card h4 {
  color: var(--text-muted);
  margin-bottom: 15px;
  font-weight: 500;
}

.timeline-card ul,
.timeline-card p {
  color: var(--text-muted);
  margin-left: 15px;
}

.timeline-card li {
  margin-bottom: 8px;
  list-style-type: disc;
}

/* Contact */
.contact {
  background: var(--bg-darker);
  text-align: center;
}

.contact-sub {
  color: var(--text-muted);
  margin-bottom: 40px;
}

.contact-form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 15px;
  background: var(--bg-dark);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
.footer {
  background: var(--bg-dark);
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.social-links a {
  margin: 0 15px;
  font-weight: 600;
  color: var(--text-muted);
}

.social-links a:hover {
  color: var(--primary);
}

/* =========================================
   5. ANIMATIONS
========================================= */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.show {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays handled in JS */

/* =========================================
   6. RESPONSIVE
========================================= */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .navbar {
    padding: 0 20px;
  }

  .nav-links {
    display: none;
  }

  /* In a real project, add a hamburger menu here */

  .timeline-header {
    flex-direction: column;
  }

  .timeline-header .date {
    margin-top: 5px;
  }
}