/* junior.fyi — standalone design system */

:root {
  --color-bg: #f7c44f;
  --color-primary: #ffffff;
  --color-text: #191b1d;
  --color-body-text: rgba(0, 0, 0, 0.8);
  --color-black: #000000;
  --color-accent: #764a08;
  --color-secondary: #4a3b1b;
  --color-subtle: #e2a20d;
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --font-serif: "Roboto Slab", Georgia, serif;
  --bubble-radius: 2.5rem;
  --stack-radius: 1.5rem;
  --btn-radius: 3rem 3rem 3rem 0;
  --container-max: 1200px;
  --header-height: 4.5rem;
  --jr-bot-z: 900;
  --webpage-viewer-aspect: 16 / 9;
  --jr-clearance: clamp(4rem, 10vw, 6.5rem);
  --color-border: var(--color-bg);
  --surface-media: var(--color-bg);
  --surface-media-deep: #050505;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  background-color: #000;
  overflow-x: clip;
}

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

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  padding-top: var(--header-height);
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-body-text);
  background-color: var(--color-bg);
  overscroll-behavior: none;
}

@media (max-width: 767px) {
  body {
    font-size: 1rem;
  }
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  color: var(--color-black);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.font-display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h1, .h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.15;
  color: var(--color-text);
}

h2, .h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.2;
}

h3, .h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
}

h4, .h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
}

.text-secondary {
  color: var(--color-secondary);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--color-black);
  color: var(--color-bg);
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: var(--color-bg);
  border-bottom: 1px solid rgba(226, 162, 13, 0.35);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.site-header.is-nav-hidden {
  transform: translateY(-100%);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .site-header {
    transition: none;
  }
}

.site-header .navbar {
  --bs-navbar-padding-y: 0.75rem;
}

.container {
  padding-left: clamp(1rem, 4vw, 1.5rem);
  padding-right: clamp(1rem, 4vw, 1.5rem);
}

@media (min-width: 1200px) {
  .container {
    max-width: var(--container-max);
  }
}

main,
.page-section,
.hero-section {
  width: 100%;
  max-width: 100%;
}

.site-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  letter-spacing: 0.08em;
  color: var(--color-black) !important;
  text-transform: uppercase;
}

.site-logo:hover {
  color: var(--color-accent) !important;
}

.navbar-nav .nav-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-black);
  padding: 0.5rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
  color: var(--color-accent);
}

.navbar-toggler {
  border: 2px solid transparent;
  border-radius: 0.75rem;
}

[data-bs-theme="light"] .navbar-toggler {
  border-color: var(--color-black);
  background: transparent;
  box-shadow: none;
}

[data-bs-theme="light"] .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(118, 74, 8, 0.35);
}

[data-bs-theme="light"] .navbar-toggler-icon {
  filter: none;
  opacity: 1;
}

.theme-toggle {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0.35rem 0;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.theme-toggle__track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 3.35rem;
  height: 1.75rem;
  padding: 0.16rem;
  border-radius: 999px;
  border: 1.5px solid rgba(0, 0, 0, 0.16);
  background: rgba(0, 0, 0, 0.05);
}

