:root {
  --bg: #09090b;
  --surface: #18191c;
  --card: #121214;
  --text: #ffffff;
  --muted: #a1a1aa;
  --line: #27272a;
  --accent: #9e00ff;
  --font-future-body: "Space Grotesk", Inter, system-ui, sans-serif;
  --font-future-heading: "Orbitron", "Space Grotesk", Inter, system-ui, sans-serif;
  --font-future-ui: "Rajdhani", "Space Grotesk", Inter, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Futuristic typography for non-hero / non-build sections and top nav */
.top-nav,
#career,
#library,
#connect {
  font-family: var(--font-future-body);
}

.top-nav .logo,
#career h3,
#library h3,
#connect h3 {
  font-family: var(--font-future-heading);
  letter-spacing: 0.02em;
}

.top-nav nav a,
#career .period,
#career .logo-strip div,
#library .toggle,
#connect label,
#connect .platforms a,
#connect .button {
  font-family: var(--font-future-ui);
  letter-spacing: 0.03em;
}

.section-head h2 {
  font-family: "Rajdhani", "Space Grotesk", Inter, system-ui, sans-serif;
  letter-spacing: 0.03em;
  font-size: clamp(2rem, 3.6vw, 2.75rem);
}

main {
  width: 100%;
  min-height: 100svh;
  height: auto;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  row-gap: 0.5rem;
}

.top-nav-inner {
  width: min(1100px, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.2rem, 3vw, 2.6rem);
}

nav {
  display: flex;
  gap: 1.8rem;
}

.mobile-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(24, 25, 28, 0.9);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.mobile-menu-toggle span {
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: #f8fbff;
}

.mobile-nav {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto 0.4rem;
  background: rgba(17, 17, 24, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 0.5rem;
  display: grid;
  gap: 0.25rem;
}

.mobile-nav a {
  color: #f8fbff;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  font-size: 0.94rem;
}

.mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mobile-nav[hidden] {
  display: none !important;
}

@media (min-width: 861px) {
  .mobile-nav {
    display: none !important;
  }
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #00ff9e;
  outline-offset: 2px;
}

.top-nav a {
  transition: color 200ms ease, text-shadow 220ms ease, box-shadow 220ms ease, background-color 220ms ease;
}

nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

nav a:hover {
  color: var(--text);
}

.top-nav a.is-active:not(.nav-cta) {
  color: #f8fbff;
  text-shadow: 0 0 12px rgba(118, 179, 250, 0.75);
}

.logo {
  flex: 0 0 auto;
  margin-right: clamp(1.2rem, 4vw, 3.8rem);
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 0.98rem;
}

.nav-cta {
  margin-left: clamp(0.8rem, 3vw, 2.8rem);
  color: #3d1f00;
  background: #fff4e6;
  border: 1px solid #ffd580;
  border-radius: 999px;
  padding: 0.42rem 1rem;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.92rem;
  font-style: italic;
  font-weight: 500;
  transform: skew(-10deg);
  box-shadow: 0 0 0 0 #ffd580;
  transition: transform 220ms ease, box-shadow 220ms ease, color 220ms ease;
}

.nav-cta:hover {
  color: #111118;
  transform: skew(-10deg) scale(1.04);
  box-shadow: 0 0 18px 2px #ffd580;
}

.nav-cta.is-active {
  color: #111118;
  box-shadow: 0 0 20px 2px #ffd580;
}

.section {
  width: 100%;
  min-height: 100svh;
  padding: 6rem 2rem 2rem;
  /* Account for fixed nav */
  scroll-snap-align: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.section.with-bg {
  position: relative;
  overflow: hidden;
  background: transparent;
  z-index: 2;
}

.section-body {
  position: relative;
  z-index: 10;
}

/* Utility classes used in markup */
.relative {
  position: relative;
}

.overflow-hidden {
  overflow: hidden;
}

.z-10 {
  z-index: 10;
}

.hero {
  justify-content: center;
  gap: 0.9rem;
}

.eyebrow {
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.2;
}

h1 {
  font-family: Fraunces, serif;
  font-size: clamp(2rem, 6vw, 4rem);
  max-width: 14ch;
  color: #fff;
}

.hero-content #heroTitle {
  max-width: 22ch;
}

.hero-title-small {
  font-size: 0.75em;
  line-height: 1.15;
}

.lead {
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.04rem;
}

.hero-meta {
  margin-top: 0.4rem;
  display: flex;
  justify-content: flex-start;
  gap: 0.8rem;
  padding-top: 0.8rem;
  font-size: 0.9rem;
  font-family: monospace;
  color: #00FF9E;
}

.typing-animation::after {
  content: "|";
  margin-left: 0.22rem;
  animation: typingCursorBlink 1s step-end infinite;
}

@keyframes typingCursorBlink {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
}

.section-head p {
  color: var(--muted);
  margin: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #0f2c45;
  padding: 0.62rem 0.95rem;
  border-radius: 999px;
  color: #f8fbff;
  background: #0f2c45;
  font-weight: 600;
  font-size: 0.88rem;
}

.button.small {
  padding: 0.42rem 0.74rem;
  font-size: 0.8rem;
}

.button.ghost {
  color: #0f2c45;
  background: transparent;
}

#career .resume-cta {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  color: #f8fbff;
  font-family: "Rajdhani", "Space Grotesk", Inter, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.2rem 0;
  gap: 0.55rem;
  line-height: 1;
  transition: color 180ms ease, text-shadow 180ms ease, transform 180ms ease;
  position: absolute;
  left: 50%;
  bottom: clamp(1.9rem, 4.6vh, 3.1rem);
  z-index: 12;
  transform: translateX(-50%);
}

