/* ==========================================================================
   Abir (Md Rejoan Abir) — Polished Royal Cobalt Motion Portfolio
   Single-row mobile nav • Crisp hero transition • Faded marquee • Multi-project
   ========================================================================== */

:root {
  --bg-page: #ffffff;
  --bg-subtle: #f4f7fc;
  --ink-black: #0b1220;
  --ink-body: #4b5565;
  --ink-muted: #8490a3;
  --grid-line: #e7ecf3;
  --cobalt: #1d4ed8;
  --cobalt-bright: #2563eb;
  --cobalt-dark: #1e3a8a;
  --cobalt-midnight: #06132e;
  --sky-accent: #60a5fa;
  --emerald: #10b981;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-pill: 999px;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-black);
  background: var(--bg-page);
  overflow-x: clip;
}

a,
button {
  color: inherit;
  text-decoration: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--cobalt-bright);
  outline-offset: 3px;
  border-radius: 6px;
}

p,
h1,
h2,
h3,
li {
  user-select: text;
  -webkit-user-select: text;
}

button {
  font: inherit;
  cursor: pointer;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 200;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--ink-black);
  color: #fff;
}

.container {
  width: min(100% - 2rem, 1100px);
  margin-inline: auto;
}

/* ==========================================================================
   TOP SCROLL PROGRESS BAR
   ========================================================================== */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 120;
  background: linear-gradient(90deg, #1d4ed8 0%, #3b82f6 55%, #38bdf8 100%);
  transform-origin: left center;
  transform: scaleX(0);
  pointer-events: none;
}

/* ==========================================================================
   PILL BUTTONS WITH BESPOKE SVG ICONS
   ========================================================================== */

.pill {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.52rem;
  min-height: 42px;
  padding: 0.44rem 1.12rem 0.44rem 0.48rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition:
    transform 0.2s var(--ease-out),
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
  white-space: nowrap;
}

.pill:active {
  transform: scale(0.97);
}

.pill__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform 0.25s var(--ease-expo);
}

.pill__icon svg {
  width: 13px;
  height: 13px;
}

.pill:hover .pill__icon {
  transform: scale(1.08);
}

.pill--shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.24) 50%, transparent 75%);
  transform: translateX(-130%);
  animation: pillShimmer 4.6s var(--ease-expo) 1.6s infinite;
  pointer-events: none;
}

@keyframes pillShimmer {
  0%, 72% { transform: translateX(-130%); }
  100% { transform: translateX(130%); }
}

.pill--white {
  background: #ffffff;
  color: var(--ink-black);
  box-shadow: 0 6px 18px rgba(6, 19, 46, 0.18);
}

.pill--white .pill__icon {
  background: var(--cobalt-midnight);
  color: #ffffff;
}

.pill--white:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 10px 24px rgba(6, 19, 46, 0.25);
}

.pill--accent {
  background: var(--cobalt);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(29, 78, 216, 0.22);
}

.pill--accent .pill__icon {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.pill--accent:hover {
  background: var(--cobalt-dark);
  transform: translateY(-1.5px);
  box-shadow: 0 10px 22px rgba(29, 78, 216, 0.3);
}

.pill--dark {
  background: var(--ink-black);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(11, 18, 32, 0.16);
}

.pill--dark .pill__icon {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.pill--dark:hover {
  background: var(--cobalt);
  transform: translateY(-1.5px);
  box-shadow: 0 10px 22px rgba(29, 78, 216, 0.26);
}

.pill--outline {
  background: #ffffff;
  color: var(--ink-black);
  border-color: #d6dfee;
}

.pill--outline .pill__icon {
  background: var(--bg-subtle);
  color: var(--cobalt);
}

.pill--outline:hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
  transform: translateY(-1.5px);
}

.pill--outline:hover .pill__icon {
  background: var(--cobalt);
  color: #ffffff;
}

/* ==========================================================================
   SECTION 1: HERO (CRISP EDGE TRANSITION + CONTRAST VIGNETTE + HERO CTA)
   ========================================================================== */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(ellipse 74% 62% at 50% 40%, rgba(37, 99, 235, 0.72) 0%, rgba(14, 38, 102, 0.95) 56%, #06132e 100%),
    linear-gradient(180deg, #06132e 0%, #0d2b70 60%, #071638 100%);
  color: #ffffff;
  overflow: hidden;
  border-bottom: 1px solid rgba(96, 165, 250, 0.22);
}

/* Crisp Contrast Vignette Behind Hero Text & CTA (Replaces Misty Gray Band!) */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 255px;
  background: linear-gradient(
    to top,
    rgba(6, 19, 46, 0.94) 0%,
    rgba(6, 19, 46, 0.72) 48%,
    rgba(6, 19, 46, 0) 100%
  );
  pointer-events: none;
  z-index: 3;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.72;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.13;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 78% 70% at 50% 38%, #000 0%, transparent 80%);
  mask-image: radial-gradient(ellipse 78% 70% at 50% 38%, #000 0%, transparent 80%);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  pointer-events: none;
  z-index: 1;
}

.hero-orb--one {
  width: 340px;
  height: 340px;
  top: -80px;
  left: -60px;
  background: rgba(56, 189, 248, 0.3);
  animation: orbFloatA 11s ease-in-out infinite alternate;
}

.hero-orb--two {
  width: 390px;
  height: 390px;
  top: 18%;
  right: -95px;
  background: rgba(96, 165, 250, 0.28);
  animation: orbFloatB 14s ease-in-out infinite alternate;
}

@keyframes orbFloatA {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(42px, 30px, 0) scale(1.12); }
}

@keyframes orbFloatB {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-38px, -24px, 0) scale(1.1); }
}

