/* ===========================
   ROOT & RESET
=========================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #080b12;
  --bg-secondary: #0d1117;
  --bg-card: rgba(17, 24, 39, 0.4);
  --bg-card-hover: rgba(27, 32, 41, 0.6);
  --surface-container: rgba(22, 26, 34, 0.5);
  --surface-bright: #272c37;
  --border: rgba(99, 102, 241, 0.15);
  --border-hover: rgba(99, 102, 241, 0.45);
  --accent-1: #6366f1;
  --accent-2: #06b6d4;
  --accent-3: #a855f7;
  --accent-glow: rgba(99, 102, 241, 0.35);
  --gradient-main: linear-gradient(135deg, #6366f1, #06b6d4);
  --nav-bg: rgba(8, 11, 18, 0.6);
  --nav-bg-scrolled: rgba(8, 11, 18, 0.85);
  --navbar-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 12px rgba(99, 102, 241, 0.04);
  --footer-gradient: linear-gradient(180deg, transparent, rgba(8, 11, 18, 0.5));
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  --font-main: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --transition-smooth: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.6);
  --bg-card-hover: rgba(241, 245, 249, 0.8);
  --surface-container: rgba(226, 232, 240, 0.6);
  --surface-bright: #ffffff;
  --border: rgba(99, 102, 241, 0.25);
  --border-hover: rgba(99, 102, 241, 0.6);
  --accent-1: #4f46e5;
  --accent-2: #0891b2;
  --accent-3: #9333ea;
  --accent-glow: rgba(99, 102, 241, 0.25);
  --nav-bg: rgba(255, 255, 255, 0.7);
  --nav-bg-scrolled: rgba(255, 255, 255, 0.95);
  --navbar-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 0 12px rgba(99, 102, 241, 0.1);
  --footer-gradient: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.05));
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
}

body {
  transition: background-color 0.4s ease, color 0.4s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;

}

/* ===========================
   PARTICLES BACKGROUND
=========================== */
#particles-js {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}


/* ===========================
   NAVBAR
=========================== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 3rem;
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(99, 102, 241, 0.08);
  transition: padding var(--transition), background var(--transition), box-shadow var(--transition);
}

#navbar.scrolled {
  padding: 0.8rem 3rem;
  background: var(--nav-bg-scrolled);
  box-shadow: var(--navbar-shadow);
}

.nav-logo {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--text-primary);
}

.accent {
  color: var(--accent-1);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  transition: color var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  border-radius: 2px;
  transition: width var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===========================
   GRADIENT TEXT & HELPERS
=========================== */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mono {
  font-family: var(--font-mono);
}

/* ===========================
   HERO
=========================== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  padding: 9rem 6rem 5rem;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--accent-2);
  font-family: var(--font-mono);
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}

.hero-name {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.hero-role {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--accent-1);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.role-prefix,
.role-suffix {
  color: var(--accent-2);
  opacity: 0.7;
}

.cursor-blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 480px;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  letter-spacing: 0.02em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.btn-primary:hover::after {
  left: 120%;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 40px var(--accent-glow), 0 0 60px rgba(6, 182, 212, 0.15);
}

.btn-outline {
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--accent-1);
  background: transparent;
  position: relative;
  overflow: hidden;
}

.btn-outline::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(6, 182, 212, 0.04));
  opacity: 0;
  transition: opacity var(--transition);
}

.btn-outline:hover::before {
  opacity: 1;
}

.btn-outline:hover {
  border-color: var(--accent-1);
  background: rgba(99, 102, 241, 0.06);
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.15);
}

.btn-large {
  padding: 1.1rem 2.8rem;
  font-size: 1.1rem;
}

/* CODE CARD */
.hero-visual {
  flex: 1;
  max-width: 480px;
}

.code-card {
  background: var(--bg-card);
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 80px rgba(99, 102, 241, 0.08), 0 25px 60px rgba(0, 0, 0, 0.5);
  animation: floatCard 4s ease-in-out infinite;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.code-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 100px rgba(99, 102, 241, 0.15), 0 30px 70px rgba(0, 0, 0, 0.5);
}

@keyframes floatCard {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-12px);
  }
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.9rem 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red {
  background: #ff5f57;
}