#career .resume-cta .resume-cta-text {
  transform: translateY(1px);
}

#career .resume-cta .resume-cta-icon {
  width: 1.35rem;
  height: 1.35rem;
  overflow: visible;
}

#career .resume-cta .resume-tray,
#career .resume-cta .resume-arrow line,
#career .resume-cta .resume-arrow polyline,
#career .resume-cta .resume-check {
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

#career .resume-cta .resume-arrow {
  transform-origin: 20px 20px;
  animation: resumeArrowIdle 1.35s ease-in-out infinite;
  transition: opacity 240ms ease, transform 240ms ease;
}

#career .resume-cta .resume-check {
  opacity: 0;
  stroke-dasharray: 22;
  stroke-dashoffset: 22;
  transition: opacity 180ms ease, stroke-dashoffset 320ms ease;
}

#career .resume-cta:hover {
  color: #00FF9E;
  text-shadow: 0 0 10px rgba(0, 255, 158, 0.4);
  transform: translateX(-50%) translateY(-1px);
}

#career .resume-cta.is-done .resume-arrow {
  opacity: 0;
  transform: translateY(8px);
  animation: none;
}

#career .resume-cta.is-done .resume-check {
  opacity: 1;
  stroke-dashoffset: 0;
}

@keyframes resumeArrowIdle {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(1.5px);
  }
}

.career-shell {
  min-height: calc(100vh - 8.5rem);
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: clamp(3.4rem, 7vh, 5.2rem);
}

.career-orbit-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(220px, 290px) minmax(0, 1fr);
  gap: clamp(1.2rem, 3vw, 3rem);
  align-items: start;
  align-content: start;
  margin-top: 7rem;
}

.career-orbits {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  align-self: start;
  padding-top: 0;
}

.career-main {
  display: grid;
  grid-template-columns: minmax(340px, 540px) minmax(250px, 340px);
  gap: clamp(4.8rem, 12vw, 12rem);
  align-items: start;
  align-self: start;
  justify-content: start;
}

.career-orbit-button {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  padding: 0.15rem 0;
  text-align: left;
}

.career-orbit-button .orbit-ring {
  width: 62px;
  height: 62px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.career-orbit-button .orbit-planet {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.2);
}

.career-orbit-button .orbit-label {
  font-family: "Rajdhani", "Space Grotesk", Inter, system-ui, sans-serif;
  font-size: 1rem;
  letter-spacing: 0.03em;
}

.career-orbit-button.is-active {
  color: #00FF9E;
}

.career-orbit-button.is-active .orbit-planet {
  box-shadow: 0 0 18px rgba(0, 255, 158, 0.35);
}

