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

:root {
  --bg:          #080a0f;
  --surface:     #0d1018;
  --surface-2:   #131620;
  --text:        #dde2f0;
  --text-muted:  #7480a0;
  --text-faint:  #3a4260;
  --accent:      #06b6d4;
  --accent-dim:  #071e28;
  --accent-glow: rgba(6, 182, 212, 0.12);
  --border:      #161b2c;
  --border-mid:  #1e2538;
  --font-serif:  'DM Serif Display', Georgia, serif;
  --font-sans:   'Inter', system-ui, sans-serif;
  --max-w:       1080px;
  --ease:        cubic-bezier(0.16, 1, 0.3, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.serif { font-family: var(--font-serif); font-weight: 400; }
a { color: inherit; text-decoration: none; }

/* ============================================================
   SCROLL REVEAL
============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal .exp-row,
.reveal .project-row,
.reveal .skill-row,
.reveal .edu-row {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), background 0.2s, box-shadow 0.2s var(--ease);
}
.reveal.visible .exp-row,
.reveal.visible .project-row,
.reveal.visible .skill-row,
.reveal.visible .edu-row {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   SCROLL PROGRESS BAR
============================================================ */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  z-index: 200;
  transition: width 0.1s linear;
}

/* ============================================================
   NAV
============================================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  height: 58px;
  background: rgba(8, 10, 15, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, height 0.3s;
}

nav.scrolled { border-bottom-color: var(--border); height: 52px; }

.nav-name {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: color 0.2s;
}
.nav-name:hover { color: var(--accent); }

nav ul { display: flex; align-items: center; list-style: none; }

nav ul li a {
  position: relative;
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 0.4rem 0.75rem;
  border-radius: 5px;
  transition: color 0.15s;
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%; right: 50%;
  height: 1px;
  background: var(--accent);
  border-radius: 1px;
  transition: left 0.2s var(--ease), right 0.2s var(--ease);
}

nav ul li a:hover,
nav ul li a.active { color: var(--text); }

nav ul li a:hover::after,
nav ul li a.active::after { left: 0.75rem; right: 0.75rem; }

/* ============================================================
   SHARED
============================================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 2.5rem);
}

section { padding: 7rem 0; }

.section-heading {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  letter-spacing: -0.025em;
  color: var(--text-faint);
  margin-bottom: 3rem;
}

/* ============================================================
   ORBS / BACKGROUND VISUALS
============================================================ */
#orb-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0;
  animation: orb-fade-in 2s var(--ease) forwards;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.18) 0%, transparent 70%);
  top: -180px;
  left: -100px;
  animation-delay: 0.3s;
  animation: orb-fade-in 2s var(--ease) 0.3s forwards, orb-drift-1 18s ease-in-out 2.3s infinite alternate;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.14) 0%, transparent 70%);
  top: 10%;
  right: -120px;
  animation: orb-fade-in 2s var(--ease) 0.7s forwards, orb-drift-2 22s ease-in-out 2.7s infinite alternate;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
  bottom: 20%;
  left: 30%;
  animation: orb-fade-in 2s var(--ease) 1.1s forwards, orb-drift-3 26s ease-in-out 3.1s infinite alternate;
}

@keyframes orb-fade-in {
  to { opacity: 1; }
}

@keyframes orb-drift-1 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(60px, 80px) scale(1.08); }
  66%  { transform: translate(-40px, 120px) scale(0.95); }
  100% { transform: translate(80px, 40px) scale(1.05); }
}

@keyframes orb-drift-2 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(-70px, 60px) scale(1.06); }
  66%  { transform: translate(-30px, -80px) scale(0.92); }
  100% { transform: translate(-90px, 40px) scale(1.1); }
}

@keyframes orb-drift-3 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(50px, -60px) scale(1.12); }
  100% { transform: translate(-60px, 40px) scale(0.9); }
}

/* Subtle gradient mesh on body */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(6, 182, 212, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(99, 102, 241, 0.05) 0%, transparent 60%);
}

/* Ensure all content sits above orbs */
nav, #scroll-progress, section, footer { position: relative; z-index: 1; }

/* ============================================================
   HERO
============================================================ */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  position: relative;
  z-index: 1;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: flex-end;
  padding-bottom: 3.5rem;
  max-width: var(--max-w);
}