.theme-toggle__thumb {
  position: absolute;
  top: 0.16rem;
  left: 0.16rem;
  width: calc(50% - 0.16rem);
  height: calc(100% - 0.32rem);
  border-radius: 999px;
  background: var(--color-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
  transition: transform 0.22s ease;
  transform: translateX(100%);
}

.theme-toggle.is-dark .theme-toggle__thumb {
  transform: translateX(0);
}

.theme-toggle__option {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--color-black);
  opacity: 0.38;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.theme-toggle.is-light .theme-toggle__option--light,
.theme-toggle.is-dark .theme-toggle__option--dark {
  opacity: 0.9;
  color: var(--color-accent);
}

.theme-toggle:focus-visible {
  outline: none;
}

.theme-toggle:focus-visible .theme-toggle__track {
  box-shadow: 0 0 0 0.2rem rgba(118, 74, 8, 0.28);
}

.navbar-utils {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

@media (min-width: 992px) {
  .nav-item--theme {
    margin-right: 1.35rem;
  }
}

.dropdown-menu {
  border: 2px solid var(--color-subtle);
  border-radius: 1rem 1rem 1rem 0;
  background: var(--color-primary);
  padding: 0.5rem;
}

.dropdown-item {
  font-family: var(--font-display);
  font-weight: 500;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--color-bg);
  color: var(--color-accent);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.45em;
}

.fa-icon {
  flex-shrink: 0;
  line-height: 1;
}

.fa-icon--sm {
  font-size: 0.85em;
}

.btn-junior .fa-icon,
.project-tag .fa-icon,
.project-breadcrumb a .fa-icon {
  margin-right: 0.45em;
}

.content-stack__cell h3,
.skill-card h4,
.project-content .project-content-label,
.project-content .project-content-heading:has(.fa-icon) {
  display: flex;
  align-items: flex-start;
}

.content-stack__cell h3 .fa-icon,
.skill-card h4 .fa-icon,
.project-content .project-content-label .fa-icon,
.project-content .project-content-heading .fa-icon {
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 0.12em;
  margin-right: 0.45em;
}

.project-tag,
.project-media-tag {
  display: inline-flex;
  align-items: center;
}

.project-media-tag {
  gap: 0.35em;
}

.btn-junior {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.125rem, 2vw, 2rem);
  line-height: 1.4;
  color: var(--color-text);
  background: transparent;
  border: 3px solid var(--color-text);
  border-radius: var(--btn-radius);
  padding: 1.25rem 2.5rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
}

.btn-junior:hover,
.btn-junior:focus {
  background: var(--color-text);
  color: var(--color-primary);
  border-color: var(--color-text);
}

.btn-junior-sm {
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem 2rem 2rem 0;
}

.btn-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
}

@media (min-width: 768px) {
  .btn-stack {
    width: auto;
  }
}

@media (max-width: 767px) {
  .btn-junior {
    font-size: 1.125rem;
    padding: 1rem 1.75rem;
    border-radius: 2rem 2rem 2rem 0;
    width: 100%;
    max-width: 22rem;
  }

  .btn-junior-sm {
    width: auto;
    max-width: none;
  }
}

.speech-bubble {
  background: var(--color-primary);
  padding: clamp(1.5rem, 4vw, 4vw);
  border-radius: var(--bubble-radius) var(--bubble-radius) 0 var(--bubble-radius);
  max-width: 100%;
  overflow-wrap: break-word;
}

@media (min-width: 992px) {
  .speech-bubble {
    -webkit-mask-image: url("../svg/bubble-corner.svg");
    mask-image: url("../svg/bubble-corner.svg");
    -webkit-mask-size: cover;
    mask-size: cover;
    -webkit-mask-position: bottom right;
    mask-position: bottom right;
  }
}

@media (max-width: 991px) {
  .speech-bubble {
    border-radius: 1.5rem 1.5rem 0 1.5rem;
    padding: clamp(1.25rem, 5vw, 2rem);
  }
}

@media (max-width: 767px) {
  .speech-bubble {
    border-radius: 1.25rem 1.25rem 0 1.25rem;
    padding: 1.25rem;
  }
}

/* Content stream — left column with room for JR bot */
.chat-stream {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  margin-right: auto;
  padding-top: var(--chat-first-offset, 0);
  transition: padding-top 0.55s ease;
}

@media (prefers-reduced-motion: reduce) {
  .chat-stream {
    transition: none;
  }
}

@media (min-width: 992px) {
  .chat-stream {
    max-width: 85%;
  }
}

.chat-stream > :last-child {
  margin-bottom: 0;
}

.chat-stream--settling-offset {
  transition: none;
}

/* Scroll reveal — animation only, no background */
.content-reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.55s ease, transform 0.55s ease;
  margin-bottom: 1.5rem;
}

.content-reveal.content-reveal--intro:not(.is-visible),
.speech-bubble.content-reveal.content-reveal--intro:not(.is-visible) {
  transform: translateY(2.75rem);
}

.content-reveal.is-visible,
.speech-bubble.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.speech-bubble.content-reveal {
  margin-bottom: 1.5rem;
}

/* Shared chat bubble tail — bottom-right corner (scroll cue + CTA headings) */
.chat-scroll-cue__bubble,
.content-stack__section--cta-heading {
  border-radius: 1.25rem 1.25rem 0 1.25rem;
}

