/* ==========================================================================
   Anjali Bhandari — Portfolio
   Tokens
   ========================================================================== */
:root {
  --bg: #0A0F0D;
  --panel: #0F1712;
  --panel-raised: #131C16;
  --border: rgba(232, 236, 233, 0.09);
  --border-strong: rgba(232, 236, 233, 0.16);

  --accent: #3ADB6D;
  --accent-soft: rgba(58, 219, 109, 0.14);
  --copper: #E3A857;
  --copper-soft: rgba(227, 168, 87, 0.14);

  --text: #E8ECE9;
  --text-muted: #8A9791;
  --text-faint: #5C6862;

  --font-display: "Space Grotesk", "IBM Plex Sans", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --container: 1120px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #06120A;
  padding: 0.6rem 1rem;
  z-index: 999;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ==========================================================================
   Scroll progress trace (cinematic scroll indicator)
   ========================================================================== */
.scroll-trace {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  z-index: 1000;
  background: transparent;
}
.scroll-trace span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--copper));
  transition: width 0.08s linear;
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  padding: 1.1rem 0;
  background: transparent;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(10, 15, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 0.7rem 0;
  border-bottom-color: var(--border);
}

.nav {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}
.logo-dot { color: var(--accent); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-link {
  font-size: 0.95rem;
  color: var(--text-muted);
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.25s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

.nav-link--cta {
  color: var(--bg);
  background: var(--accent);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.nav-link--cta::after { display: none; }
.nav-link--cta:hover {
  color: var(--bg);
  filter: brightness(1.1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.4rem;
  z-index: 950;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 7rem var(--gutter) 4rem;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  color: var(--accent);
  opacity: 0.16;
  will-change: transform;
}
.circuit-svg { width: 100%; height: 100%; }
.circuit-nodes circle {
  animation: pulse-node 3.4s ease-in-out infinite;
}
.circuit-nodes circle:nth-child(2) { animation-delay: 0.6s; }
.circuit-nodes circle:nth-child(3) { animation-delay: 1.2s; }
.circuit-nodes circle:nth-child(4) { animation-delay: 1.8s; }
.circuit-nodes circle:nth-child(5) { animation-delay: 0.3s; }
.circuit-nodes circle:nth-child(6) { animation-delay: 0.9s; }
.circuit-nodes circle:nth-child(7) { animation-delay: 1.5s; }
.circuit-nodes circle:nth-child(8) { animation-delay: 2.1s; }

@keyframes pulse-node {
  0%, 100% { opacity: 0.4; r: 4; }
  50% { opacity: 1; r: 6; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3rem;
}

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

.hero-eyebrow {
  font-size: 1.05rem;
  color: var(--copper);
  margin: 0 0 1rem;
  font-family: var(--font-display);
  opacity: 0;
  animation: rise-in 0.7s var(--ease) forwards;
  animation-delay: 0.1s;
}

.hero-heading {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.08;
  margin-bottom: 1.3rem;
  opacity: 0;
  animation: rise-in 0.8s var(--ease) forwards;
  animation-delay: 0.25s;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.08rem;
  max-width: 46ch;
  margin-bottom: 2.1rem;
  opacity: 0;
  animation: rise-in 0.8s var(--ease) forwards;
  animation-delay: 0.42s;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  opacity: 0;
  animation: rise-in 0.8s var(--ease) forwards;
  animation-delay: 0.58s;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-photo-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  opacity: 0;
  animation: photo-in 0.9s var(--ease) forwards;
  animation-delay: 0.35s;
  will-change: transform;
}

@keyframes photo-in {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-photo-frame {
  position: relative;
  width: min(320px, 68vw);
  aspect-ratio: 1 / 1.05;
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  background: linear-gradient(155deg, var(--panel-raised), var(--panel));
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-fallback::before {
  content: "AB";
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.85;
}

.hero-photo-glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 50% 40%, var(--accent-soft), transparent 65%);
  z-index: -1;
  animation: glow-breathe 5s ease-in-out infinite;
}
@keyframes glow-breathe {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.hero-photo-tag {
  margin-top: 1.1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-faint);
  z-index: 1;
}
.scroll-cue-line {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--accent), transparent);
  animation: cue-flow 1.8s ease-in-out infinite;
}
@keyframes cue-flow {
  0% { transform: scaleY(0.4); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.4; }
}

/* ==========================================================================
   Section shell
   ========================================================================== */
.section { padding: 7rem 0; position: relative; }
.section-alt { background: var(--panel); }
.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section-head { margin-bottom: 3rem; max-width: 640px; }
.section-index {
  display: block;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}
.section-title {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
}

/* Reveal-on-scroll (cinematic, subtle) */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   About
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3rem;
  align-items: start;
}
.about-text {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0 0 1.3rem;
}
.about-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 0.5rem;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.stat-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}
.stat-number {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--accent);
}
.stat-label { color: var(--text-muted); font-size: 0.88rem; }

