/* ============================================================
   AMRITANSHU SINGH — PORTFOLIO
   Faithful rebuild of the Dymas Alfin cloud-window portfolio
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --ink: #131315;
  --ink-soft: #26262a;
  --ink-mute: #6f6f74;
  --ink-faint: #9a9aa0;

  --paper: #f9f9f7;
  --paper-pure: #ffffff;
  --line: #e7e7e4;
  --line-soft: #ececE9;

  --dark-btn: #1d1d20;
  --dark-btn-hover: #000000;

  --night: #242426;
  --night-line: rgba(255, 255, 255, 0.13);
  --night-mute: #97979b;

  --green: #23c55e;

  --font-ui: "Poppins", "Segoe UI", sans-serif;
  --font-display: "Archivo Black", "Poppins", sans-serif;

  --card-w: min(1180px, 92.5vw);
  --gutter: clamp(20px, 4.2vw, 52px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background: #8f8f91;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
}

button {
  font-family: inherit;
}

::selection {
  background: #131315;
  color: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================================
   ANIMATED CLOUD BACKDROP
   ============================================================ */
.clouds-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(180deg, #adadae 0%, #939395 55%, #86868a 100%);
}

.cloud-layer {
  position: absolute;
  inset: -25%;
  background-repeat: no-repeat;
  filter: saturate(0);
  will-change: transform;
}

.cloud-layer-a {
  background-image: url("assets/atmospheric-bg.svg");
  background-size: cover;
  opacity: 0.95;
  transform: scale(1.08);
  animation: cloud-drift-a 80s ease-in-out infinite alternate;
}

/* Blurred volumetric puffs that give the backdrop its movement */
.cloud-layer-b {
  background-image:
    radial-gradient(38% 26% at 18% 26%, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 68%),
    radial-gradient(30% 22% at 72% 14%, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0) 66%),
    radial-gradient(34% 24% at 52% 62%, rgba(28, 28, 32, 0.4) 0%, rgba(28, 28, 32, 0) 66%),
    radial-gradient(40% 30% at 88% 66%, rgba(248, 248, 250, 0.42) 0%, rgba(248, 248, 250, 0) 70%),
    radial-gradient(30% 22% at 8% 78%, rgba(40, 40, 44, 0.32) 0%, rgba(40, 40, 44, 0) 66%),
    radial-gradient(44% 30% at 38% 92%, rgba(252, 252, 253, 0.5) 0%, rgba(252, 252, 253, 0) 68%);
  filter: blur(34px) saturate(0);
  opacity: 0.9;
  animation: cloud-drift-b 90s ease-in-out infinite alternate;
}

@keyframes cloud-drift-a {
  from {
    transform: scale(1.08) translate3d(-2%, -1%, 0);
  }
  to {
    transform: scale(1.14) translate3d(2%, 1.5%, 0);
  }
}

@keyframes cloud-drift-b {
  from {
    transform: scale(1) translate3d(1.5%, 1%, 0);
  }
  to {
    transform: scale(1.08) translate3d(-2%, -1.5%, 0);
  }
}

.cloud-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(140% 110% at 50% 30%, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0) 45%),
    linear-gradient(180deg, rgba(52, 52, 56, 0.28) 0%, rgba(0, 0, 0, 0) 32%, rgba(58, 58, 62, 0.38) 100%);
}

/* ============================================================
   SMALL-SCREEN NOTICE
   Desktop-only interactions (hover previews, cursor cards) do not
   exist on phones, so point visitors at a larger screen.
   ============================================================ */
.screen-notice {
  display: none;
  align-items: flex-start;
  gap: 10px;
  width: min(560px, 92.5vw);
  margin: clamp(16px, 4vw, 24px) auto 0;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(20, 20, 24, 0.14);
  color: var(--ink-soft);
  font-size: 0.79rem;
  line-height: 1.55;
  text-align: left;
}

.screen-notice svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--ink-mute);
}

.screen-notice p {
  margin: 0;
}

.screen-notice strong {
  font-weight: 600;
  color: var(--ink);
}

/* ============================================================
   WINDOW CARD
   ============================================================ */
.page-card {
  position: relative;
  width: var(--card-w);
  margin: clamp(28px, 5vh, 58px) auto clamp(34px, 6vh, 72px);
  background: var(--paper);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 60px 120px rgba(20, 20, 24, 0.32),
    0 12px 32px rgba(20, 20, 24, 0.18);
}