.content-stack__section--cta-heading {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 992px) {
  .chat-scroll-cue__bubble {
    border-radius: var(--bubble-radius) var(--bubble-radius) 0 var(--bubble-radius);
    -webkit-mask-image: url("../svg/bubble-corner.svg");
    mask-image: url("../svg/bubble-corner.svg");
    -webkit-mask-size: 100% auto;
    mask-size: 100% auto;
    -webkit-mask-position: bottom right;
    mask-position: bottom right;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
  }

  .content-stack__section--cta-heading {
    border-radius: var(--bubble-radius) var(--bubble-radius) 0 var(--bubble-radius);
    -webkit-mask-image: url("../svg/bubble-corner.svg");
    mask-image: url("../svg/bubble-corner.svg");
    -webkit-mask-size: 100% auto;
    mask-size: 100% auto;
    -webkit-mask-position: bottom right;
    mask-position: bottom right;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-origin: border-box;
    mask-origin: border-box;
    -webkit-mask-clip: border-box;
    mask-clip: border-box;
  }
}

.chat-scroll-cue {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  padding-right: clamp(1.75rem, 4.5vw, 3.5rem);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.chat-scroll-cue.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.chat-scroll-cue.is-visible .chat-scroll-cue__bubble {
  animation: chatScrollBubbleHover 2.4s ease-in-out infinite;
}

.chat-scroll-cue__bubble {
  display: inline-block;
  background: var(--color-primary);
  padding: 0.75rem 1rem;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.chat-scroll-cue__bubble:hover .chat-scroll-cue__label {
  opacity: 0.88;
}

.chat-scroll-cue__bubble:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.chat-scroll-cue__content {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
}

@media (min-width: 992px) {
  .chat-scroll-cue__bubble {
    padding: 0.85rem 1.1rem;
  }
}

.chat-scroll-cue__label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  color: var(--color-black);
  opacity: 0.72;
  animation: chatScrollLabel 2.4s ease-in-out infinite;
}

.chat-scroll-cue__icon {
  flex-shrink: 0;
  color: var(--color-accent);
  font-size: 1.125rem;
  line-height: 1;
  animation: chatScrollArrowBounce 2.4s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

@keyframes chatScrollBubbleHover {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(0.35rem);
  }
}

@keyframes chatScrollLabel {
  0%,
  100% {
    opacity: 0.52;
  }

  50% {
    opacity: 0.88;
  }
}

@keyframes chatScrollArrowBounce {
  0%,
  100% {
    transform: translateY(-0.12rem);
    opacity: 0.75;
  }

  50% {
    transform: translateY(0.22rem);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-scroll-cue.is-visible .chat-scroll-cue__bubble,
  .chat-scroll-cue__label,
  .chat-scroll-cue__icon {
    animation: none;
  }

  .chat-scroll-cue__label {
    opacity: 0.75;
  }

  .chat-scroll-cue__icon {
    opacity: 0.9;
  }
}

/* White flat cards — standalone cards (services grid, etc.) */
.content-card {
  background: var(--color-primary);
  padding: clamp(1rem, 2vw, 2vw);
  border-radius: 1rem;
}

.content-reveal.content-card {
  margin-bottom: 1.5rem;
}

/* Connected white stack — gap-separated panels on yellow background */
.content-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: transparent;
  overflow: visible;
  border-radius: 0;
  margin-bottom: 1.5rem;
}

.content-panel,
.content-stack__section {
  background: var(--color-primary);
  border-radius: var(--stack-radius);
  padding: clamp(1rem, 2vw, 2vw);
}

.content-panel {
  margin-bottom: 1.5rem;
}

.content-panel.content-reveal,
.content-stack.content-reveal,
.content-stack__section.content-reveal {
  margin-bottom: 1.5rem;
}

.content-stack__section.content-reveal {
  margin-bottom: 0;
}

.content-stack__section {
  margin-bottom: 0;
}

.content-stack__cell {
  height: 100%;
}

.content-stack__cell h3,
.content-stack__cell h4 {
  margin-bottom: 0;
  color: var(--color-accent);
}

.content-stack__cell h3:has(+ p),
.content-stack__cell h4:has(+ p) {
  margin-bottom: 0.75rem;
}

.content-stack__cell p {
  margin: 0;
  color: var(--color-body-text);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.6;
}

.content-stack .skill-card,
.content-stack .project-card {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  height: auto;
}

.content-stack .project-card {
  border: 2px solid var(--color-border);
  border-radius: 1rem;
  overflow: hidden;
  background: var(--color-primary);
}

.content-stack .skill-card.content-reveal,
.content-stack .project-card.content-reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

.content-stack .project-card:hover {
  transform: none;
  box-shadow: none;
}

.content-stack .page-intro {
  margin-bottom: 1.5rem;
}

.content-card .project-content-label {
  margin-top: 0;
}

.content-card .project-content-text,
.content-stack .project-content-text {
  margin-bottom: 0;
}

/* JR bot — fixed bottom-right; height fits content (not full viewport) */
#jr-bot {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  z-index: var(--jr-bot-z);
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  width: auto;
  height: auto;
  transform: translateZ(0);
}