.hero-aurora {
  position: absolute;
  inset: auto -20% 56px -20%;
  height: 110px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.34;
  background: radial-gradient(ellipse 60% 100% at 50% 50%, rgba(56, 189, 248, 0.52) 0%, transparent 72%);
  filter: blur(26px);
  animation: auroraSweep 9s ease-in-out infinite alternate;
}

@keyframes auroraSweep {
  from { transform: translate3d(-8%, 0, 0) scaleX(0.92); }
  to { transform: translate3d(8%, -8px, 0) scaleX(1.08); }
}

/* Dual Counter-Rotating Blueprint Orbital Rings */
.hero-orbit-ring {
  position: absolute;
  left: 50%;
  top: 40%;
  width: min(86vw, 440px);
  height: min(86vw, 440px);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  opacity: 0.36;
}

.orbit-svg {
  width: 100%;
  height: 100%;
  animation: spinOrbit 32s linear infinite;
}

.orbit-svg--reverse {
  position: absolute;
  inset: 12%;
  width: 76%;
  height: 76%;
  animation: spinOrbitReverse 22s linear infinite;
}

@keyframes spinOrbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spinOrbitReverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

/* Floating Glass Motion Popups (Visible on BOTH Mobile & Desktop!) */
.hero-float-chip {
  display: inline-flex;
  position: absolute;
  z-index: 5;
  align-items: center;
  gap: 0.4rem;
  padding: 0.34rem 0.68rem;
  border-radius: var(--radius-pill);
  background: rgba(8, 22, 56, 0.56);
  border: 1px solid rgba(147, 197, 253, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.96);
  font-size: 0.67rem;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 10px 24px rgba(4, 12, 32, 0.32);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.hero-chip__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.28);
  border: 1px solid rgba(147, 197, 253, 0.35);
  flex-shrink: 0;
}

.hero-float-chip svg {
  width: 12px;
  height: 12px;
  color: #93c5fd;
}

.hero-chip__text {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.hero-chip__title {
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
}

.hero-chip__sub {
  display: none;
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(191, 219, 254, 0.85);
  white-space: nowrap;
}

.hero-float-chip--1 {
  top: 13.5%;
  left: 3.5%;
  animation: chipBobA 5.2s ease-in-out infinite alternate;
}

.hero-float-chip--2 {
  top: 15.5%;
  right: 3.5%;
  animation: chipBobB 6s ease-in-out infinite alternate;
}

.hero-float-chip--3 {
  top: 39%;
  right: 3%;
  animation: chipBobA 6.8s ease-in-out 0.6s infinite alternate;
}

.hero-float-chip--4 {
  top: 36%;
  left: 3%;
  animation: chipBobB 5.8s ease-in-out 0.3s infinite alternate;
}

@keyframes chipBobA {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -8px, 0); }
}

@keyframes chipBobB {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, 8px, 0); }
}

/* Single-Row Top Navbar (Clean & Spacious on Mobile!) */
.hero-nav {
  position: relative;
  z-index: 6;
  padding: 1.2rem 0 0.6rem;
}

.hero-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.52rem;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffffff;
}

.brand-logo {
  width: 26px;
  height: 26px;
  min-width: 26px;
  flex: 0 0 26px;
  color: #ffffff;
}

