/* ─────────────────────────────────────────────
   Mitukula Saivarshith — Portfolio
   ───────────────────────────────────────────── */

:root {
  --bg:        #07101e;
  --bg2:       #0c1a2e;
  --bg3:       #111f35;
  --cyan:      #38bdf8;
  --amber:     #f59e0b;
  --green:     #22c55e;
  --violet:    #a78bfa;
  --text:      #c8d8e8;
  --muted:     #4a6580;
  --border:    rgba(56,189,248,0.1);
  --mono:      'JetBrains Mono', monospace;
  --sans:      'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg3); }

/* subtle grid */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(56,189,248,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,0.02) 1px, transparent 1px);
  background-size: 52px 52px;
}
body > * { position: relative; z-index: 1; }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 60px;
  background: rgba(7,16,30,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 6%;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--mono);
  font-size: 0.9rem; font-weight: 600;
  color: var(--cyan); letter-spacing: 0.04em;
}
.nav-logo-name {
  display: inline-block;
  opacity: 0; transform: translateY(-5px);
  transition: opacity 0.35s, transform 0.35s;
}
nav.name-in-nav .nav-logo-name { opacity: 1; transform: translateY(0); }

.nav-links {
  display: flex; align-items: center; gap: 0; list-style: none;
}
.nav-links a {
  font-size: 0.72rem; font-weight: 500;
  color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  transition: color 0.15s;
  position: relative;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--cyan); }
.nav-links a.active::after {
  content: '';
  position: absolute; bottom: -1px; left: 0.75rem; right: 0.75rem;
  height: 1px; background: var(--cyan);
}
.nav-links a::before { display: none; }
.nav-links li:last-child { margin-left: 1rem; }

