/* ============================================================
   style.css  —  Shusam Shrestha Portfolio
   ============================================================ */

/* ── RESET & ROOT VARIABLES ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0a0f1a;
  --surface:   #111827;
  --border:    #1e2d45;
  --accent:    #38bdf8;
  --accent2:   #818cf8;
  --text:      #e2e8f0;
  --muted:     #64748b;
  --highlight: #0ea5e9;
  --font-head: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-head);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── NAVBAR ── */
nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 2.5rem;
  background: rgba(10,15,26,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
nav.nav-scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.45);
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--muted);
  font-size: 0.875rem; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.nav-active { color: var(--accent); }

/* ── HAMBURGER BURGER BUTTON ── */
#burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
#burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
#burger.burger-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#burger.burger-active span:nth-child(2) { opacity: 0; }
#burger.burger-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── HERO SECTION ── */
#hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 6rem 2.5rem 4rem;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.35;
}
.hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56,189,248,0.12) 0%, transparent 70%);
  top: -100px; right: -100px;
  pointer-events: none;
}
.hero-content { position: relative; max-width: 780px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--accent); border: 1px solid rgba(56,189,248,0.3);
  padding: 0.35rem 0.85rem; border-radius: 999px;
  margin-bottom: 1.5rem;
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 700; line-height: 1.08;
  letter-spacing: -0.03em;
}
h1 .name-accent { color: var(--accent); }

.hero-typed {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1rem;
  margin-top: 1rem;
  min-height: 1.5em;
}
#typed-role::after {
  content: '|';
  color: var(--accent);
  animation: blink 0.75s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-sub {
  margin-top: 1.25rem;
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.7;
}
.hero-actions {
  margin-top: 2.5rem;
  display: flex; gap: 1rem; flex-wrap: wrap;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-head); font-size: 0.9rem; font-weight: 600;
  border-radius: 8px; text-decoration: none;
  cursor: pointer; transition: all 0.2s;
  border: none;
}
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: #7dd3fc; transform: translateY(-1px); }
.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); }

/* ── SHARED SECTION STYLES ── */
section { padding: 5rem 2.5rem; }
.container { max-width: 900px; margin: 0 auto; }
.section-label {
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--accent); letter-spacing: 0.12em;
  text-transform: uppercase; margin-bottom: 0.5rem;
}
h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700; letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
}
.divider { height: 1px; background: var(--border); margin: 0; }

/* ── ABOUT SECTION ── */
#about { background: var(--surface); }
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: start;
}
.about-text p { color: var(--muted); line-height: 1.8; margin-bottom: 1rem; }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.contact-list li {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.9rem; color: var(--muted);
}
.contact-list .icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--border); display: flex;
  align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.contact-list a { color: var(--accent); text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* ── SKILLS SECTION ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.skill-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.25rem 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
  cursor: default;
}
.skill-card:hover { border-color: var(--accent); }
.skill-card .skill-icon { font-size: 1.75rem; margin-bottom: 0.5rem; }
.skill-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.25rem; }
.skill-card p { font-size: 0.8rem; color: var(--muted); }

/* ── EDUCATION SECTION ── */
#education { background: var(--surface); }
.edu-list { display: flex; flex-direction: column; gap: 1.25rem; }
.edu-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.5rem 1.75rem;
  display: grid; grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem; align-items: center;
  transition: border-color 0.2s;
}
.edu-card:hover { border-color: var(--accent2); }
.edu-card .level {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--accent2); text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: 0.3rem;
}
.edu-card h3 { font-size: 1rem; font-weight: 600; }
.edu-card .school { font-size: 0.875rem; color: var(--muted); margin-top: 0.2rem; }
.gpa-badge {
  background: rgba(56,189,248,0.1); border: 1px solid rgba(56,189,248,0.25);
  color: var(--accent); font-family: var(--font-mono);
  font-size: 0.85rem; font-weight: 600;
  padding: 0.35rem 0.75rem; border-radius: 8px;
  white-space: nowrap; align-self: start;
}

/* ── CERTIFICATIONS SECTION ── */
.cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.cert-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.cert-card:hover { border-color: var(--accent2); transform: translateY(-2px); }
.cert-card .cert-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.cert-card h3 { font-size: 1rem; font-weight: 600; }
.cert-card p { font-size: 0.82rem; color: var(--muted); margin-top: 0.35rem; }

/* ── CONTACT SECTION ── */
#contact {
  background: linear-gradient(135deg, #0a0f1a 0%, #0c1829 100%);
  text-align: center;
}
#contact h2 { margin-bottom: 0.75rem; }
#contact .sub { color: var(--muted); margin-bottom: 2.5rem; font-size: 1rem; }
.contact-links { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* ── FOOTER ── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* ── SCROLL REVEAL (powered by script.js) ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── BACK TO TOP BUTTON (powered by script.js) ── */
#back-to-top {
  position: fixed;
  bottom: 1.75rem; right: 1.75rem;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  border: none; cursor: pointer;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 99;
  box-shadow: 0 4px 14px rgba(56,189,248,0.35);
}
#back-to-top.btt-visible { opacity: 1; pointer-events: auto; }
#back-to-top:hover { transform: translateY(-3px); }

/* ── RESPONSIVE — MOBILE ── */
@media (max-width: 640px) {
  nav { padding: 1rem 1.25rem; }
  section { padding: 3.5rem 1.25rem; }
  #hero { padding: 5rem 1.25rem 3rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .edu-card { grid-template-columns: 1fr; }
  .gpa-badge { justify-self: start; }

  /* Show burger, hide normal links */
  #burger { display: flex; }
  .nav-links {
    position: fixed;
    top: 57px; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-links.nav-open { max-height: 320px; }
  .nav-links li a {
    display: block;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--border);
  }
}

/* ── REDUCED MOTION ACCESSIBILITY ── */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}