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

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface2: #21262d;
  --border: #30363d;
  --accent: #58a6ff;
  --accent2: #3fb950;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  --radius: 8px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --transition: 0.25s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  min-height: 100vh;
}

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

a:hover { color: #79c0ff; }

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

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ===== Navigation ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition);
}

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

/* ===== Layout ===== */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 5rem 0; }

.section-label {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

.divider {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  margin-bottom: 2.5rem;
}

/* ===== Hero ===== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 60px;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(88,166,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { max-width: 640px; }

.hero-greeting {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.hero-name {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--text) 40%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.hero-tagline {
  font-size: clamp(1rem, 3vw, 1.4rem);
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.hero-tagline span { color: var(--accent2); font-weight: 600; }

.hero-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 500px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  font-family: var(--font);
}

.btn-primary { background: var(--accent); color: #0d1117; }

.btn-primary:hover {
  background: #79c0ff;
  color: #0d1117;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(88,166,255,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.hero-scroll {
  margin-top: 4rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--mono);
}

.scroll-line { width: 40px; height: 1px; background: var(--border); }

/* ===== About ===== */
#about { border-top: 1px solid var(--border); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p { color: var(--text-muted); margin-bottom: 1rem; line-height: 1.9; }
.about-text p strong { color: var(--text); }

.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}

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

.stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--mono);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label { font-size: 0.8rem; color: var(--text-muted); }

/* ===== Skills ===== */
#skills { border-top: 1px solid var(--border); background: var(--surface); }

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

.skill-category {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), transform var(--transition);
}

.skill-category:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.skill-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.skill-cat-name { font-weight: 700; font-size: 1rem; margin-bottom: 1rem; color: var(--text); }

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.tag {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-family: var(--mono);
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface2);
  transition: all var(--transition);
}

.tag:hover { border-color: var(--accent); color: var(--accent); }

/* ===== Experience ===== */
#experience { border-top: 1px solid var(--border); }

.exp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color var(--transition);
}

.exp-card:hover { border-color: var(--accent); }

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.exp-title { font-size: 1.1rem; font-weight: 700; color: var(--text); }

.exp-org {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.exp-date {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  padding: 0.25rem 0.65rem;
  border: 1px solid rgba(88,166,255,0.3);
  border-radius: 20px;
  white-space: nowrap;
}

.exp-bullets { list-style: none; margin-top: 1rem; display: flex; flex-direction: column; gap: 0.6rem; }

.exp-bullets li {
  font-size: 0.92rem;
  color: var(--text-muted);
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.7;
}

.exp-bullets li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent2);
}

/* ===== Education ===== */
#education { border-top: 1px solid var(--border); background: var(--surface); }

.edu-list { display: flex; flex-direction: column; gap: 1rem; }

.edu-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  transition: border-color var(--transition);
}

.edu-card:hover { border-color: var(--accent); }

.edu-degree { font-weight: 700; font-size: 1rem; color: var(--text); margin-bottom: 0.3rem; }

.edu-school {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.edu-grade {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
  margin-top: 0.4rem;
}

.edu-date {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===== Projects ===== */
#projects { border-top: 1px solid var(--border); }

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

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.project-icon { font-size: 1.5rem; }

.project-status {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  background: rgba(63,185,80,0.1);
  border: 1px solid rgba(63,185,80,0.3);
  color: var(--accent2);
}

.project-name { font-weight: 700; font-size: 1.05rem; margin-bottom: 0.5rem; color: var(--text); }

.project-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 1rem;
}

.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; }

/* ===== Certifications ===== */
#certifications { border-top: 1px solid var(--border); background: var(--surface); }

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

.cert-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color var(--transition);
}

.cert-card:hover { border-color: var(--accent); }

.cert-icon { font-size: 1.5rem; flex-shrink: 0; }

.cert-name { font-weight: 700; font-size: 0.95rem; color: var(--text); margin-bottom: 0.2rem; }

.cert-issuer { font-family: var(--mono); font-size: 0.78rem; color: var(--text-muted); }

/* ===== Contact ===== */
#contact { border-top: 1px solid var(--border); }

.contact-inner { max-width: 600px; }

.contact-text p { color: var(--text-muted); margin-bottom: 1rem; line-height: 1.8; }

.contact-links { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.5rem; }

.contact-link-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color var(--transition);
}

.contact-link-item:hover { color: var(--accent); }

.contact-link-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: border-color var(--transition);
  flex-shrink: 0;
}

.contact-link-item:hover .contact-link-icon { border-color: var(--accent); }

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

footer span { color: #e05252; }
footer a { color: var(--text-muted); }
footer a:hover { color: var(--accent); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  section { padding: 3.5rem 0; }
  .nav-links { gap: 1.25rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-stats { grid-template-columns: repeat(4, 1fr); }
  .hero-btns { flex-direction: column; align-items: flex-start; }
  .exp-header { flex-direction: column; }
  .edu-card { flex-direction: column; gap: 0.5rem; }
}

@media (max-width: 480px) {
  .nav-links { display: none; }
  .about-stats { grid-template-columns: 1fr 1fr; }
}

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

.fade-up { animation: fadeUp 0.6s ease forwards; }
.fade-up-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-up-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-up-delay-3 { animation-delay: 0.3s; opacity: 0; }
.fade-up-delay-4 { animation-delay: 0.4s; opacity: 0; }
.fade-up-delay-5 { animation-delay: 0.5s; opacity: 0; }
