/* ============================================
   CSS VARIABLES — Change these to theme your site!
   ============================================ */
:root {
  /* Colors */
  --bg-primary:   #0a0a0f;
  --bg-secondary: #111118;
  --bg-card:      #16161f;
  --text:         #e4e4e7;
  --text-muted:   #71717a;
  --accent:       #818cf8;       /* Indigo */
  --accent-2:     #c084fc;       /* Purple */
  --accent-glow:  rgba(129, 140, 248, 0.15);
  --border:       #27272a;

  /* Fonts */
  --font-main: 'Inter', sans-serif;
  --font-code: 'Fira Code', monospace;

  /* Spacing */
  --section-padding: 100px 0;
  --container-width: 1100px;

  /* Transitions */
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;       /* Smooth scroll when clicking nav links */
  scroll-padding-top: 80px;      /* Offset for fixed navbar */
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;            /* Prevent horizontal scroll from SVGs */
}

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

a:hover {
  color: var(--accent-2);
}

img {
  max-width: 100%;
  display: block;
}

/* Reusable container */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   NAVBAR
   ============================================ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  transition: background var(--transition), box-shadow var(--transition);
}

/* When scrolled, navbar gets a solid background */
#navbar.scrolled {
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);             /* Frosted glass effect */
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-code);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}

/* Animated underline on hover */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hamburger button (hidden on desktop) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
  border-radius: 2px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 24px 60px;
}

/* Floating background SVG shapes */
.hero-bg-shapes {
  position: absolute;
  inset: 0;                    /* Shorthand for top/right/bottom/left: 0 */
  pointer-events: none;        /* Let clicks pass through */
}

.shape {
  position: absolute;
  opacity: 0.5;
}

.shape-1 { width: 300px; top: 10%; right: 5%; }
.shape-2 { width: 200px; bottom: 20%; left: 5%; }
.shape-3 { width: 180px; top: 50%; right: 30%; }
.shape-4 { width: 80px;  top: 15%; left: 20%; }
.shape-5 { width: 120px; bottom: 10%; right: 20%; }

/* Main hero content */
.hero-content {
  text-align: center;
  position: relative;           /* Above the background shapes */
  z-index: 1;
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-name {
  font-size: clamp(2.5rem, 8vw, 5rem);   /* Responsive font size */
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
}

/* Gradient text effect */
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Typewriter effect */
.typewriter-wrapper {
  font-size: 1.3rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  min-height: 2em;              /* Prevent layout shift */
  display: flex;
  align-items: center;
  justify-content: center;
}

.typewriter {
  color: var(--accent-2);
  font-weight: 600;
}

/* Blinking cursor animation */
.cursor {
  color: var(--accent);
  font-weight: 300;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 32px;
}

/* Buttons */
.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: transparent;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent-glow);
  transform: translateY(-2px);
}

.btn-large {
  padding: 16px 40px;
  font-size: 1.05rem;
}

/* Social icons row */
.social-links {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.social-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition);
}

.social-icon svg {
  width: 18px;
  height: 18px;
}

.social-icon:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

/* Scroll down indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
}

.scroll-indicator svg {
  width: 28px;
  height: 28px;
  animation: bounce 2s ease infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}

/* ============================================
   WAVE DIVIDER (between sections)
   ============================================ */
.wave-divider {
  margin-top: -2px;
  line-height: 0;        /* Remove extra space under SVG */
}

.wave-divider svg {
  width: 100%;
  height: 80px;
}

.wave-flip {
  transform: scaleY(-1);  /* Flip the wave upside down */
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 50px;
  text-align: center;
}

.title-number {
  font-family: var(--font-code);
  color: var(--accent);
  font-size: 1rem;
  font-weight: 400;
  margin-right: 8px;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
  background: var(--bg-secondary);
  padding: var(--section-padding);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1rem;
}

.about-text strong {
  color: var(--accent);
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all var(--transition);
}

.highlight-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.highlight-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
}

.highlight-card h3 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.highlight-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Profile image area */
.about-image {
  display: flex;
  justify-content: center;
}

.image-wrapper {
  position: relative;
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.avatar-placeholder {
  width: 180px;
  height: 180px;
  border-radius: 16px;
  overflow: hidden;
}

/* ============================================
   SKILLS SECTION
   ============================================ */
.skills {
  padding: var(--section-padding);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition);
}

.skill-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.skill-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.skill-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

/* Animated skill bar */
.skill-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;                          /* Starts at 0, animated by JS */
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 3px;
  transition: width 1.2s ease;       /* Smooth fill animation */
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects {
  background: var(--bg-secondary);
  padding: var(--section-padding);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all var(--transition);
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px var(--accent-glow);
}

.project-image {
  width: 100%;
  overflow: hidden;
}

.project-image svg {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image svg {
  transform: scale(1.03);      /* Slight zoom on hover */
}

.project-info {
  padding: 24px;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.project-top > svg {
  width: 32px;
  height: 32px;
}

.project-links {
  display: flex;
  gap: 12px;
}

.project-links a {
  color: var(--text-muted);
  transition: color var(--transition);
}

.project-links a:hover {
  color: var(--accent);
}

.project-links svg {
  width: 20px;
  height: 20px;
}

.project-info h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.project-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tags span {
  font-family: var(--font-code);
  font-size: 0.75rem;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
  padding: var(--section-padding);
}

.contact-content {
  text-align: center;
  max-width: 550px;
  margin: 0 auto;
}

.contact-icon {
  width: 120px;
  height: 80px;
  margin: 0 auto 24px;
}

.contact-content h3 {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.contact-content p {
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.7;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
}

.footer-terminal {
  width: 200px;
  margin: 0 auto 16px;
}

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

.footer-text strong {
  color: var(--accent);
}

.footer-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ============================================
   SCROLL ANIMATIONS (fade-in effect)
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {

  /* Show hamburger, hide desktop nav */
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 12px;
  }

  /* Hamburger active state (X shape) */
  .hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Stack about section vertically */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image {
    order: -1;       /* Show image first on mobile */
  }

  .about-highlights {
    grid-template-columns: 1fr;
  }

  /* Adjust hero for small screens */
  .hero {
    padding: 100px 20px 60px;
  }

  .hero-name {
    font-size: 2.5rem;
  }

  /* Make background shapes smaller */
  .shape-1 { width: 150px; }
  .shape-2 { width: 100px; }
  .shape-3 { width: 100px; }

  /* Stack project cards */
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}