/* ---------- Shared buttons ---------- */
.btn-dark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--dark-btn);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 13px 24px;
  font-size: 0.87rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn-dark:hover {
  background: var(--dark-btn-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.btn-arrow {
  display: inline-block;
  font-size: 0.9em;
  line-height: 1;
  transition: transform 0.3s var(--ease);
}

.btn-dark:hover .btn-arrow,
.btn-light:hover .btn-arrow {
  transform: translate(2px, -2px);
}

.btn-light {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--paper-pure);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn-light:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

/* ---------- Status pill ---------- */
.nav-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--paper-pure);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #4a4a4f;
  white-space: nowrap;
}

.pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--green);
  opacity: 0.7;
  animation: dot-pulse 1.8s ease-out infinite;
}

@keyframes dot-pulse {
  0% {
    transform: scale(0.6);
    opacity: 0.8;
  }
  80%,
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* ============================================================
   01 · HERO
   ============================================================ */
.hero-section {
  position: relative;
  padding-bottom: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(20px, 2.6vw, 34px) var(--gutter) 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3.2vw, 46px);
}

.nav-links a {
  position: relative;
  font-size: 0.88rem;
  font-weight: 500;
  color: #55555a;
  transition: color 0.25s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.35s var(--ease);
}

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.nav-links a sup {
  font-size: 0.6rem;
  font-weight: 400;
  color: var(--ink-faint);
  margin-left: 2px;
  letter-spacing: 0.03em;
}

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

/* ---------- Oversized name ---------- */
.hero-name {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4em;
  padding: clamp(26px, 4vw, 58px) calc(var(--gutter) * 0.75) 0;
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: rise-in 0.9s var(--ease) 0.15s forwards;
}

.name-outlined,
.name-solid {
  font-family: var(--font-display);
  /* Cap tuned so "AMRITANSHU SINGH" in Archivo Black always fits inside
     the 1180px-wide card minus gutters — the old 6.9rem cap pushed the
     final "H" of SINGH past the clipped card edge on wide screens. */
  font-size: clamp(2.35rem, 6.8vw, 6rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.name-outlined {
  color: transparent;
  -webkit-text-stroke: 2px #131315;
  text-shadow: 0 0 1px rgba(19, 19, 21, 0.4);
  paint-order: stroke;
}

/* Firefox fallback: no text-stroke means the outline word must still read */
@supports not (-webkit-text-stroke: 2px black) {
  .name-outlined {
    color: #131315;
  }
}

.name-solid {
  color: #131315;
}

/* ---------- Hero stage ---------- */
.hero-stage {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  min-height: clamp(230px, 22vw, 290px);
  margin-top: clamp(-42px, -3.2vw, -20px);
  padding: 0 var(--gutter);
}

.hero-left {
  position: relative;
  z-index: 3;
  max-width: 250px;
  margin-bottom: 40px;
  opacity: 0;
  animation: rise-in 0.9s var(--ease) 0.3s forwards;
}

.hero-role {
  margin: 0 0 12px;
  font-size: clamp(1.2rem, 1.75vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hero-desc {
  margin: 0 0 20px;
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--ink-mute);
}

.hero-cta {
  padding: 12px 20px;
  font-size: 0.8rem;
}

/* ---------- Portrait ---------- */
.hero-portrait {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(240px, 27vw, 352px);
  z-index: 2;
  opacity: 0;
  animation: hero-portrait-in 1s var(--ease) 0.25s forwards;
}

.hero-portrait img {
  display: block;
  width: 100%;
  filter: grayscale(1) contrast(1.04);
  transform-origin: bottom center;
  transition: filter 0.7s var(--ease), transform 0.7s var(--ease);
  animation: portrait-float 7s ease-in-out infinite alternate;
}

/* Straight from the demo of you asking — hover and the photo turns color */
.hero-portrait:hover img {
  filter: none;
  transform: scale(1.015);
}

@keyframes portrait-float {
  from {
    translate: 0 0;
  }
  to {
    translate: 0 -7px;
  }
}

/* ---------- Social pills ---------- */
.hero-socials {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 26px;
  opacity: 0;
  animation: rise-in 0.9s var(--ease) 0.42s forwards;
}

.hero-socials .social-pill {
  margin-right: calc(var(--gutter) * -0.35);
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--paper-pure);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #3c3c40;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.social-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.09);
}

.social-pill svg {
  width: 15px;
  height: 15px;
  color: #2c2c30;
  transition: transform 0.3s var(--ease);
}

.social-pill:hover svg {
  transform: scale(1.12);
}

/* ============================================================
   SECTION HEADINGS + WATERMARKS
   ============================================================ */
.section-heading {
  position: relative;
  margin: 0;
  font-size: clamp(1.9rem, 4.5vw, 3.3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
}

.heading-light {
  color: #f5f5f3;
}

.watermark {
  position: absolute;
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 9vw, 8.2rem);
  line-height: 1;
  color: rgba(19, 19, 21, 0.05);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.watermark-center {
  top: -0.62em;
  left: 50%;
  transform: translateX(-50%);
}

.watermark-left {
  top: -0.68em;
  left: 0;
}

.watermark-dark {
  color: rgba(255, 255, 255, 0.05);
}

/* ============================================================
   02 · /SELECTED WORK
   ============================================================ */
.work-section {
  padding: clamp(64px, 8vw, 110px) var(--gutter) clamp(48px, 6vw, 84px);
}

.work-heading {
  position: relative;
  text-align: center;
}

.work-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: clamp(34px, 4.4vw, 60px);
}

.work-filters {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 30px);
}

.filter-btn {
  position: relative;
  background: none;
  border: none;
  padding: 4px 0 5px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-faint);
  cursor: pointer;
  transition: color 0.3s;
}