.hero-name {
  font-size: clamp(4.5rem, 11vw, 9.5rem);
  line-height: 0.88;
  letter-spacing: -0.045em;
  color: var(--text);
}

.hero-line { display: block; overflow: hidden; }

.hero-word {
  display: inline-block;
  transform: translateY(115%);
  transition: transform 0.85s var(--ease);
}
.hero-line:nth-child(2) .hero-word { transition-delay: 0.08s; }

#hero.hero-in .hero-word { transform: translateY(0); }

.hero-fade {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: 0.42s;
}
.hero-cta.hero-fade { transition-delay: 0.5s; }
.hero-bar.hero-fade { transition-delay: 0.58s; }
#hero.hero-in .hero-fade { opacity: 1; transform: translateY(0); }

.hero-right {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2rem;
  padding-bottom: 0.5rem;
}

.hero-sub {
  font-size: clamp(0.9rem, 1.4vw, 1rem);
  color: var(--text-muted);
  line-height: 1.78;
  max-width: 420px;
}

.hero-cta { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }

.cta-pill {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: var(--bg) !important;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.52rem 1.1rem;
  border-radius: 100px;
  transition: box-shadow 0.2s, transform 0.2s var(--ease);
}
.cta-pill:hover {
  box-shadow: 0 0 20px var(--accent-glow), 0 0 40px var(--accent-glow);
  transform: translateY(-2px);
}

.cta-ghost {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted) !important;
  padding: 0.52rem 0.95rem;
  border-radius: 100px;
  border: 1px solid var(--border-mid);
  transition: color 0.15s, border-color 0.15s, transform 0.2s var(--ease);
}
.cta-ghost:hover {
  color: var(--text) !important;
  border-color: var(--text-faint);
  transform: translateY(-2px);
}

.hero-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--border);
  max-width: var(--max-w);
  font-size: 0.75rem;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero-bar .dot { color: var(--border-mid); }

/* ============================================================
   ABOUT
============================================================ */
#about {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

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

.side-label {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  color: var(--text-faint);
  letter-spacing: -0.02em;
  padding-top: 0.15rem;
}

.about-body p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1.1rem;
  line-height: 1.8;
}
.about-body p:last-child { margin-bottom: 0; }
.about-body strong { color: var(--text); font-weight: 600; }

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

.exp-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); }

.exp-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2.5rem;
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
  border-radius: 6px;
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}
.exp-row:hover { background: var(--surface); }

.exp-meta { padding-top: 0.25rem; }

.exp-date {
  font-size: 0.75rem;
  color: var(--text-faint);
  letter-spacing: 0.02em;
  line-height: 1.4;
  display: block;
}

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

.exp-body h3 {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.exp-sep { color: var(--text-faint); font-weight: 300; }

.exp-role {
  font-weight: 400;
  color: var(--accent);
  font-size: 0.9rem;
}

.exp-loc {
  font-size: 0.75rem;
  color: var(--text-faint);
  white-space: nowrap;
  flex-shrink: 0;
}

.exp-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

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

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

/* ============================================================
   PROJECTS
============================================================ */
.project-list {
  display: flex;
  flex-direction: column;
}

.project-row {
  position: relative;
  display: grid;
  grid-template-columns: 6px 1fr auto;
  gap: 0 1.75rem;
  padding: 2.25rem 1rem;
  border-bottom: 1px solid var(--border);
  align-items: start;
  transition: background 0.2s var(--ease);
  border-radius: 6px;
  margin: 0 -1rem;
}

.project-row:first-child { border-top: 1px solid var(--border); }

a.project-row { cursor: pointer; will-change: transform; transition: background 0.2s var(--ease), transform 0.2s var(--ease); }
a.project-row:hover { background: var(--surface); }
a.project-row:hover .project-accent-bar { opacity: 1; transform: scaleY(1); }
a.project-row:hover .project-arrow { color: var(--accent); transform: translate(3px, -3px); }

.project-accent-bar {
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 2px;
  background: var(--accent);
  border-radius: 2px;
  opacity: 0;
  transform: scaleY(0.3);
  transform-origin: center;
  transition: opacity 0.2s var(--ease), transform 0.25s var(--ease);
  box-shadow: 0 0 8px var(--accent-glow);
}

.project-num {
  font-size: 1.4rem;
  color: var(--text-faint);
  line-height: 1.3;
  letter-spacing: -0.04em;
  transition: color 0.2s;
  padding-top: 0.1rem;
  grid-column: 2;
}

.project-info { grid-column: 2; }

.project-top {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
  flex-wrap: wrap;
}

.project-info h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border-mid);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge-award {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: rgba(6, 182, 212, 0.2);
}