.jr-bot {
  flex-shrink: 0;
  line-height: 0;
  width: clamp(160px, 70vw, 280px);
}

#jr-bot .jr-bot {
  transition: transform 0.5s ease;
}

#jr-bot.jr-bot--offstage .jr-bot {
  transform: translateY(calc(100% + 2rem));
}

@media (prefers-reduced-motion: reduce) {
  #jr-bot .jr-bot {
    transition: none;
  }
}

.jr-bot--video {
  position: relative;
}

.jr-bot__media {
  position: relative;
  width: 100%;
  line-height: 0;
  isolation: isolate;
  background: var(--surface-media);
  filter: brightness(115%) contrast(90%);
  -webkit-mask-image: url("../svg/jrmask.svg");
  mask-image: url("../svg/jrmask.svg");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center center;
  mask-position: center center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.jr-bot--video .jr-bot__fallback,
.jr-bot--video .jr-bot__video {
  width: 100%;
  height: auto;
  display: block;
}

.jr-bot__plate {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--surface-media);
}

.jr-bot--video .jr-bot__fallback {
  position: relative;
  z-index: 1;
  opacity: 1;
}

.jr-bot--video .jr-bot__video {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.65s ease;
  pointer-events: none;
}

.jr-bot--video.jr-bot--playing .jr-bot__video {
  opacity: 1;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .jr-bot--video .jr-bot__video {
    transition: none !important;
  }
}

@media (min-width: 768px) {
  .jr-bot {
    width: clamp(200px, 35vw, 300px);
  }
}

@media (min-width: 992px) {
  .jr-bot {
    width: clamp(220px, 25vw, 400px);
  }
}

.jr-bot--uh-oh img {
  filter: none;
  -webkit-mask-image: none;
  mask-image: none;
}

.jr-bot img,
.jr-bot video {
  width: 100%;
  height: auto;
  display: block;
  filter: brightness(115%) contrast(90%);
  -webkit-mask-image: url("../svg/jrmask.svg");
  mask-image: url("../svg/jrmask.svg");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center center;
  mask-position: center center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.jr-bot--video .jr-bot__fallback,
.jr-bot--video .jr-bot__video {
  filter: none;
  -webkit-mask-image: none;
  mask-image: none;
}

.jr-bot--intro img,
.jr-bot--intro .jr-bot__media,
.jr-bot--intro video {
  animation: bounceInUp 0.8s ease-out;
}

.hero-section {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: auto;
  display: flex;
  align-items: flex-start;
  padding: clamp(1.5rem, 4vw, 2rem) 0 var(--jr-clearance);
}

@media (min-width: 992px) {
  .hero-section {
    min-height: calc(90vh - var(--header-height));
    align-items: center;
  }
}

@keyframes bounceInUp {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-section {
  position: relative;
  z-index: 2;
  padding: clamp(2rem, 5vw, 3rem) 0 clamp(1.5rem, 3vw, 2rem);
}

#work-heading:has(.fa-icon),
#work-heading:has(.work-category-icon-cycle) {
  display: flex;
  align-items: flex-start;
}

#work-heading .fa-icon,
#work-heading .work-category-icon-cycle {
  flex-shrink: 0;
  margin-top: 0.15em;
  margin-right: 0.45em;
  color: var(--color-accent);
}

.work-category-icon-cycle {
  position: relative;
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  vertical-align: top;
}

.work-category-icon-cycle__item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: work-category-icon-cycle calc(var(--cycle-count) * 1.6s) ease-in-out infinite;
  animation-delay: calc(var(--cycle-index) * 1.6s);
}