.filter-btn::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.35s var(--ease);
}

.filter-btn:hover {
  color: var(--ink-soft);
}

.filter-btn.is-active {
  color: var(--ink);
}

.filter-btn.is-active::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.view-all-btn {
  flex-shrink: 0;
}

/* ---------- Cards ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 28px);
  margin-top: clamp(24px, 3vw, 40px);
}

.work-card {
  background: var(--paper-pure);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), opacity 0.3s;
}

.work-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px rgba(20, 20, 24, 0.12);
}

.work-card.is-hidden-by-filter {
  display: none;
}

.work-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #ececea;
  overflow: hidden;
}

.work-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.work-card:hover .work-card-media img {
  transform: scale(1.045);
}

.media-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  background: var(--paper-pure);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #303034;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.work-card-body {
  padding: 18px 20px 20px;
}

.work-card-title {
  margin: 0 0 13px;
  font-size: 1.18rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: #1c1c1e;
}

.work-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.76rem;
  color: #55555a;
  background: var(--paper-pure);
}

/* ============================================================
   03 · /SERVICE
   ============================================================ */
.service-section {
  padding: clamp(64px, 8vw, 110px) var(--gutter) clamp(56px, 7vw, 96px);
}

.service-heading {
  position: relative;
  margin-bottom: clamp(20px, 3vw, 36px);
}

.service-list {
  border-top: 1px solid var(--line);
}

.service-row {
  border-bottom: 1px solid var(--line);
  transition: background 0.4s var(--ease), border-radius 0.4s var(--ease);
}

.service-row-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  background: none;
  border: none;
  /* flush with the /SERVICE heading — no horizontal inset */
  padding: clamp(20px, 2.6vw, 30px) 0;
  cursor: pointer;
  text-align: left;
}

.service-row-title {
  margin: 0;
  /* sized to sit comfortably inside the row header without crowding */
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: #1a1a1c;
  transition: color 0.35s var(--ease);
}

.service-arrow {
  font-size: clamp(1.05rem, 1.7vw, 1.45rem);
  color: #1a1a1c;
  transition: color 0.35s var(--ease), transform 0.35s var(--ease);
  flex-shrink: 0;
}

/* Expanded (hover-open) row — dark bleed like the demo */
.service-row.is-open {
  background: #2b2b2e;
  border-radius: 10px;
  border-color: #2b2b2e;
}

.service-row.is-open .service-row-title,
.service-row.is-open .service-arrow {
  color: #ffffff;
}

.service-row.is-open .service-arrow {
  transform: rotate(90deg);
}

.service-row-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--ease);
}

.service-row.is-open .service-row-body {
  grid-template-rows: 1fr;
}