/* ==========================================================================
   Skills
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.4rem;
}
.skill-category {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.skill-category:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}
.skill-category-title {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text);
}
.skill-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.badge {
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(58, 219, 109, 0.25);
}

/* ==========================================================================
   Projects
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.8rem;
}
.project-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.5);
}
.project-image {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.project-image--pawcare {
  background:
    radial-gradient(circle at 25% 20%, rgba(58,219,109,0.25), transparent 55%),
    radial-gradient(circle at 80% 75%, rgba(227,168,87,0.22), transparent 55%),
    var(--panel-raised);
}
.project-image--placeholder {
  background: repeating-linear-gradient(
    135deg,
    rgba(255,255,255,0.02),
    rgba(255,255,255,0.02) 10px,
    rgba(255,255,255,0.045) 10px,
    rgba(255,255,255,0.045) 20px
  );
}
.project-image-label {
  font-family: var(--font-display);
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.project-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.9rem; flex: 1; }
.project-title { font-size: 1.15rem; }
.project-desc { color: var(--text-muted); font-size: 0.95rem; margin: 0; flex: 1; }
.project-tech { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tech-chip {
  font-size: 0.78rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--copper-soft);
  color: var(--copper);
  border: 1px solid rgba(227, 168, 87, 0.25);
}
.tech-chip--muted {
  background: rgba(255,255,255,0.04);
  color: var(--text-faint);
  border-color: var(--border);
}
.project-links { display: flex; gap: 0.7rem; margin-top: 0.3rem; }
.project-card--placeholder { opacity: 0.75; }
.btn-disabled { pointer-events: none; opacity: 0.5; }

/* ==========================================================================
   Timeline (Education)
   ========================================================================== */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(var(--accent), transparent);
}
.timeline-item { position: relative; padding-bottom: 0.5rem; }
.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 6px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.timeline-content {
  background: var(--panel-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.6rem;
}
.timeline-years { color: var(--accent); font-size: 0.85rem; font-family: var(--font-display); }
.timeline-title { margin: 0.4rem 0 0.3rem; font-size: 1.15rem; }
.timeline-place { color: var(--text-muted); margin: 0; font-size: 0.95rem; }

/* ==========================================================================
   Achievements
   ========================================================================== */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
}
.achievement-card {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  text-align: center;
  color: var(--text-faint);
}
.achievement-tag {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--copper);
  margin-bottom: 0.6rem;
  font-family: var(--font-display);
}
.achievement-placeholder-text { margin: 0; font-size: 0.9rem; }

/* ==========================================================================
   Resume CTA
   ========================================================================== */
.resume-section { text-align: center; }
.resume-inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.resume-heading { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.resume-sub { color: var(--text-muted); max-width: 46ch; margin: 0 0 0.6rem; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
}
.contact-lead { color: var(--text-muted); margin-bottom: 1.6rem; max-width: 40ch; }
.contact-list { display: flex; flex-direction: column; gap: 1rem; }
.contact-list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.8rem;
}
.contact-label { color: var(--text-faint); font-size: 0.9rem; }
.contact-value { transition: color 0.25s var(--ease); }
.contact-value:hover { color: var(--accent); }

.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-row { display: flex; flex-direction: column; gap: 0.4rem; }
.form-row label { font-size: 0.88rem; color: var(--text-muted); }
.form-row input, .form-row textarea {
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  color: var(--text);
  resize: vertical;
  transition: border-color 0.25s var(--ease);
}
.form-row input:focus, .form-row textarea:focus {
  border-color: var(--accent);
}
.form-status { font-size: 0.9rem; color: var(--accent); min-height: 1.2em; margin: 0; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), filter 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--accent);
  color: #06120A;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-outline {
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); }
.btn-large { padding: 1rem 2rem; font-size: 1.02rem; }
.btn-small { padding: 0.5rem 1rem; font-size: 0.85rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  text-align: center;
  padding: 2.5rem var(--gutter) 3rem;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
}
.footer-tagline { margin: 0.4rem 0 0; font-size: 0.9rem; color: var(--text-muted); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .hero-photo-wrap { order: -1; margin-bottom: 1rem; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    background: rgba(10, 15, 13, 0.98);
    backdrop-filter: blur(14px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.6rem;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    border-left: 1px solid var(--border);
  }
  .nav-menu.is-open { transform: translateX(0); }
  .nav-link { font-size: 1.05rem; }

  .hero { padding-top: 6rem; }
  .section { padding: 4.5rem 0; }
  .about-stats { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