.brand-logo--accent {
  color: var(--cobalt);
}

.nav-links {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.nav-links a {
  position: relative;
  font-size: 0.84rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1.5px;
  background: #ffffff;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.28s var(--ease-expo);
}

.nav-links a:hover {
  color: #ffffff;
}

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

/* Hero Portrait Stage (No z-index here so portrait sits below ::after vignette & copy sits above!) */
.hero-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-portrait-wrap {
  position: relative;
  z-index: 2;
  width: min(94vw, 410px);
  aspect-ratio: 1 / 1;
  margin-top: 0.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  animation: portraitSettle 0.85s var(--ease-expo) 0.06s backwards;
}

@keyframes portraitSettle {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 16px 36px rgba(6, 19, 46, 0.45));
  animation: subtleBreath 9s ease-in-out 1s infinite alternate;
}

@keyframes subtleBreath {
  from { transform: scale(1); }
  to { transform: scale(1.022); }
}

/* Hero Typography + Primary CTA Block */
.hero-content {
  position: relative;
  z-index: 5;
  width: 100%;
  padding: 0 0 2.75rem;
  margin-top: -2.4rem;
}

.hero-bottom-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  align-items: end;
  text-align: center;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.15rem, 9vw, 4.45rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.035em;
  color: #ffffff;
  text-shadow: 0 4px 22px rgba(6, 19, 46, 0.5);
}

.kinetic-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.18em;
  margin-bottom: -0.14em;
}

.kinetic-line > span {
  display: inline-block;
  animation: fadeInSoft 0.7s var(--ease-expo) backwards;
}

.kinetic-line--2 > span {
  animation-delay: 0.1s;
}

.hero-right-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  animation: fadeInSoft 0.75s var(--ease-expo) 0.18s backwards;
}

.hero-caption {
  margin: 0;
  max-width: 39ch;
  font-size: 0.89rem;
  line-height: 1.52;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 2px 14px rgba(6, 19, 46, 0.5);
}

@keyframes fadeInSoft {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================================================
   FADED-EDGE INFINITE MARQUEE RIBBON (SMOOTH GRADIENT MASK, NEVER STOPS!)
   ========================================================================== */

.marquee-strip {
  overflow: hidden;
  border-bottom: 1px solid var(--grid-line);
  background: #ffffff;
  padding: 0.9rem 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000000 10%, #000000 90%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000000 10%, #000000 90%, transparent 100%);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  width: max-content;
  animation: marqueeScroll 24s linear infinite;
  will-change: transform;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}

.marquee-item svg {
  width: 14px;
  height: 14px;
  color: var(--cobalt);
}

@keyframes marqueeScroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

/* ==========================================================================
   ARCHITECTURAL SWISS GRID
   ========================================================================== */

.swiss-main {
  background: var(--bg-page);
}

.swiss-row {
  border-top: 1px solid var(--grid-line);
}

.swiss-row:first-child {
  border-top: 0;
}

.swiss-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.swiss-rail {
  padding: 1.75rem 0 0.5rem;
}

.rail-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-body);
}

.rail-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cobalt);
}

.swiss-stage {
  padding: 0.6rem 0 2.75rem;
}

.stage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.stage-title {
  margin: 0;
  font-size: clamp(1.55rem, 5.5vw, 2.3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--ink-black);
}

/* ==========================================================================
   SECTION 2: PROJECTS (FLAGSHIP VODRAFT + HTML STAT PILLS + SUB-PROJECTS)
   ========================================================================== */

.showcase-card {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.showcase-beam-shell {
  position: relative;
  border-radius: calc(var(--radius-md) + 2px);
  padding: 2px;
  overflow: hidden;
  background: #dbe5f7;
  transition: transform 0.35s var(--ease-expo), box-shadow 0.35s var(--ease-expo);
}

.showcase-beam-shell::before {
  content: "";
  position: absolute;
  inset: -60%;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 260deg, #60a5fa 305deg, #2563eb 335deg, #38bdf8 360deg);
  animation: beamSpin 6.5s linear infinite;
  pointer-events: none;
}

@keyframes beamSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.showcase-beam-shell:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px rgba(11, 18, 32, 0.16);
}

.showcase-banner {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: block;
  background: #061229;
}

.vodraft-hero-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.55s var(--ease-expo);
}

.showcase-beam-shell:hover .vodraft-hero-img {
  transform: scale(1.022);
}