.service-row-body-inner {
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.service-row-desc {
  margin: 0;
  max-width: 56%;
  padding-bottom: 42px;
  font-size: 0.88rem;
  line-height: 1.75;
  color: #b3b3b7;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s var(--ease) 0.08s, transform 0.45s var(--ease) 0.08s;
}

.service-row.is-open .service-row-desc {
  opacity: 1;
  transform: translateY(0);
}

.service-preview {
  position: absolute;
  z-index: 1;
  top: -52px;
  right: 17%;
  width: clamp(150px, 16vw, 215px);
  opacity: 0;
  transform: translateY(26px) rotate(-8deg);
  transition: opacity 0.45s var(--ease) 0.12s, transform 0.45s var(--ease) 0.12s;
  pointer-events: none;
}

.service-row.is-open .service-preview {
  opacity: 1;
  transform: translateY(0) rotate(-8deg);
}

.service-preview img {
  display: block;
  width: 100%;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.38);
}

/* ---------- Live DSA hover panel (two cards: LeetCode + GfG) ---------- */
.service-preview-live {
  width: clamp(380px, 34vw, 470px);
  /* sit clear of the description text on the left */
  right: -24px;
  transform: translateY(26px) rotate(-3deg);
}

.service-row.is-open .service-preview-live {
  transform: translateY(0) rotate(-3deg);
}

/* In live mode the two cards own the panel's height */
#dsaLive[data-state="live"] {
  width: clamp(380px, 34vw, 470px);
  height: clamp(210px, 21vw, 250px);
}

#dsaLive[data-state="live"] > img {
  display: none;
}

.dsa-live-stack {
  position: absolute;
  inset: 0;
  display: none;
  gap: 10px;
}

#dsaLive[data-state="live"] .dsa-live-stack {
  display: flex;
}

#dsaLive[data-state="live"] .dsa-live-card {
  animation: dsaCardIn 0.5s var(--ease) both;
}

#dsaLive[data-state="live"] .dsa-live-card-gfg {
  animation-delay: 0.12s;
}