.career-info-panel {
  border: none;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  padding: 0;
  text-align: left;
  justify-self: center;
}

.career-info-period {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #00FF9E;
}

.career-info-panel h3 {
  margin-top: 0.35rem;
  margin-bottom: 0.4rem;
  font-family: Inter, system-ui, sans-serif !important;
  font-size: clamp(2rem, 3.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
}

.career-info-role {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: #a3a3a3;
  font-size: 1rem;
  max-width: none;
  line-height: 1.45;
  text-align: left;
}

.career-info-highlights {
  margin-top: 0.75rem;
  font-family: Inter, system-ui, sans-serif;
  color: #a3a3a3;
  font-size: 1rem;
  max-width: 46ch;
  margin-left: 0;
  margin-right: 0;
  padding-left: 1.1rem;
  list-style-position: outside;
}

.career-info-highlights li {
  margin: 0.35rem 0;
}

.career-media {
  width: 100%;
  justify-self: end;
  margin-left: clamp(0.25rem, 1vw, 0.9rem);
}

.career-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(20, 20, 24, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.career-carousel img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.career-carousel-btn {
  display: none;
}

.career-carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 0.75rem;
  transform: translateX(-50%);
  display: inline-flex;
  gap: 0.4rem;
}

.career-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
}

.career-carousel-dot.is-active {
  background: #00FF9E;
}

@media (min-width: 1100px) {
  .career-info-role {
    white-space: nowrap;
  }
}

.timeline {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.timeline article {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  background: var(--surface);
}

.period {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.period-current {
  color: #00FF9E;
}

ul {
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.logo-strip {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.65rem;
}

.logo-strip div {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.4rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}

.carousel-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.7fr;
  gap: 1rem;
}

.build-feature,
.build-faded {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}

.build-feature p {
  color: var(--muted);
}

.chip-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

.chip-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.56rem;
  font-size: 0.78rem;
}

.build-preview {
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(160deg, #d7deea, #f6e8e4 60%, #a6bccf),
    radial-gradient(circle at 20% 80%, #111d2e, transparent 60%);
  min-height: 300px;
}

.build-faded {
  opacity: 0.52;
  border-style: dashed;
  align-self: center;
}

.subhead {
  margin: 1.2rem 0 0.7rem;
  font-size: 1rem;
}

#library .subhead {
  font-family: Inter, system-ui, sans-serif;
}

.gallery-grid {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
}

.gallery-grid::-webkit-scrollbar {
  height: 6px;
}

.gallery-grid::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 10px;
}

.gallery-card {
  position: relative;
  min-width: 280px;
  height: 340px;
  border-radius: 14px;
  overflow: hidden;
  scroll-snap-align: start;
  flex: 0 0 auto;
  display: block;
}

.gallery-card.embed-card {
  min-width: 320px;
  height: 460px;
  background: #0f1118;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.gallery-card.embed-card.embed-card-tweet {
  min-width: 320px;
  height: 420px;
}

.embed-frame-wrap {
  flex: 1;
  min-height: 0;
  background: #0b0d14;
  overflow: auto;
}

.embed-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #0b0d14;
}

.tweet-frame-wrap {
  padding: 0.25rem 0.25rem 0;
}

.tweet-frame-wrap .twitter-tweet {
  margin: 0 auto !important;
}

.embed-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 17, 24, 0.95);
}

.embed-meta-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.embed-meta h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f3f4f6;
  line-height: 1.3;
}

.embed-meta p {
  margin: 0;
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.35;
}

.card-stretch-link {
  position: absolute;
  inset: 0;
  z-index: 6;
  border-radius: inherit;
  text-indent: -9999px;
  overflow: hidden;
}

.resource-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #dbeafe;
  text-transform: uppercase;
  line-height: 1;
}

.gallery-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-card:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(31, 90, 139, 0.4) 60%, rgba(20, 33, 47, 0.9) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  color: #fff;
}

.gallery-overlay .resource-mark {
  align-self: flex-start;
  margin-bottom: 0.55rem;
}

#libraryResourcesGrid .gallery-card {
  min-width: 250px;
  height: 300px;
}