.dot.yellow {
  background: #ffbd2e;
}

.dot.green {
  background: #28c840;
}

.code-file {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.code-body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
  overflow-x: auto;
}

code {
  display: block;
}

.kw {
  color: #c792ea;
}

.var {
  color: #82aaff;
}

.prop {
  color: #80cbc4;
}

.str {
  color: #c3e88d;
}

.bool {
  color: #ff9cac;
}

/* ===========================
   SECTION SHARED
=========================== */
section {
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--accent-2);
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  margin: 0.8rem auto 0;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  border-radius: 2px;
}

/* ===========================
   ABOUT
=========================== */
.about {
  padding: 7rem 2rem;
  background: linear-gradient(180deg, transparent, rgba(99, 102, 241, 0.02) 30%, rgba(6, 182, 212, 0.015) 70%, transparent);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
}

.about-text strong {
  color: var(--text-primary);
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}

.tag {
  padding: 0.4rem 1rem;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 999px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--accent-2);
  transition: all var(--transition);
  backdrop-filter: blur(4px);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tag:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition), transform var(--transition);
}

.stat-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 40px rgba(99, 102, 241, 0.1);
  transform: translateY(-4px);
}

.stat-number {
  display: inline-block;
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-plus {
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent-2);
}

.stat-label {
  display: block;
  margin-top: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ===========================
   EDUCATION
=========================== */
.edu-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}

.edu-timeline::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-1), var(--accent-2));
  opacity: 0.25;
  border-radius: 2px;
}

.edu-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  position: relative;
}

.edu-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 40px rgba(99, 102, 241, 0.1);
  transform: translateX(4px);
}

.edu-icon {
  font-size: 1.8rem;
  width: 56px;
  height: 56px;
  min-width: 56px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.1));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.edu-body {
  flex: 1;
}

.edu-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.edu-year {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-2);
}

.edu-status {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--accent-1);
}

.edu-status.edu-done {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.edu-degree {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.edu-institute {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
  font-weight: 500;
}

.edu-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 600px) {
  .edu-timeline::before {
    left: 20px;
  }

  .edu-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    font-size: 1.3rem;
  }
}

/* ===========================
   PROJECTS
=========================== */
.projects {
  padding: 7rem 2rem;
  background: linear-gradient(180deg, transparent, rgba(99, 102, 241, 0.03) 50%, transparent);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(6, 182, 212, 0.04));
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: var(--radius-lg);
}

.project-card:hover::before {
  opacity: 1;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.15), 0 0 40px rgba(99, 102, 241, 0.06);
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.project-icon {
  font-size: 2rem;
}

.project-links {
  display: flex;
  gap: 0.8rem;
}

.icon-link {
  color: var(--text-muted);
  transition: color var(--transition), transform var(--transition);
  display: flex;
}

.icon-link:hover {
  color: var(--accent-1);
  transform: translateY(-2px);
}

.project-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
  color: var(--text-primary);
}

.project-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.7rem;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  color: var(--accent-2);
  border-radius: 999px;
}

/* ===========================
   CONTACT
=========================== */
.contact {
  padding: 7rem 2rem;
  text-align: center;
  position: relative;
}

.contact::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

.contact-inner {
  max-width: 600px;
  margin: 0 auto;
}

.contact-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.social-link {
  display: flex;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  background: var(--bg-card);
  transition: all var(--transition);
}

.social-link:hover {
  border-color: var(--border-hover);
  color: var(--accent-1);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.15), 0 0 20px rgba(99, 102, 241, 0.06);
  background: var(--bg-card-hover);
}

/* ===========================
   FOOTER
=========================== */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
  background: var(--footer-gradient);
}

/* ===========================
   SCROLL ANIMATIONS
=========================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    padding: 7rem 2.5rem 4rem;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-role {
    justify-content: center;
  }

  .hero-desc {
    margin: 0 auto 2.5rem;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-visual {
    max-width: 100%;
    width: 100%;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-stats {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .stat-card {
    flex: 1;
    min-width: 140px;
  }

  #navbar {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  #live-clock {
    display: none !important;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    padding: 1.5rem;
    gap: 1.2rem;
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 500px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 6rem 1.5rem 3rem;
  }
}