.vodraft-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-pill);
  background: rgba(6, 18, 41, 0.74);
  border: 1px solid rgba(147, 197, 253, 0.3);
  font-size: 0.65rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  flex-shrink: 0;
}

.voice-wave {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  height: 12px;
}

.voice-wave span {
  display: block;
  width: 2.5px;
  height: 100%;
  border-radius: 99px;
  background: #6ee7b7;
  transform-origin: center;
  animation: waveBar 1.1s ease-in-out infinite;
}

.voice-wave span:nth-child(1) { animation-delay: 0s; }
.voice-wave span:nth-child(2) { animation-delay: 0.16s; }
.voice-wave span:nth-child(3) { animation-delay: 0.32s; }
.voice-wave span:nth-child(4) { animation-delay: 0.12s; }
.voice-wave span:nth-child(5) { animation-delay: 0.26s; }

@keyframes waveBar {
  0%, 100% { transform: scaleY(0.28); }
  50% { transform: scaleY(1); }
}

.vodraft-ticker {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(6, 15, 36, 0.94);
  border-top: 1px solid rgba(96, 165, 250, 0.22);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.85rem;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.92);
  user-select: none;
  -webkit-user-select: none;
}

.vodraft-ticker__text {
  margin: 0;
  font-weight: 500;
  transition: opacity 0.28s ease;
}

/* Crisp HTML Stat Pills Underneath Vodraft (100% Mobile-Readable!) */
.metric-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  user-select: none;
  -webkit-user-select: none;
}

.metric-pill {
  background: var(--bg-subtle);
  border: 1px solid #dfe8f7;
  border-radius: 12px;
  padding: 0.72rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.metric-pill__val {
  font-size: clamp(0.95rem, 3.2vw, 1.12rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--ink-black);
}

.metric-pill__lbl {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-muted);
  line-height: 1.25;
}

.showcase-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.05rem;
}

.showcase-title {
  margin: 0;
  font-size: 1.14rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.showcase-title-link:hover {
  color: var(--cobalt);
}

.showcase-desc {
  margin: 0.35rem 0 0;
  font-size: 0.87rem;
  line-height: 1.62;
  color: var(--ink-body);
  max-width: 60ch;
}

.stack-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 0.75rem;
}

.stack-pill {
  font-size: 0.71rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 0.26rem 0.65rem;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--cobalt-dark);
  border: 1px solid #dbe5f7;
}

.project-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Additional Smaller Projects Grid (Shows Range!) */
.more-projects-head {
  margin: 2.5rem 0 1.1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--grid-line);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

.subprojects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.subproject-card {
  border: 1px solid var(--grid-line);
  border-radius: var(--radius-md);
  background: #ffffff;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.9rem;
  transition: transform 0.25s var(--ease-expo), border-color 0.2s ease, box-shadow 0.25s ease;
}

.subproject-card:hover {
  transform: translateY(-2px);
  border-color: #c5d6f5;
  box-shadow: 0 14px 30px rgba(11, 18, 32, 0.06);
}

.subproject-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.subproject-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid #dbe5f7;
  color: var(--cobalt);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.subproject-icon svg {
  width: 18px;
  height: 18px;
}

.subproject-kind {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.subproject-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.subproject-desc {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  line-height: 1.58;
  color: var(--ink-body);
}

.subproject-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 0.85rem;
}

.subproject-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--bg-subtle);
}

.subproject-meta {
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.subproject-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cobalt);
  white-space: nowrap;
  flex-shrink: 0;
}

.subproject-link svg {
  width: 13px;
  height: 13px;
  transition: transform 0.2s var(--ease-expo);
}

.subproject-link:hover svg {
  transform: translate(2px, -2px);
}

/* ==========================================================================
   SECTION 3: ABOUT, "NOW" CARD & 3-ROW GROUPED SKILL PILLS
   ========================================================================== */

.about-lead {
  margin: 0;
  max-width: 62ch;
  font-size: clamp(1.02rem, 3.6vw, 1.24rem);
  font-weight: 500;
  line-height: 1.58;
  letter-spacing: -0.015em;
  color: var(--ink-black);
}

.about-body {
  margin: 0.85rem 0 0;
  max-width: 64ch;
  font-size: 0.88rem;
  line-height: 1.68;
  color: var(--ink-body);
}

.about-actions {
  margin-top: 1.4rem;
}

.now-card {
  margin-top: 1.75rem;
  padding: 1.2rem 1.3rem;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid #dfe7f5;
}