.nav-resume {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600;
  color: var(--cyan); border: 1px solid rgba(56,189,248,0.35);
  border-radius: 5px; padding: 0.38rem 0.9rem;
  letter-spacing: 0.03em;
  transition: background 0.15s, border-color 0.15s;
}
.nav-resume:hover { background: rgba(56,189,248,0.08); border-color: var(--cyan); }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 4px;
}
.hamburger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--text); border-radius: 1px; transition: all 0.25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav {
  display: none; position: fixed;
  top: 60px; left: 0; right: 0; z-index: 999;
  background: rgba(7,16,30,0.98);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 6%; flex-direction: column; gap: 1.1rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a { color: var(--text); font-size: 0.95rem; transition: color 0.15s; }
.mobile-nav a:hover { color: var(--cyan); }

/* ── SECTIONS ── */
section { padding: 5.5rem 6%; max-width: 1180px; margin: 0 auto; }
.section-label {
  font-family: var(--mono); font-size: 0.68rem;
  color: var(--cyan); letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.section-title {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 700; color: #ddeeff; margin-bottom: 0.6rem;
}
.section-divider {
  width: 40px; height: 2px;
  background: var(--cyan); opacity: 0.5;
  margin-bottom: 2.75rem;
}

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: 60px; padding-left: 6%; padding-right: 6%;
  max-width: 1180px; margin: 0 auto; gap: 4rem;
}
.hero-content { flex: 1; }
.hero-eyebrow {
  font-family: var(--mono); font-size: 0.72rem;
  color: var(--cyan); letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 1.1rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.hero-eyebrow::before {
  content: ''; display: block;
  width: 24px; height: 1px; background: var(--cyan); opacity: 0.7;
}
.hero-h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.5rem);
  font-weight: 800; line-height: 1.05;
  color: #e8f4ff; margin-bottom: 1rem; letter-spacing: -1.5px;
}
.hero-h1 .cyan { color: var(--cyan); }
.hero-bio {
  font-size: 0.97rem; color: var(--muted);
  max-width: 500px; margin-bottom: 1.75rem; line-height: 1.8;
}
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 1.75rem; margin-bottom: 2.25rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.hero-stat { display: flex; flex-direction: column; }
.hero-stat-val {
  font-family: var(--mono); font-size: 1.4rem; font-weight: 700;
  color: var(--cyan);
}
.hero-stat-lbl {
  font-size: 0.65rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* CTA buttons */
.hero-btns {
  display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.75rem;
}
.btn-primary {
  background: var(--cyan); color: #07101e;
  padding: 0.65rem 1.4rem;
  font-weight: 700; font-size: 0.82rem; letter-spacing: 0.02em;
  border-radius: 6px;
  display: inline-flex; align-items: center; gap: 0.4rem;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.85; }

.btn-outline {
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 0.65rem 1.4rem;
  font-weight: 500; font-size: 0.82rem; letter-spacing: 0.02em;
  border-radius: 6px;
  display: inline-flex; align-items: center; gap: 0.4rem;
  transition: border-color 0.15s, color 0.15s;
}
.btn-outline:hover { border-color: rgba(56,189,248,0.45); color: var(--cyan); }

.hero-socials { display: flex; gap: 1.1rem; }
.hero-socials a {
  color: var(--muted); font-size: 1.15rem;
  transition: color 0.15s;
}
.hero-socials a:hover { color: var(--text); }

.hero-visual {
  flex: 0 0 340px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.85;
}

/* ── ABOUT ── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }
.about-text p { color: var(--muted); line-height: 1.85; margin-bottom: 0.9rem; font-size: 0.93rem; }
.edu-card {
  border-left: 2px solid rgba(56,189,248,0.3);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s;
}
.edu-card:hover { border-color: var(--cyan); }
.edu-card h4 { font-size: 0.9rem; font-weight: 600; color: #ddeeff; margin-bottom: 0.2rem; }
.edu-card .edu-meta { font-family: var(--mono); font-size: 0.7rem; color: var(--cyan); opacity: 0.8; }
.edu-card .edu-detail { font-size: 0.78rem; color: var(--muted); margin-top: 0.25rem; }

/* ── PROJECTS ── */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.proj-card {
  background: var(--bg2);
  padding: 1.6rem;
  display: flex; flex-direction: column;
  transition: background 0.2s;
}
.proj-card:hover { background: var(--bg3); }
.proj-badge {
  font-family: var(--mono); font-size: 0.65rem;
  color: var(--muted); margin-bottom: 0.6rem;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.proj-title { font-size: 0.95rem; font-weight: 700; color: #ddeeff; margin-bottom: 0.75rem; line-height: 1.35; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.tag {
  font-family: var(--mono); font-size: 0.62rem;
  padding: 0.15rem 0.5rem; border-radius: 3px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
}
.tag-cyan   { color: var(--cyan);   border-color: rgba(56,189,248,0.2);  background: rgba(56,189,248,0.04); }
.tag-violet { color: var(--violet); border-color: rgba(167,139,250,0.2); background: rgba(167,139,250,0.04); }
.tag-amber  { color: var(--amber);  border-color: rgba(245,158,11,0.2);  background: rgba(245,158,11,0.04); }
.tag-green  { color: var(--green);  border-color: rgba(34,197,94,0.2);   background: rgba(34,197,94,0.04); }
.proj-bullets { list-style: none; margin-bottom: 1rem; flex: 1; }
.proj-bullets li {
  font-size: 0.81rem; color: var(--muted);
  padding-left: 1rem; position: relative;
  margin-bottom: 0.45rem; line-height: 1.6;
}
.proj-bullets li::before {
  content: '–'; position: absolute; left: 0; color: var(--muted);
}
.proj-metrics { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.metric-badge {
  font-family: var(--mono); font-size: 0.67rem; font-weight: 600;
  padding: 0.18rem 0.55rem; border-radius: 3px;
}
.metric-amber { background: rgba(245,158,11,0.08); color: var(--amber); }
.metric-green { background: rgba(34,197,94,0.08);  color: var(--green); }
.proj-footer {
  display: flex; justify-content: flex-end;
  border-top: 1px solid rgba(255,255,255,0.05); padding-top: 0.85rem; margin-top: auto;
}
.proj-link {
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
  display: flex; align-items: center; gap: 0.35rem;
  transition: color 0.15s;
}
.proj-link:hover { color: var(--cyan); }

/* ── MORE PROJECTS ── */
.more-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.more-card {
  background: var(--bg2); padding: 1.25rem;
  display: flex; flex-direction: column; gap: 0.45rem;
  transition: background 0.2s;
}
.more-card:hover { background: var(--bg3); }
.more-featured { border: none; }
.more-card-top { display: flex; align-items: center; justify-content: space-between; }
.more-card-icon { font-size: 1rem; }
.more-card-lang {
  font-family: var(--mono); font-size: 0.62rem;
  padding: 0.12rem 0.45rem; border-radius: 3px;
  color: var(--muted); border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
}
.more-card-title { font-size: 0.85rem; font-weight: 700; color: #ddeeff; line-height: 1.3; }
.more-card-desc { font-size: 0.76rem; color: var(--muted); line-height: 1.55; flex: 1; }
.more-card-meta {
  display: flex; gap: 1rem; margin-top: 0.2rem;
  font-family: var(--mono); font-size: 0.68rem; color: var(--muted);
}
.more-card-meta span { display: flex; align-items: center; gap: 0.3rem; }

/* ── EXPERIENCE ── */
.exp-featured {
  border: 1px solid rgba(245,158,11,0.15);
  border-radius: 8px; padding: 1.75rem;
  background: var(--bg2);
  margin-bottom: 1.5rem;
}
.exp-header {
  display: flex; justify-content: space-between;
  align-items: flex-start; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 0.9rem;
}
.exp-title { font-size: 1rem; font-weight: 700; color: #ddeeff; }
.exp-meta { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); margin-top: 0.2rem; }
.pill {
  font-family: var(--mono); font-size: 0.67rem; font-weight: 600;
  padding: 0.18rem 0.65rem; border-radius: 3px;
}
.pill-amber { background: rgba(245,158,11,0.1); color: var(--amber); }
.pill-cyan  { background: rgba(56,189,248,0.08); color: var(--cyan); }
.exp-bullets { list-style: none; }
.exp-bullets li {
  font-size: 0.85rem; color: var(--muted);
  padding-left: 1.1rem; position: relative;
  margin-bottom: 0.55rem; line-height: 1.65;
}
.exp-bullets li::before { content: '–'; position: absolute; left: 0; }
.leadership-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.lead-card { background: var(--bg2); padding: 1.25rem; transition: background 0.2s; }
.lead-card:hover { background: var(--bg3); }
.lead-icon { font-size: 1.1rem; color: var(--cyan); margin-bottom: 0.55rem; opacity: 0.8; }
.lead-card h4 { font-size: 0.85rem; font-weight: 700; color: #ddeeff; margin-bottom: 0.35rem; }
.lead-card p  { font-size: 0.77rem; color: var(--muted); line-height: 1.6; }

/* ── SKILLS ── */
.skills-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; }
.skill-row { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; }
.skill-label {
  font-family: var(--mono); font-size: 0.67rem; color: var(--cyan);
  text-transform: uppercase; letter-spacing: 0.09em;
  min-width: 120px; padding-top: 0.25rem; flex-shrink: 0; opacity: 0.8;
}
.skill-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  font-size: 0.74rem; padding: 0.22rem 0.65rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px; color: var(--text);
  transition: border-color 0.15s;
}
.chip:hover { border-color: rgba(56,189,248,0.3); }
.coursework h3 {
  font-family: var(--mono); font-size: 0.8rem; font-weight: 600;
  color: #ddeeff; margin-bottom: 1rem; opacity: 0.8;
}
.coursework ul { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }
.coursework li {
  font-size: 0.85rem; color: var(--muted);
  padding-left: 1.1rem; position: relative; line-height: 1.5;
}
.coursework li::before { content: '–'; position: absolute; left: 0; }

/* ── CONTACT ── */
#contact { text-align: center; }
.contact-sub {
  color: var(--muted); max-width: 440px;
  margin: 0 auto 2.25rem; font-size: 0.92rem; line-height: 1.75;
}
.contact-cards { display: flex; justify-content: center; flex-wrap: wrap; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; max-width: 860px; margin: 0 auto; }
.contact-card {
  background: var(--bg2); padding: 1.4rem 1.75rem; flex: 1; min-width: 160px;
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  transition: background 0.2s;
}
.contact-card:hover { background: var(--bg3); }
.contact-card i { font-size: 1.25rem; color: var(--cyan); opacity: 0.8; }
.contact-card-label { font-family: var(--mono); font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.contact-card-val { font-size: 0.8rem; color: var(--text); font-weight: 500; word-break: break-all; }

/* ── FOOTER ── */
footer {
  text-align: center; padding: 1.75rem 6%;
  border-top: 1px solid var(--border); color: var(--muted); font-size: 0.77rem;
}
.footer-socials { display: flex; justify-content: center; gap: 1.25rem; margin-bottom: 0.65rem; }
.footer-socials a { color: var(--muted); font-size: 1rem; transition: color 0.15s; }
.footer-socials a:hover { color: var(--text); }

/* ── FADE IN ── */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.55s ease, transform 0.55s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── NAME ANIMATION ── */
.hero-h1 .name-line { display: block; overflow: hidden; line-height: 1.1; }
.hero-h1 .name-inner {
  display: block; opacity: 0; transform: translateY(105%);
  animation: nameUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-h1 .name-line:nth-child(1) .name-inner { animation-delay: 0.1s; }
.hero-h1 .name-line:nth-child(2) .name-inner { animation-delay: 0.28s; }
@keyframes nameUp {
  to { opacity: 1; transform: translateY(0); }
}
.hero-h1 { will-change: opacity, transform; transition: opacity 0.3s ease, transform 0.3s ease; }
.hero-h1.name-out { opacity: 0; transform: translateY(-16px); pointer-events: none; }

/* ── PIPELINE SVG ── */
.pipeline-svg text { font-family: var(--mono); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .nav-links, .nav-resume { display: none; }
  .hamburger { display: flex; }
  #hero { flex-direction: column; padding-top: 80px; gap: 2rem; }
  .hero-visual { display: none; }
  .about-grid, .skills-grid { grid-template-columns: 1fr; }
  .projects-grid, .more-grid { grid-template-columns: 1fr; }
  .leadership-grid { grid-template-columns: 1fr; }
  .contact-cards { flex-direction: column; }
}
@media (max-width: 600px) {
  section { padding: 4rem 5%; }
  .section-title { font-size: 1.4rem; }
  .hero-stats { gap: 1.25rem; }
  .exp-header { flex-direction: column; }
}