.project-info p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
  max-width: 580px;
}

.tech-row { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.tech-row span {
  font-size: 0.7rem;
  color: var(--text-faint);
  background: var(--surface);
  border: 1px solid var(--border-mid);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  letter-spacing: 0.01em;
  transition: color 0.15s, border-color 0.15s;
}

a.project-row:hover .tech-row span { color: var(--text-muted); border-color: var(--text-faint); }

.project-arrow {
  grid-column: 4;
  font-size: 1rem;
  color: var(--text-faint);
  padding-top: 0.2rem;
  transition: color 0.2s, transform 0.2s var(--ease);
}

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

.skills-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.skill-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
  transition: background 0.15s;
  border-radius: 4px;
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}
.skill-row:hover { background: var(--surface-2); }

.skill-cat {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  white-space: nowrap;
}

.skill-vals {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  transition: color 0.15s;
}

.skill-row:hover .skill-vals { color: var(--text); }

/* ============================================================
   EDUCATION
============================================================ */
.edu-list { border-top: 1px solid var(--border); }

.edu-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2.5rem;
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
  transition: background 0.2s;
  border-radius: 6px;
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}
.edu-row:hover { background: var(--surface); }

.edu-date {
  font-size: 0.75rem;
  color: var(--text-faint);
  letter-spacing: 0.02em;
  padding-top: 0.28rem;
}

.edu-body h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
  color: var(--text);
}

.edu-honours {
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.edu-place {
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.edu-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.edu-bullets li {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 1rem;
  position: relative;
}
.edu-bullets li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--text-faint);
}

.edu-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
}

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

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

.contact-inner h2 {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  letter-spacing: -0.045em;
  line-height: 1;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.contact-inner p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.75;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  padding-bottom: 3px;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 2rem;
  transition: color 0.15s, gap 0.2s var(--ease);
}
.contact-link:hover { color: var(--accent); gap: 0.75rem; }

.contact-secondary { display: flex; gap: 1.25rem; }

.contact-secondary a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.83rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-mid);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s, gap 0.15s var(--ease);
}
.contact-secondary a:hover { color: var(--text); border-color: var(--text-faint); gap: 0.45rem; }

/* ============================================================
   FOOTER
============================================================ */
footer {
  padding: 1.5rem clamp(1.25rem, 5vw, 3rem);
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; padding-bottom: 3rem; }
  .about-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .exp-row { grid-template-columns: 1fr; gap: 0.4rem; }
  .exp-header { flex-direction: column; gap: 0.2rem; }
  .skill-row { grid-template-columns: 130px 1fr; }
  .edu-row { grid-template-columns: 1fr; gap: 0.5rem; }
}

@media (max-width: 640px) {
  nav ul { display: none; }
  .project-row { grid-template-columns: 6px 1fr; }
  .project-arrow { display: none; }
  .skill-row { grid-template-columns: 1fr; gap: 0.4rem; }
  .skill-cat { margin-bottom: 0.1rem; }
}

/* ============================================================
   PROJECT HIERARCHY & DOMAIN BADGES
============================================================ */

/* Hero-tier cards: larger padding + title */
.project-row--hero {
  padding-top: 2.25rem;
  padding-bottom: 2.25rem;
}
.project-row--hero h3 {
  font-size: 1.3rem;
}

/* Domain label: subtle outline tag distinct from award badge */
.badge-domain {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: 3px;
  padding: 2px 7px;
  font-weight: 500;
}

/* More projects toggle button */
.more-projects-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 2rem 0 1.5rem;
  padding: 0.5rem 1.25rem;
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: 2rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.more-projects-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Collapsible wrapper */
.more-projects-section.hidden {
  display: none;
}