@keyframes work-category-icon-cycle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.88);
  }

  6%,
  18% {
    opacity: 1;
    transform: scale(1);
  }

  24%,
  100% {
    opacity: 0;
    transform: scale(0.88);
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-category-icon-cycle__item {
    animation: none;
    opacity: 0;
    transform: none;
  }

  .work-category-icon-cycle__item:first-child {
    opacity: 1;
  }
}

.content-panel .page-intro,
.content-stack__section .page-intro {
  margin-bottom: 0;
}

.content-stack__section .page-intro:not(:last-child) {
  margin-bottom: 1.5rem;
}

.content-stack__section .project-grid {
  margin-top: 1.5rem;
}

.page-intro {
  max-width: 48rem;
  margin-bottom: 2.5rem;
  font-size: clamp(1rem, 1.8vw, 1.125rem);
}

.service-card {
  background: var(--color-primary);
  border-radius: 2rem 2rem 2rem 0;
  padding: 2rem;
  height: 100%;
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.2s, opacity 0.55s ease;
}

.service-card.content-reveal {
  margin-bottom: 0;
}

.service-card:hover {
  border-color: var(--color-subtle);
  transform: translateY(-2px);
}

.service-card h3 {
  margin-bottom: 0.75rem;
  color: var(--color-accent);
}

.skill-card {
  background: var(--color-primary);
  border-radius: 1.5rem 1.5rem 1.5rem 0;
  padding: 1.5rem;
  height: 100%;
}

.skill-card.content-reveal {
  margin-bottom: 0;
}

.skill-card h4 {
  color: var(--color-accent);
  margin-bottom: 0;
}

.skill-card h4:has(+ p) {
  margin-bottom: 0.5rem;
}

.skill-card p {
  margin: 0;
  font-size: 1rem;
  font-weight: 300;
  color: var(--color-body-text);
}

.hero-content {
  width: 100%;
  max-width: 100%;
}

.project-grid,
#services-grid,
#skills-grid {
  width: 100%;
  max-width: 100%;
}

.project-card {
  background: var(--color-primary);
  border-radius: 1rem;
  overflow: hidden;
  border: 2px solid var(--color-border);
  transition: transform 0.2s, box-shadow 0.2s;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.project-card-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-media);
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.project-card:hover .project-card-image img {
  transform: scale(1.03);
}

.project-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.project-card-title a {
  color: inherit;
  text-decoration: none;
}

.project-card-title a:hover {
  color: var(--color-accent);
}

.project-card-excerpt {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--color-body-text);
  margin-bottom: 0.75rem;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
  background: var(--color-bg);
  color: var(--color-accent);
  padding: 0.2rem 0.6rem;
  border-radius: 1rem;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.project-tag:hover,
.project-tag:focus {
  background: var(--color-accent);
  color: var(--color-primary);
}

.content-stack__section .btn-stack {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 767px) {
  .content-stack__section .btn-stack {
    flex-direction: column;
    align-items: stretch;
  }

  .content-stack__section .btn-junior-sm {
    width: 100%;
    max-width: none;
    text-align: center;
  }
}

.cta-section {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  background: transparent;
}

.cta-block.content-reveal {
  width: 100%;
  margin-bottom: 10vh;
  margin-top: 0;
}

.cta-section .page-intro {
  margin-bottom: 0;
}

.content-stack__section--cta-heading {
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
  padding: clamp(1rem, 2vw, 2vw);
  padding-right: clamp(1.5rem, 4vw, 3rem);
  padding-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
}

.content-stack__section--cta-heading h2,
.content-stack__section--cta-heading h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.25;
  color: var(--color-text);
}

.content-stack__section--cta-heading .cta-project-nudge {
  margin-top: clamp(0.85rem, 2.2vw, 1.15rem);
}

.cta-project-nudge a.cta-project-link {
  --bs-link-color: var(--color-accent);
  --bs-link-hover-color: var(--color-black);
  --bs-link-color-rgb: 118, 74, 8;
  --bs-link-hover-color-rgb: 0, 0, 0;
  color: var(--color-accent);
  font-weight: 500;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
  transition:
    color 0.15s ease-in-out,
    text-decoration-color 0.2s ease-in-out,
    text-underline-offset 0.2s ease-in-out;
}