#libraryActivitiesGrid .gallery-card,
#libraryActivitiesGrid .gallery-card.embed-card,
#libraryActivitiesGrid .gallery-card.embed-card.embed-card-tweet {
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  height: 340px;
  flex: 0 0 280px;
}

.gallery-overlay h4 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: #fff;
}

.gallery-overlay p {
  font-size: 0.9rem;
  color: #d4dce4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
}

.read-more {
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.2s ease;
}

.gallery-card:hover .read-more {
  transform: translateX(4px);
}

.toggle {
  color: var(--muted);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.toggle span {
  width: 34px;
  height: 18px;
  border-radius: 20px;
  background: #d6dee7;
  position: relative;
}

.toggle span::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  top: 2px;
  left: 2px;
}

.connect form {
  margin-top: 1rem;
  display: grid;
  gap: 0.8rem;
  max-width: 680px;
}

.connect-stack {
  min-height: calc(100svh - 12rem);
  display: grid;
  grid-template-rows: auto auto 1fr;
  justify-items: center;
  text-align: center;
  gap: 0.55rem;
}

.connect-mail {
  margin: 0;
  color: #cbd5e1;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.connect-mail a {
  color: #f8fbff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.connect-form {
  width: min(680px, 100%);
  display: grid;
  gap: 0.8rem;
  justify-items: center;
  align-self: center;
  margin-top: 0;
}

#connect label {
  width: min(680px, 100%);
  text-align: left;
}

#connect textarea {
  width: 100%;
  color: #f8fbff;
}

#connect textarea::placeholder {
  color: #a3a3a3;
}

#connect .connect-send {
  margin-left: 0;
  align-self: center;
}

label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
}

input[type="text"],
input[type="email"],
textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  font: inherit;
  background: var(--surface);
  color: #f8fbff;
}

input[type="text"],
input[type="email"] {
  min-height: 44px;
  width: 100%;
}

textarea {
  min-height: 120px;
}

.connect-status {
  min-height: 1.5rem;
  margin: 0;
  font-size: 0.9rem;
  color: #a3a3a3;
}

.connect-status.is-success {
  color: #00ff9e;
}

.connect-status.is-error {
  color: #ff8e8e;
}

.connect-fallback {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.86rem;
}

.connect-fallback a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.noscript-note {
  margin: 0;
  padding: 0.85rem 1rem;
  background: #111118;
  color: #f8fbff;
  text-align: center;
  font-size: 0.92rem;
}

.platforms {
  margin-top: 0;
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
}

.platforms a {
  border: none;
  border-radius: 0;
  padding: 0;
  text-align: center;
  font-size: 0.95rem;
  color: #a3a3a3;
  letter-spacing: 0.03em;
}

.platforms a:hover {
  color: #f8fbff;
}

@media (max-width: 860px) {
  main {
    scroll-snap-type: y proximity;
    scroll-behavior: auto;
  }

  .section {
    min-height: 100svh;
    scroll-snap-align: none;
    padding: 5.25rem 1rem 1.5rem;
  }

  nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .top-nav-inner {
    justify-content: space-between;
  }

  .logo {
    margin-right: 0;
    font-size: 0.9rem;
  }

  .nav-cta {
    margin-left: 0;
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
  }

  .gallery-card {
    min-width: min(280px, calc(100vw - 2.5rem));
  }

  .gallery-card.embed-card {
    min-width: min(320px, calc(100vw - 2.5rem));
    height: 430px;
  }

  .gallery-card.embed-card.embed-card-tweet {
    min-width: min(320px, calc(100vw - 2.5rem));
    height: 400px;
  }

  #libraryActivitiesGrid .gallery-card,
  #libraryActivitiesGrid .gallery-card.embed-card,
  #libraryActivitiesGrid .gallery-card.embed-card.embed-card-tweet {
    width: min(280px, calc(100vw - 2.5rem));
    min-width: min(280px, calc(100vw - 2.5rem));
    max-width: min(280px, calc(100vw - 2.5rem));
    height: 340px;
    flex: 0 0 min(280px, calc(100vw - 2.5rem));
  }

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

  .hero-meta {
    flex-direction: column;
  }

  .career-shell {
    min-height: auto;
  }

  .career-orbit-layout {
    grid-template-columns: 1fr;
    align-items: start;
    margin-top: 2rem;
  }

  .career-main {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .connect-stack {
    min-height: auto;
    gap: 0.9rem;
  }

  .career-orbits {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
  }

  .career-orbit-button .orbit-ring {
    width: 52px;
    height: 52px;
  }

  #career .resume-cta {
    font-size: 0.9rem;
    gap: 0.45rem;
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
  }

  .career-info-panel h3 {
    font-size: clamp(1.75rem, 7vw, 2.2rem);
  }

  .career-carousel {
    aspect-ratio: 16 / 10;
  }

}