@keyframes dsaCardIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.dsa-live-card {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  border-radius: 14px;
  background: linear-gradient(150deg, #0c0e12 0%, #14171f 100%);
  border: 1px solid #262a34;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.38);
  color: #e5e7eb;
  padding: 11px 12px 9px;
  overflow: hidden;
}

.dsa-live-card-gfg .dsa-live-big {
  color: #34d399;
}

.dsa-live-big.is-muted {
  color: #3f4550;
}

.dsa-live-note {
  margin: 8px 0 0;
  font-size: 8.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}

.dsa-live-card.is-loading .dsa-live-big.is-muted,
.dsa-live-card.is-loading .dsa-live-note {
  animation: dsaPulse 1.3s ease-in-out infinite;
}

@keyframes dsaPulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

.dsa-live-name,
.dsa-live-handle {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dsa-live-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dsa-live-avatar {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #2b2f3a;
}

.dsa-live-avatar.sm {
  width: 20px;
  height: 20px;
  border-radius: 6px;
}

.dsa-live-id {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.dsa-live-name {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.dsa-live-handle {
  font-size: 9.5px;
  color: #8b949e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dsa-live-glyph {
  width: 13px;
  height: 13px;
  flex: none;
}

.dsa-live-glyph.sm {
  width: 12px;
  height: 12px;
}

.dsa-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #4ade80;
  padding: 3px 7px;
  border: 1px solid rgba(74, 222, 128, 0.35);
  border-radius: 999px;
  flex: none;
}

.dsa-live-badge .live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4ade80;
  animation: live-pulse 1.6s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}

.dsa-live-total {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 7px 0 4px;
}

.dsa-live-big {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  color: #fbbf24;
}

.dsa-live-big-label {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b949e;
}

.dsa-live-bars {
  display: grid;
  gap: 5px;
}

.dsa-live-bar {
  display: grid;
  grid-template-columns: 40px 1fr 24px;
  align-items: center;
  gap: 6px;
}

.dsa-bar-label {
  font-size: 9.5px;
  color: #a1a1aa;
}

.dsa-bar-track {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: #1c1f27;
  overflow: hidden;
}

.dsa-bar-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  transition: width 0.9s var(--ease);
}

.dsa-bar-fill[data-difficulty="easy"] { background: linear-gradient(90deg, #10b981, #34d399); }
.dsa-bar-fill[data-difficulty="medium"] { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.dsa-bar-fill[data-difficulty="hard"] { background: linear-gradient(90deg, #ef4444, #f87171); }

.dsa-bar-value {
  font-size: 9.5px;
  font-weight: 600;
  color: #e5e7eb;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dsa-live-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 7px 0 0;
  padding-top: 6px;
  border-top: 1px solid #222630;
  font-size: 9.5px;
  color: #8b949e;
}

.dsa-live-meta b {
  color: #e5e7eb;
  font-weight: 600;
}

/* GfG card stat rows */
.dsa-live-stats {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.dsa-live-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid #222630;
  font-size: 9.5px;
  color: #8b949e;
}

.dsa-live-stat:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dsa-live-stat b {
  color: #e5e7eb;
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   04 · /EXPERIENCE (dark)
   ============================================================ */
.experience-section {
  position: relative;
  background: var(--night);
  padding: clamp(64px, 8vw, 110px) var(--gutter) clamp(48px, 6vw, 84px);
  overflow: visible;
}

.experience-head {
  position: relative;
}

.experience-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.experience-note {
  font-size: 0.9rem;
  color: var(--night-mute);
  white-space: nowrap;
}

.experience-list {
  margin-top: clamp(30px, 4vw, 52px);
  border-top: 1px solid var(--night-line);
}

.experience-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: clamp(20px, 2.6vw, 30px) 8px;
  border-bottom: 1px solid var(--night-line);
  transition: background 0.35s var(--ease);
}

.experience-row:hover {
  background: rgba(255, 255, 255, 0.035);
  border-radius: 8px;
}

.experience-org {
  margin: 0 0 5px;
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  font-weight: 600;
  color: #f2f2f0;
}

.experience-role {
  margin: 0;
  font-size: 0.9rem;
  color: var(--night-mute);
}

.experience-date {
  font-size: 0.88rem;
  color: #b9b9bd;
  white-space: nowrap;
}

/* Floating cursor preview */
.experience-float {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 270px;
  pointer-events: none;
  opacity: 0;
  transform: rotate(-7deg) scale(0.92);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}

.experience-float.is-visible {
  opacity: 1;
  transform: rotate(-7deg) scale(1);
}

.experience-float img {
  display: block;
  width: 100%;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 34px 70px rgba(0, 0, 0, 0.55);
}

/* ============================================================
   05 · CONTACT + FOOTER
   ============================================================ */
.contact-section {
  padding: clamp(72px, 10vw, 128px) var(--gutter) clamp(30px, 4vw, 46px);
  text-align: center;
}

.contact-status {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}

.contact-heading {
  margin: clamp(22px, 3vw, 34px) 0 0;
  font-size: clamp(2.1rem, 5.6vw, 4.05rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #161618;
}

.contact-desc {
  margin: 18px auto 0;
  max-width: 620px;
  font-size: 0.92rem;
  line-height: 1.85;
  color: var(--ink-mute);
}

.contact-cta {
  margin-top: 32px;
}

.contact-email {
  display: block;
  width: fit-content;
  margin: 16px auto 0;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  color: var(--ink-mute);
  border-bottom: 1px solid rgba(19, 19, 21, 0.18);
  padding-bottom: 2px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.contact-email:hover {
  color: #161618;
  border-color: rgba(19, 19, 21, 0.5);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(14px, 2.2vw, 24px);
  margin-top: clamp(56px, 9vw, 96px);
  padding-bottom: clamp(12px, 2vw, 22px);
}

.footer-identity {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #17171a;
  color: #fff;
  border-radius: 999px;
  padding: 7px 20px 7px 7px;
  font-size: 0.84rem;
  font-weight: 500;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.footer-identity:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.footer-identity img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(14px, 2.2vw, 24px);
}

.social-pill-plain {
  border: 1px solid var(--line-soft);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ============================================================
   PROJECT DETAIL PAGE
   ============================================================ */
.project-page {
  position: fixed;
  inset: 0;
  z-index: 60;
  visibility: hidden;
  pointer-events: none;
}

.project-page.is-open {
  visibility: visible;
  pointer-events: auto;
}

.project-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 24, 0.32);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.project-page.is-open::before {
  opacity: 1;
}

.project-page-card {
  position: absolute;
  left: 50%;
  top: clamp(20px, 4.5vh, 46px);
  bottom: 0;
  transform: translateX(-50%) translateY(48px);
  width: var(--card-w);
  background: var(--paper);
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.45s var(--ease);
  box-shadow: 0 -20px 80px rgba(20, 20, 24, 0.35);
}

.project-page.is-open .project-page-card {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.project-page-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 40px;
  flex-shrink: 0;
}

.project-back-btn {
  background: #fdfdfc;
}

.project-page-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
}

.project-page-inner {
  padding: clamp(20px, 4vw, 46px) clamp(24px, 7.5vw, 96px) clamp(60px, 8vw, 100px);
}

.project-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.project-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.project-tags .tag-pill {
  border-color: var(--line-soft);
}

.project-facts {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: right;
  flex-shrink: 0;
}

.fact-label {
  display: block;
  font-size: 0.74rem;
  color: var(--ink-faint);
}

.fact-value {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #3a3a3e;
  max-width: 260px;
}

.project-title-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin: clamp(20px, 3vw, 34px) 0 0;
}

.project-title {
  font-size: clamp(2.2rem, 4.6vw, 3.55rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
}

.project-type {
  font-size: 0.95rem;
  color: #55555a;
}

.project-desc {
  margin: 16px 0 0;
  max-width: 500px;
  font-size: 0.92rem;
  line-height: 1.75;
  color: #55555a;
}

.project-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.project-actions .btn-light {
  padding: 13px 24px;
}

.project-shots {
  display: grid;
  gap: 26px;
  margin-top: clamp(34px, 5vw, 56px);
}

.project-shot {
  background: var(--paper-pure);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(10px, 1.6vw, 18px);
}

.project-shot img {
  display: block;
  width: 100%;
  border-radius: 6px;
  object-fit: contain;
  transition: transform 0.5s var(--ease);
}

.project-shot:hover img {
  transform: scale(1.015);
}

/* ============================================================
   Reveal-on-scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-inview {
  opacity: 1;
  transform: translateY(0);
}

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

/* Smooth entrance for the whole window card */
.page-card {
  animation: card-enter 0.9s var(--ease) both;
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(36px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes hero-portrait-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(46px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Focus visibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #131315;
  outline-offset: 3px;
  border-radius: 999px;
}

.experience-section a:focus-visible,
.experience-section button:focus-visible,
.project-page button:focus-visible {
  outline-color: #ffffff;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .hero-left {
    max-width: 210px;
  }

  .service-row-desc {
    max-width: 74%;
  }

  .project-facts {
    max-width: 46%;
  }
}

@media (max-width: 860px) {
  .screen-notice {
    display: flex;
  }

  .page-card {
    margin-top: 16px;
  }

  .site-nav {
    gap: 12px;
  }

  .nav-status-pill {
    padding: 9px 12px;
    font-size: 0.74rem;
  }

  .nav-links {
    gap: 14px;
  }

  .nav-links a {
    font-size: 0.8rem;
  }

  .hero-name {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .name-outlined,
  .name-solid {
    white-space: nowrap;
    font-size: clamp(2.1rem, 12.5vw, 4.4rem);
  }

  .hero-stage {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 10px;
    min-height: 0;
    gap: 4px;
  }

  .hero-portrait {
    position: static;
    transform: none;
    order: -1;
    width: clamp(220px, 55vw, 320px);
    margin: 0 auto -30px;
  }

  .hero-left {
    margin-top: 26px;
    max-width: 100%;
  }

  .hero-socials {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    margin: 26px 0 30px;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .work-toolbar {
    flex-wrap: wrap;
  }

  .service-preview {
    display: none;
  }

  .service-row-desc {
    max-width: 100%;
  }

  .experience-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .project-meta-row {
    flex-direction: column;
  }

  .project-facts {
    text-align: left;
    max-width: 100%;
  }

  .fact-value {
    max-width: none;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-name,
  .hero-left,
  .hero-socials,
  .hero-portrait,
  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-portrait {
    transform: translateX(-50%);
  }

  .page-card {
    animation: none;
  }

  .hero-portrait img {
    animation: none;
  }
}