.cta-project-nudge a.cta-project-link:hover,
.cta-project-nudge a.cta-project-link:focus-visible {
  color: var(--color-black);
  text-underline-offset: 0.3em;
}

.chat-stream > .cta-block.content-reveal:last-child {
  margin-bottom: 10vh;
}

.cta-section .btn-stack {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 767px) {
  .cta-section .btn-stack {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-section .btn-junior-sm {
    width: 100%;
    max-width: none;
    text-align: center;
  }
}

/* Project detail page */
.project-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}

.project-breadcrumb {
  font-size: 0.95rem;
  color: var(--color-secondary);
  margin-bottom: 0;
}

.project-breadcrumb a {
  color: var(--color-accent);
}

.project-intro-body {
  margin-top: 1.25rem;
}

.project-intro-body > :first-child {
  margin-top: 0;
}

.project-detail > :last-child {
  margin-bottom: 0;
}

.project-content {
  max-width: none;
}

.project-content .content-stack:last-child {
  margin-bottom: 0;
}

.project-content:has(+ #project-cta) .content-stack:last-child {
  margin-bottom: 1.5rem;
}

#project-cta .cta-block.content-reveal {
  margin-bottom: 10vh;
}

#project-cta .cta-section {
  margin-top: 0;
  margin-bottom: 0;
}

.project-intro-body .project-content-heading,
.project-content .project-content-heading {
  margin-top: 0;
  margin-bottom: 0;
  color: var(--color-text);
}

.project-intro-body .project-content-heading:has(+ :is(p, .project-content-text)),
.project-content .project-content-heading:has(+ :is(p, .project-content-text)) {
  margin-bottom: 0.75rem;
}

.project-intro-body .project-content-subheading,
.project-content .project-content-subheading {
  margin-top: 0;
  margin-bottom: 0;
  color: var(--color-accent);
}

.project-intro-body .project-content-subheading:has(+ :is(p, .project-content-text)),
.project-content .project-content-subheading:has(+ :is(p, .project-content-text)) {
  margin-bottom: 0.75rem;
}

.project-intro-body .project-content-label,
.project-content .project-content-label {
  margin-top: 0;
  margin-bottom: 0;
  color: var(--color-accent);
  font-size: 1.125rem;
}

.project-intro-body .project-content-label:has(+ :is(p, .project-content-text)),
.project-content .project-content-label:has(+ :is(p, .project-content-text)) {
  margin-bottom: 0.5rem;
}

.project-content .project-content-text {
  margin-bottom: 0;
  color: var(--color-body-text);
  font-weight: 300;
  line-height: 1.7;
}

.project-content-links .project-content-link {
  color: inherit;
  text-decoration-color: var(--color-accent);
}

.project-content-links .project-content-link:hover,
.project-content-links .project-content-link:focus-visible {
  color: var(--color-accent);
}

.project-content-links__sep {
  opacity: 0.45;
}

.project-gallery-item {
  background: var(--color-primary);
  border-radius: 0.75rem;
  overflow: hidden;
  line-height: 0;
}

.project-gallery-item img {
  width: 100%;
  height: auto;
}

.project-media-viewer {
  position: relative;
  margin: 0;
  padding: 0.5rem;
  border: 2px solid var(--color-border);
  border-radius: 0.75rem;
  background: var(--color-primary);
}

.project-media-tag {
  position: absolute;
  top: 0;
  left: 1rem;
  z-index: 3;
  transform: translateY(-50%);
  padding: 0.2rem 0.75rem;
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.35;
  color: var(--color-text);
  background: var(--color-bg);
  border: 2px solid var(--color-primary);
  border-radius: 999px;
  white-space: nowrap;
}

.content-stack__section--gallery,
.content-stack__section--diagram,
.content-stack__section--video,
.content-stack__section--iframe {
  --viewer-gutter: clamp(1rem, 2vw, 2vw);
  padding: var(--viewer-gutter);
}

.project-media-viewer .project-carousel,
.project-media-viewer .project-diagram,
.project-media-viewer .project-video,
.project-media-viewer .project-iframe-tabs {
  border-radius: 0.5rem;
}

.project-media-viewer .project-carousel {
  border: none;
  background: transparent;
  width: 100%;
}