/* Hero stars + twinkling background */
.stars-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.twinkling-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20px 30px, #eee, rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 40px 70px, #fff, rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 90px 40px, #fff, rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 130px 80px, #fff, rgba(0, 0, 0, 0)),
    radial-gradient(2px 2px at 160px 120px, #ddd, rgba(0, 0, 0, 0));
  background-repeat: repeat;
  background-size: 200px 200px;
  animation: twinkle 5s ease-in-out infinite;
  opacity: 0.3;
  z-index: 0;
  pointer-events: none;
}

@keyframes twinkle {
  0% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.6;
  }

  100% {
    opacity: 0.3;
  }
}

.hero {
  position: relative;
  overflow: hidden;
  background: #09090b;
  border: 1px solid var(--line);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 12;
}

/* Focus Rail Styles */
.builds-rail-sec {
  background: transparent;
  color: #fff;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.builds-head {
  padding: 2rem 2rem 0;
  position: relative;
  z-index: 10;
}

.focus-rail-container {
  position: relative;
  width: 100%;
  height: 600px;
  display: flex;
  flex-direction: column;
}

.rail-stage-wrapper {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 2rem;
}

.rail-stage-perspective {
  perspective: 1200px;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  height: 360px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rail-stage-drag {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}

.rail-stage-drag:active {
  cursor: grabbing;
}

.rail-card {
  position: absolute;
  width: 260px;
  aspect-ratio: 3/4;
  border-radius: 16px;
  background: #171717;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease, filter 0.4s ease;
  transform-style: preserve-3d;
  user-select: none;
  pointer-events: none;
}

@media (min-width: 768px) {
  .rail-card {
    width: 300px;
  }
}

.rail-card.clickable {
  pointer-events: auto;
  cursor: pointer;
}

.rail-card img {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  object-fit: cover;
  pointer-events: none;
}

.rail-card-overlay {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), transparent);
  pointer-events: none;
}

.rail-card-blend {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.1);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.rail-info-controls {
  max-width: 900px;
  margin: 2rem auto 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  padding-bottom: 2rem;
}

@media (min-width: 768px) {
  .rail-info-controls {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.rail-info {
  flex: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.rail-meta {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #34d399;
  /* emerald-400 */
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.rail-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  font-family: Inter, system-ui, sans-serif;
}

.rail-desc {
  color: #a3a3a3;
  font-size: 1rem;
  max-width: 400px;
}

.rail-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.rail-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  background: rgba(23, 23, 23, 0.8);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.rail-nav button {
  background: transparent;
  color: #a3a3a3;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}

.rail-nav button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.rail-nav button:active {
  transform: scale(0.9);
}

#railCount {
  font-size: 0.8rem;
  font-family: monospace;
  color: #737373;
  min-width: 48px;
  text-align: center;
}

#railExplore {
  background: #fff;
  color: #000;
  border: none;
  font-weight: 600;
  transition: transform 0.15s;
}

#railExplore:hover {
  transform: scale(1.05);
}

#railExplore:active {
  transform: scale(0.95);
}

/* --- Dotted Surface Background (non-hero sections) --- */
.dotted-surface-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.dotted-surface-bg-fixed {
  position: fixed;
  inset: 0;
  z-index: 1;
}

.dotted-surface-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.1) 0%, rgba(9, 9, 11, 0) 52%);
  pointer-events: none;
}

@media (max-width: 520px) {
  .rail-card {
    width: 220px;
  }

  .rail-stage-wrapper {
    padding: 0 1rem;
  }

  .focus-rail-container {
    height: 540px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .twinkling-bg {
    animation: none;
  }
}
