﻿:root {
  --bg: #050912;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-strong: rgba(255, 255, 255, 0.07);
  --text: #eaf0ff;
  --muted: #9ba7c7;
  --accent: #76f7d8;
  --accent-2: #9a7bff;
  --accent-3: #ff6b9d;
  --outline: rgba(255, 255, 255, 0.08);
  --glow: rgba(118, 247, 216, 0.22);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  margin: 0;
  font-family: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(118, 247, 216, 0.08), transparent 35%),
              radial-gradient(circle at 80% 0%, rgba(154, 123, 255, 0.1), transparent 30%),
              radial-gradient(circle at 50% 100%, rgba(255, 107, 157, 0.06), transparent 40%),
              #04070f;
  color: var(--text);
  min-height: 100vh;
  padding: 32px 18px 48px;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Loading Screen */
.loader-wrapper {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #050912, #0a0e1a);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-wrapper.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader {
  text-align: center;
}

.loader-ring {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 1s linear infinite;
}

.loader-text {
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

main { max-width: 1180px; margin: 0 auto; position: relative; z-index: 1; }

.backdrop { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }

#particle-canvas {
  position: absolute;
  inset: 0;
  opacity: 0.4;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 60%);
}

.orb { position: absolute; filter: blur(80px); opacity: 0.45; border-radius: 50%; }
.orb-a { width: 450px; height: 450px; background: linear-gradient(135deg, #1df6d1, #00c9a7); top: 10%; left: 8%; animation: float 16s ease-in-out infinite; }
.orb-b { width: 550px; height: 550px; background: linear-gradient(135deg, #7b6dff, #9a7bff); bottom: 8%; right: 4%; animation: float 18s ease-in-out infinite reverse; }
.orb-c { width: 400px; height: 400px; background: linear-gradient(135deg, #ff6b9d, #ff8fab); top: 50%; right: 20%; animation: float 20s ease-in-out infinite; }

.nav {
  max-width: 1180px;
  margin: 0 auto 18px;
  padding: 16px 18px;
  background: rgba(10, 14, 24, 0.85);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  position: sticky;
  top: 18px;
  z-index: 10;
  backdrop-filter: blur(16px);
}

.brand {
  font-weight: 700;
  letter-spacing: 0.6px;
  font-size: 18px;
}

.nav-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px; }
.nav a:hover { color: var(--text); }

.nav-actions { display: flex; gap: 10px; }

.pill, .ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--outline);
  color: var(--text);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.pill::before, .ghost::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.pill:hover::before, .ghost:hover::before {
  transform: translateX(100%);
}

.pill { 
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); 
  color: #02030a; 
  border: none; 
  box-shadow: 0 4px 20px rgba(118, 247, 216, 0.3);
}

.pill:hover { 
  transform: translateY(-2px); 
  box-shadow: 0 10px 35px rgba(118, 247, 216, 0.4); 
}

.ghost { background: rgba(255, 255, 255, 0.04); }
.ghost:hover { 
  border-color: rgba(255, 255, 255, 0.25); 
  background: rgba(255, 255, 255, 0.08);
  color: #fff; 
  transform: translateY(-2px);
}

.panel {
  background: linear-gradient(145deg, rgba(12, 16, 26, 0.85), rgba(10, 14, 24, 0.7));
  border: 1px solid var(--outline);
  border-radius: 20px;
  padding: 28px;
  margin: 16px 0;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.panel:hover {
  transform: translateY(-2px);
  border-color: rgba(118, 247, 216, 0.15);
}

.panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(118, 247, 216, 0.08), transparent 40%),
              radial-gradient(circle at 70% 80%, rgba(154, 123, 255, 0.08), transparent 45%);
  pointer-events: none;
}

.highlight { 
  border-color: rgba(118, 247, 216, 0.25); 
  box-shadow: 0 20px 80px rgba(118, 247, 216, 0.12), 
              0 0 60px rgba(154, 123, 255, 0.08);
}

.hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 28px; align-items: center; }
.hero h1 { font-size: 36px; margin: 10px 0 12px; line-height: 1.18; }
.lede { color: var(--muted); font-size: 16px; line-height: 1.6; margin-bottom: 16px; }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.badge { background: rgba(255, 255, 255, 0.05); color: #fff; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--outline); font-size: 13px; }
.eyebrow { color: var(--accent); letter-spacing: 1px; text-transform: uppercase; font-size: 12px; font-weight: 700; }
.cta-row { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 10px; }
.stat { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--outline); border-radius: 14px; padding: 12px 14px; }
.stat-number { font-size: 20px; font-weight: 700; }
.stat-label { color: var(--muted); font-size: 13px; margin-top: 4px; }

.hero-card {
  background: linear-gradient(160deg, rgba(14, 20, 32, 0.9), rgba(11, 16, 26, 0.7));
  border: 1px solid rgba(118, 247, 216, 0.2);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(118, 247, 216, 0.16), transparent 55%);
  top: -40px; right: -40px;
}
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-title { font-weight: 700; font-size: 20px; }
.tiny { color: var(--muted); font-size: 12px; }
.pulse-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(118, 247, 216, 0.45); animation: pulse 2s infinite; }
.card-body { color: var(--muted); font-size: 14px; line-height: 1.6; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.chip { background: rgba(255,255,255,0.07); border: 1px solid var(--outline); padding: 6px 10px; border-radius: 10px; color: #fff; font-size: 12px; }
.mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.mini-label { color: var(--muted); font-size: 12px; }
.mini-value { color: #fff; font-weight: 600; font-size: 14px; }

.section-heading h2 { margin: 6px 0 10px; font-size: 26px; }
.section-heading p { margin: 0; color: var(--muted); }

.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 14px; }
.summary-item { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--outline); border-radius: 14px; padding: 14px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.05); }
.summary-item h3 { margin: 4px 0 8px; font-size: 18px; }
.summary-item p { margin: 0; color: var(--muted); line-height: 1.6; }