.project-media-viewer--webpage .project-carousel,
.project-media-viewer--webpage .carousel-inner,
.project-media-viewer--webpage .carousel-item,
.project-media-viewer--webpage .project-carousel-slide {
  width: 100%;
}

.project-media-viewer .project-video {
  width: 100%;
  margin: 0;
}

.project-carousel {
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--color-primary);
}

.project-carousel .carousel-inner {
  border-radius: 0.75rem;
}

.project-carousel-slide {
  margin: 0;
}

.project-carousel-media {
  line-height: 0;
  text-align: center;
  background: var(--surface-media);
}

.project-carousel-media--webpage,
.project-media-viewer--webpage .project-carousel-media {
  width: 100%;
  text-align: initial;
}

.project-carousel-media img {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  display: inline-block;
}

.project-webpage-viewport {
  width: 100%;
  aspect-ratio: var(--webpage-viewer-aspect);
  overflow: hidden;
  position: relative;
}

.project-webpage-viewport img {
  width: 100%;
  height: auto;
  display: block;
  max-height: none;
  object-fit: initial;
  transform: translateY(0);
  will-change: transform;
}

.project-webpage-viewport.is-scrolling img {
  animation: webpage-pan var(--scroll-duration, 18s) ease-in-out infinite alternate;
}

.project-webpage-viewport.is-scrolling:hover img {
  animation-play-state: paused;
}

.carousel-item:not(.active) .project-webpage-viewport.is-scrolling img {
  animation-play-state: paused;
}

@keyframes webpage-pan {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(var(--scroll-distance, -50%));
  }
}

.project-carousel .carousel-control-prev,
.project-carousel .carousel-control-next {
  width: 14%;
  opacity: 0.85;
}

.project-carousel .carousel-control-prev-icon,
.project-carousel .carousel-control-next-icon {
  width: 2.5rem;
  height: 2.5rem;
  filter: invert(1) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45));
}

.project-carousel .carousel-indicators {
  margin-bottom: 0.5rem;
}

.project-carousel .carousel-indicators [data-bs-target] {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background-color: var(--color-text);
  opacity: 0.35;
}

.project-carousel .carousel-indicators .active {
  opacity: 1;
}

.project-diagram {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  line-height: 0;
}

.project-diagram svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

.project-video {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  border-radius: 0.75rem;
}

.project-iframe-tabs {
  width: 100%;
  overflow: hidden;
  background: var(--color-primary);
}

.project-iframe-tabs__nav {
  gap: 0.35rem;
  padding: 0.35rem;
  border-bottom: 2px solid var(--color-text);
  flex-wrap: nowrap;
  overflow-x: auto;
}