.now-card__head {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cobalt-dark);
  margin: 0 0 0.7rem;
}

.live-pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
}

.live-pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.35);
  animation: pulseRing 2s var(--ease-out) infinite;
}

@keyframes pulseRing {
  0% { transform: scale(0.7); opacity: 0.9; }
  100% { transform: scale(1.9); opacity: 0; }
}

.now-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--ink-body);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.now-list strong {
  color: var(--ink-black);
}

/* Grouped 3-Row Skill Pills */
.stack-wrap {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--grid-line);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.skill-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.stack-label {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

.tools-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.44rem;
  padding: 0.46rem 0.84rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--grid-line);
  background: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-black);
  transition: border-color 0.2s ease, transform 0.24s var(--ease-expo), box-shadow 0.24s ease, opacity 0.45s var(--ease-expo);
}

.tool-badge svg {
  width: 14px;
  height: 14px;
  color: var(--cobalt);
  flex-shrink: 0;
}

.tool-badge:hover {
  border-color: var(--cobalt);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(29, 78, 216, 0.08);
}

.stagger-group .tool-badge {
  opacity: 0;
  transform: translateY(10px);
}

.stagger-group.is-visible .tool-badge {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--i, 0) * 40ms);
}

/* ==========================================================================
   SECTION 4: CONTACT (FIRST-PERSON + ONE-TAP COPY EMAIL + ICON LINKS)
   ========================================================================== */

.contact-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.15rem;
}

.contact-email-link {
  color: var(--cobalt);
  font-weight: 600;
  word-break: break-word;
}

.contact-email-link:hover {
  text-decoration: underline;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.pill--outline.is-copied {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #059669;
}

.pill--outline.is-copied .pill__icon {
  background: #d1fae5;
  color: #059669;
}

.contact-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--grid-line);
  width: 100%;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.46rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--grid-line);
  background: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-black);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease-expo);
}

.social-pill svg {
  width: 14px;
  height: 14px;
  color: var(--cobalt);
}

.social-pill:hover {
  border-color: var(--cobalt);
  color: var(--cobalt);
  transform: translateY(-1.5px);
}

.footer-bottom {
  border-top: 1px solid var(--grid-line);
  padding: 1.35rem 0 2.2rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.footer-bottom-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 1.15rem;
  font-weight: 600;
  color: var(--ink-body);
}

.footer-socials a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-socials a svg {
  width: 14px;
  height: 14px;
}

.footer-socials a:hover {
  color: var(--cobalt);
}

/* ==========================================================================
   ONLINE RESUME / CV PAGE (resume.html)
   ========================================================================== */

.resume-accent-bar {
  height: 4px;
  background: linear-gradient(90deg, #06132e 0%, #1d4ed8 55%, #60a5fa 100%);
}

.resume-topbar {
  border-bottom: 1px solid var(--grid-line);
  padding: 1rem 0;
  background: #ffffff;
}

.resume-hero-row {
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.35rem;
}

.resume-photo-trigger {
  position: relative;
  width: 108px;
  height: 108px;
  padding: 0;
  border: 2px solid #dbe5f7;
  border-radius: 18px;
  overflow: hidden;
  background: var(--cobalt-midnight);
  box-shadow: 0 8px 22px rgba(11, 18, 32, 0.1);
  transition: transform 0.25s var(--ease-expo), border-color 0.2s ease, box-shadow 0.25s ease;
  flex-shrink: 0;
}

.resume-photo-trigger:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: var(--cobalt);
  box-shadow: 0 12px 28px rgba(29, 78, 216, 0.2);
}

.resume-photo-trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

.resume-photo-badge {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.22rem 0;
  background: rgba(6, 19, 46, 0.78);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.03em;
}

.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(6, 19, 46, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s var(--ease-out);
}

.photo-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.photo-modal__box {
  position: relative;
  width: min(92vw, 420px);
  background: #ffffff;
  border-radius: 20px;
  padding: 0.75rem;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.35);
  transform: scale(0.92) translateY(12px);
  transition: transform 0.32s var(--ease-expo);
}

.photo-modal.is-open .photo-modal__box {
  transform: scale(1) translateY(0);
}

.photo-modal__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 14%;
  border-radius: 14px;
}

.photo-modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.35rem 0.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-black);
}

.photo-modal__close {
  padding: 0.34rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--grid-line);
  background: var(--bg-subtle);
  font-size: 0.75rem;
  font-weight: 600;
}