.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.skill-card { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--outline); padding: 14px; border-radius: 14px; }
.skill-card h3 { margin: 4px 0 8px; font-size: 17px; }
.skill-card p { margin: 0; color: var(--muted); line-height: 1.5; }

.projects-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
    gap: 20px; 
    margin-top: 16px; 
  }

.project-card { 
  background: rgba(255, 255, 255, 0.03); 
  border: 1px solid rgba(118, 247, 216, 0.16); 
  border-radius: 16px; 
  padding: 20px; 
  box-shadow: 0 15px 45px rgba(0,0,0,0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(118, 247, 216, 0.4);
  box-shadow: 0 25px 70px rgba(118, 247, 216, 0.2);
}

.project-card:hover::before {
  transform: scaleX(1);
}
.project-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.project-card h3 { margin: 2px 0 8px; font-size: 19px; line-height: 1.3; }
.project-card > p { margin: 0 0 10px 0; color: var(--muted); line-height: 1.6; font-size: 14px; }
.project-card ul { margin: 10px 0 12px; padding-left: 18px; color: var(--muted); line-height: 1.6; flex-grow: 1; font-size: 14px; }
.project-card ul li { margin-bottom: 6px; }
.project-card .github-link { 
  display: inline-flex; 
  align-items: center; 
  gap: 6px; 
  color: var(--accent); 
  text-decoration: none; 
  font-size: 13px; 
  font-weight: 600;
  margin-top: auto;
  padding-top: 10px;
  transition: color 0.2s ease;
}
.project-card .github-link:hover { color: var(--accent-2); }
.project-card .github-link svg { width: 16px; height: 16px; }
.tag { background: rgba(255,255,255,0.08); border: 1px solid var(--outline); padding: 6px 10px; border-radius: 999px; font-size: 12px; color: #fff; white-space: nowrap; }

.timeline { position: relative; margin-top: 12px; }
.timeline::before { content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--accent), transparent); opacity: 0.5; }
.timeline-item { position: relative; padding-left: 26px; }
.timeline-item::before { content: ''; position: absolute; left: 4px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px rgba(118, 247, 216, 0.12); }
.timeline-date { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.timeline h3 { margin: 0 0 8px; font-size: 18px; }
.timeline ul { margin: 0 0 10px; padding-left: 18px; color: var(--muted); line-height: 1.55; }
.stack-line { color: var(--muted); font-size: 13px; }

.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.edu-card { background: rgba(255,255,255,0.03); border: 1px solid var(--outline); border-radius: 14px; padding: 14px; }
.edu-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.edu-card h3 { margin: 0 0 6px; font-size: 17px; }
.edu-card p { margin: 0 0 6px; color: var(--muted); line-height: 1.5; }
.dim { color: #8190b8; font-size: 13px; }

.list-block { display: grid; gap: 10px; margin-top: 12px; }
.list-item { border: 1px solid var(--outline); border-radius: 12px; padding: 12px; background: rgba(255,255,255,0.03); display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.list-item h3 { margin: 0 0 6px; font-size: 17px; }
.list-item p { margin: 0; color: var(--muted); line-height: 1.5; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.contact-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.8px; }
.contact-grid a { color: #fff; text-decoration: none; font-weight: 600; }
.contact-grid a:hover { color: var(--accent); }

.footer { max-width: 1180px; margin: 24px auto 0; color: var(--muted); text-align: center; font-size: 13px; display: flex; justify-content: center; gap: 8px; letter-spacing: 0.2px; }
.dot { color: rgba(255, 255, 255, 0.3); }

.reveal { opacity: 0; transform: translateY(30px); transition: all 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  color: #02030a;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(118, 247, 216, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(118, 247, 216, 0.4);
}

.scroll-to-top:active {
  transform: translateY(-1px);
}

@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(118, 247, 216, 0.45); } 70% { box-shadow: 0 0 0 12px rgba(118, 247, 216, 0); } 100% { box-shadow: 0 0 0 0 rgba(118, 247, 216, 0); } }
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-16px); } 100% { transform: translateY(0px); } }

@media (max-width: 980px) {
  body { padding-top: 18px; }
  .nav { grid-template-columns: 1fr; position: sticky; top: 10px; }
  .nav-links { justify-content: flex-start; }
  .nav-actions { justify-content: flex-start; }
  .hero { grid-template-columns: 1fr; }
  .card-header { align-items: flex-start; }
}

@media (max-width: 640px) {
  body { padding: 16px 12px 36px; }
  .panel { padding: 20px; }
  .nav { padding: 12px 14px; }
  .nav-links { gap: 12px; }
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .list-item { flex-direction: column; align-items: flex-start; }
  .project-card { min-height: auto; }
}