.project-iframe-tabs__nav .nav-link {
  border: 2px solid transparent;
  border-radius: 999px;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.project-iframe-tabs__nav .nav-link.active {
  color: var(--color-text);
  background: var(--color-bg);
  border-color: var(--color-text);
}

.project-iframe-tabs__content {
  background: var(--color-primary);
}

.project-iframe {
  display: block;
  width: 100%;
  height: var(--iframe-height, 1200px);
  min-height: 480px;
  border: 0;
  background: var(--color-primary);
}

@media (max-width: 767px) {
  .project-iframe {
    height: min(var(--iframe-height, 1200px), 85vh);
  }
}

@media (max-width: 991px) {
  .content-panel,
  .content-stack__section {
    border-radius: 1.25rem;
  }
}

@media (max-width: 767px) {
  .content-panel,
  .content-stack__section {
    border-radius: 1rem;
  }

  .project-detail-meta {
    align-items: flex-start;
  }
}

@media (min-width: 768px) {
  .project-content {
    max-width: none;
  }

}

.site-footer {
  position: relative;
  z-index: 2;
  padding: 1.25rem 0;
  text-align: center;
  color: var(--color-secondary);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.error-page .speech-bubble {
  max-width: 36rem;
  margin: 0 auto 2rem;
}

.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

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

.load-more-wrap {
  text-align: center;
  margin-top: 1.5rem;
  margin-bottom: 0;
}

.load-more-wrap .btn-junior {
  border-radius: 999px;
}

.has-guest .guest-mark {
  color: inherit;
  font-weight: inherit;
}

.guest-intro-lead .guest-mark {
  font-weight: inherit;
}

@media (max-width: 767px) {
  :root {
    --bubble-radius: 1.25rem;
    --stack-radius: 1rem;
  }

  .service-card,
  .skill-card {
    padding: 1.25rem;
  }

  h1, .h1 {
    font-size: clamp(1.75rem, 7vw, 2.25rem);
  }
}

/* Bootstrap 5 dark mode — system preference via data-bs-theme on html */
[data-bs-theme="dark"] {
  color-scheme: dark;

  --bs-body-bg: #100e0a;
  --bs-body-color: rgba(255, 255, 255, 0.86);
  --bs-emphasis-color: #fff;
  --bs-secondary-color: rgba(255, 255, 255, 0.64);
  --bs-tertiary-color: rgba(255, 255, 255, 0.48);
  --bs-border-color: rgba(255, 255, 255, 0.14);
  --bs-link-color: #f0c14d;
  --bs-link-hover-color: #f7d774;

  --color-bg: #100e0a;
  --color-primary: #1a1814;
  --color-text: #f2efe8;
  --color-body-text: rgba(255, 255, 255, 0.82);
  --color-black: #f5f3ef;
  --color-accent: #f0c14d;
  --color-secondary: #b8a888;
  --color-subtle: #8a6420;
  --color-border: rgba(255, 255, 255, 0.14);
  --surface-media: #ffffff;
  --surface-media-deep: #060606;
  --nav-toggler-bg: color-mix(in srgb, #f7c44f 34%, #1a1814);
  --nav-toggler-bg-hover: color-mix(in srgb, #f7c44f 46%, #1a1814);
  --nav-toggler-border: rgba(247, 196, 79, 0.78);
}

[data-bs-theme="dark"] .site-header {
  border-bottom-color: rgba(240, 193, 77, 0.28);
}

[data-bs-theme="dark"] .navbar-toggler {
  border-color: var(--nav-toggler-border);
  background: var(--nav-toggler-bg);
  box-shadow: inset 0 0 0 1px rgba(247, 196, 79, 0.12);
}

[data-bs-theme="dark"] .navbar-toggler:hover,
[data-bs-theme="dark"] .navbar-toggler:focus-visible {
  background: var(--nav-toggler-bg-hover);
  border-color: var(--color-accent);
}

[data-bs-theme="dark"] .navbar-toggler:focus {
  box-shadow:
    inset 0 0 0 1px rgba(247, 196, 79, 0.18),
    0 0 0 0.2rem rgba(240, 193, 77, 0.35);
}

[data-bs-theme="dark"] .navbar-toggler-icon {
  filter: brightness(0) saturate(100%);
  opacity: 0.88;
}

[data-bs-theme="dark"] .theme-toggle__track {
  border-color: rgba(240, 193, 77, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

[data-bs-theme="dark"] .theme-toggle__thumb {
  background: color-mix(in srgb, #f7c44f 38%, #1a1814);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

[data-bs-theme="dark"] .theme-toggle__option {
  color: rgba(255, 255, 255, 0.72);
}

[data-bs-theme="dark"] .theme-toggle.is-light .theme-toggle__option--light,
[data-bs-theme="dark"] .theme-toggle.is-dark .theme-toggle__option--dark {
  color: var(--color-accent);
}

[data-bs-theme="dark"] .theme-toggle:focus-visible .theme-toggle__track {
  box-shadow: 0 0 0 0.2rem rgba(240, 193, 77, 0.28);
}

[data-bs-theme="dark"] .jr-bot__media {
  filter: none;
}

[data-bs-theme="dark"] .project-gallery-item,
[data-bs-theme="dark"] .project-carousel {
  background: var(--surface-media);
}

[data-bs-theme="dark"] .project-media-tag {
  background: var(--color-primary);
  border-color: var(--color-border);
  color: var(--color-text);
}

[data-bs-theme="dark"] .surface-media-deep,
[data-bs-theme="dark"] .project-carousel-media.surface-media-deep {
  background: var(--surface-media-deep);
}

[data-bs-theme="dark"] .cta-project-nudge a.cta-project-link {
  --bs-link-hover-color-rgb: 247, 215, 116;
}

[data-bs-theme="dark"] .cta-project-nudge a.cta-project-link:hover,
[data-bs-theme="dark"] .cta-project-nudge a.cta-project-link:focus-visible {
  color: var(--bs-link-hover-color);
}