.photo-modal__close:hover {
  background: var(--ink-black);
  color: #ffffff;
}

.resume-name {
  margin: 0;
  font-size: clamp(1.9rem, 7vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.resume-sub {
  margin: 0.5rem 0 1.15rem;
  font-size: 0.92rem;
  color: var(--ink-body);
}

.resume-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-body);
}

.resume-contacts a:hover {
  color: var(--cobalt);
}

.resume-entry {
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--grid-line);
}

.resume-entry:first-child {
  padding-top: 0;
}

.resume-entry:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.resume-entry__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 0.3rem;
}

.resume-entry__role {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.35;
}

.resume-entry__date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cobalt);
}

.resume-entry__org {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.resume-bullets {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  line-height: 1.62;
  color: var(--ink-body);
}

.resume-bullets li + li {
  margin-top: 0.3rem;
}

.pdf-cta-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem;
  padding: 1.35rem 1.45rem;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid #dbe5f7;
}

/* ==========================================================================
   SCROLL REVEAL
   ========================================================================== */

.motion-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease-expo), transform 0.65s var(--ease-expo);
}

.motion-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-orb,
  .hero-aurora,
  .orbit-svg,
  .orbit-svg--reverse,
  .hero-float-chip,
  .brand-mark,
  .hero-portrait-wrap,
  .hero-portrait-img,
  .kinetic-line > span,
  .hero-right-col,
  .marquee-track,
  .showcase-beam-shell::before,
  .pill--shimmer::after,
  .voice-wave span,
  .live-pulse::after {
    animation: none !important;
  }

  .motion-reveal,
  .stagger-group .tool-badge {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   TABLET & DESKTOP BREAKPOINTS
   ========================================================================== */

@media (min-width: 720px) {
  .nav-links {
    display: flex;
  }

  .hero {
    min-height: 640px;
  }

  .hero-orbit-ring {
    width: 560px;
    height: 560px;
    top: 46%;
    opacity: 0.46;
  }

  .hero-grid-bg {
    opacity: 0.2;
  }

  .hero-float-chip {
    gap: 0.62rem;
    padding: 0.58rem 1rem 0.58rem 0.68rem;
    border-radius: 15px;
    font-size: 0.8rem;
    background: rgba(8, 22, 56, 0.62);
    border-color: rgba(147, 197, 253, 0.34);
    box-shadow: 0 16px 34px rgba(4, 12, 32, 0.38);
  }

  .hero-chip__icon {
    width: 32px;
    height: 32px;
  }

  .hero-float-chip svg {
    width: 15px;
    height: 15px;
  }

  .hero-chip__sub {
    display: block;
  }

  .hero-float-chip--1 {
    top: 22%;
    left: 7%;
  }

  .hero-float-chip--4 {
    top: 45%;
    left: 11%;
  }

  .hero-float-chip--2 {
    top: 22%;
    right: 7%;
  }

  .hero-float-chip--3 {
    top: 45%;
    right: 11%;
  }

  .hero-stage {
    position: static;
  }

  .hero-portrait-wrap {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 600px;
    height: 94%;
    aspect-ratio: auto;
    margin-top: 0;
    z-index: 2;
    animation: desktopPortraitSettle 0.85s var(--ease-expo) 0.06s backwards;
  }

  @keyframes desktopPortraitSettle {
    from { opacity: 0; transform: translateX(-50%) translateY(18px) scale(0.97); }
    to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  }

  .hero-content {
    margin-top: 0;
    padding: 15.5rem 0 3.25rem;
  }

  .hero-bottom-grid {
    grid-template-columns: 1.25fr 0.75fr;
    text-align: left;
  }

  .hero-right-col {
    align-items: flex-start;
  }

  .subprojects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .showcase-meta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .project-ctas {
    flex-shrink: 0;
    flex-wrap: nowrap;
  }

  .footer-bottom-inner {
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }

  .resume-hero-row {
    flex-direction: row;
    align-items: center;
  }

  .resume-photo-trigger {
    width: 118px;
    height: 118px;
  }
}

@media (min-width: 960px) {
  .swiss-grid {
    grid-template-columns: 220px 1fr;
  }

  .swiss-rail {
    padding: 3.25rem 1.5rem 3.25rem 0;
    border-right: 1px solid var(--grid-line);
  }

  .swiss-stage {
    padding: 3.25rem 0 3.75rem 3rem;
  }
}
