:root {
  color-scheme: dark;
  --bg: #030706;
  --bg-2: #06100c;
  --surface: rgba(8, 18, 14, 0.72);
  --surface-2: rgba(13, 28, 21, 0.76);
  --surface-3: rgba(18, 38, 29, 0.52);
  --text: #f2fff8;
  --muted: rgba(242, 255, 248, 0.66);
  --soft: rgba(242, 255, 248, 0.42);
  --line: rgba(139, 255, 191, 0.12);
  --line-strong: rgba(139, 255, 191, 0.22);
  --green: #2cff91;
  --green-2: #9dffc8;
  --green-deep: #0b8f55;
  --cyan: #56f7d2;
  --panel-glow: rgba(44, 255, 145, 0.16);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --shadow-soft: 0 24px 90px rgba(0, 0, 0, 0.38);
  --shadow-glow: 0 0 80px rgba(44, 255, 145, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

#root {
  position: relative;
  min-height: 100svh;
  isolation: isolate;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 72% 8%, rgba(44, 255, 145, 0.12), transparent 26rem),
    radial-gradient(circle at 16% 34%, rgba(86, 247, 210, 0.07), transparent 28rem),
    linear-gradient(180deg, #030706 0%, #06100c 46%, #030706 100%);
  color: var(--text);
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(139, 255, 191, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 255, 191, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), transparent 78%);
}

body::after {
  content: "";
  position: fixed;
  inset: auto 7vw 7vh auto;
  z-index: 0;
  width: 34vw;
  height: 34vw;
  min-width: 320px;
  min-height: 320px;
  border-radius: 999px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(44, 255, 145, 0.12), transparent 62%);
  filter: blur(18px);
}

main,
.site-header,
.lightbox,
.jonny-widget,
.skip-link {
  position: relative;
  z-index: 2;
}

.cyber-matrix-background {
  --columns: 1;
  --rows: 1;
  position: fixed;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  grid-template-rows: repeat(var(--rows), minmax(0, 1fr));
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 72% 42%, rgba(44, 255, 145, 0.18), transparent 34rem),
    radial-gradient(circle at 18% 70%, rgba(86, 247, 210, 0.1), transparent 30rem),
    rgba(0, 0, 0, 0.12);
  opacity: 0.72;
}

.cyber-matrix-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 7, 6, 0.08), rgba(3, 7, 6, 0.5));
  pointer-events: none;
}

.cyber-matrix-tile {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  color: rgb(44, 255, 145);
  font-family: "Courier New", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(0.74rem, 1.05vw, 1.16rem);
  font-weight: 700;
  opacity: calc(0.055 + var(--cyber-intensity) * 0.46);
  text-shadow: 0 0 calc(var(--cyber-intensity) * 16px) rgba(44, 255, 145, 0.92);
  transform: scale(calc(0.9 + var(--cyber-intensity) * 0.25));
  transition: opacity 160ms ease, text-shadow 160ms ease, transform 160ms ease;
  user-select: none;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  transform: translateY(-150%);
  background: var(--green);
  color: #00160a;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.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;
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(16px, 2.4vw, 40px);
  width: min(1532px, calc(100% - 48px));
  min-height: 72px;
  margin: 18px auto 0;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(8, 18, 14, 0.62);
  backdrop-filter: blur(18px);
}

.site-header.is-scrolled {
  border-color: rgba(139, 255, 191, 0.26);
  background: rgba(3, 7, 6, 0.86);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.brand,
.nav-links,
.hero-actions,
.signal-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  box-shadow: none;
  filter: drop-shadow(0 0 10px rgba(44, 255, 145, 0.45));
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}

.nav-links {
  justify-content: center;
  gap: clamp(8px, 1.6vw, 22px);
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a,
.header-cta {
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.nav-links a:hover {
  color: var(--green-2);
}

.header-cta {
  justify-self: end;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--green-2);
  font-size: 0.92rem;
  font-weight: 800;
  background: rgba(44, 255, 145, 0.04);
}

.header-cta:hover {
  transform: translateY(-1px);
  border-color: rgba(44, 255, 145, 0.45);
  background: rgba(44, 255, 145, 0.1);
}

.section-shell {
  width: min(1420px, calc(100% - 64px));
  margin-inline: auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(420px, 0.74fr);
  gap: clamp(36px, 5.2vw, 84px);
  align-items: center;
  min-height: calc(100svh - 138px);
  padding: clamp(48px, 6.4vw, 92px) 0 clamp(24px, 4vw, 48px);
}

.hero-copy {
  position: relative;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: -3rem auto auto -4rem;
  width: 17rem;
  height: 17rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(44, 255, 145, 0.12), transparent 62%);
  filter: blur(12px);
  pointer-events: none;
}

.eyebrow,
.project-number,
.panel-kicker {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.04;
}

h1 {
  max-width: 720px;
  font-size: clamp(3.05rem, 4.08vw, 4.42rem);
  line-height: 0.96;
  font-weight: 900;
}

h2 {
  font-size: clamp(2.16rem, 4.35vw, 4.8rem);
}

h3 {
  font-size: clamp(1.08rem, 1.7vw, 1.35rem);
}

.text-accent,
.tech-stack strong {
  color: var(--green);
  text-shadow: 0 0 32px rgba(44, 255, 145, 0.2);
}

.hero-text,
.project-lead,
.contact-card > p,
.contact-content > p {
  max-width: 820px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.45vw, 1.2rem);
}

.hero-text {
  max-width: 690px;
  margin: 14px 0 0;
  font-size: clamp(0.88rem, 0.98vw, 0.98rem);
  line-height: 1.42;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.96rem;
  font-weight: 850;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  border-color: rgba(44, 255, 145, 0.78);
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: #00170b;
  box-shadow: 0 18px 48px rgba(44, 255, 145, 0.18);
}

.button.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.button.secondary:hover {
  border-color: rgba(44, 255, 145, 0.48);
  background: rgba(44, 255, 145, 0.08);
}

.signal-row {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.hero .signal-row {
  display: none;
}

.signal-row span,
.api-grid span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--green-2);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.9rem;
}

.hero-visual {
  display: grid;
  gap: 18px;
  position: relative;
  align-self: start;
  margin-top: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 38%, rgba(44, 255, 145, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.016)),
    rgba(8, 18, 14, 0.66);
  box-shadow: 0 0 0 1px rgba(44, 255, 145, 0.05), 0 30px 110px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: -2rem 1rem auto auto;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 999px;
  border: 1px solid rgba(44, 255, 145, 0.18);
  background: radial-gradient(circle, rgba(44, 255, 145, 0.14), transparent 62%);
  filter: blur(1px);
  pointer-events: none;
}

.profile-panel,
.terminal-panel,
.principle,
.capability,
.contact-card,
.project-card,
.proof-grid div,
.media-main,
.media-thumb,
.project-visual-placeholder,
.crm-redacted,
.api-section,
.api-grid {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.profile-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.94fr) minmax(250px, 0.78fr);
  gap: 30px;
  align-items: center;
  padding: 0;
  position: relative;
  isolation: isolate;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.profile-photo {
  width: 100%;
  height: min(46svh, 430px);
  min-height: 360px;
  object-fit: cover;
  object-position: center top;
  border-radius: 22px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 1px rgba(44, 255, 145, 0.06), 0 0 70px rgba(44, 255, 145, 0.2);
}

.profile-panel h2 {
  margin-bottom: 8px;
  font-size: clamp(2.35rem, 3.05vw, 3.15rem);
}

.profile-panel p {
  margin: 0;
  color: var(--muted);
}

.hero-visual .hero-text,
.hero-visual .hero-actions,
.hero-visual .signal-row {
  display: none;
}

.hero-capability-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
  margin-left: 0;
  padding: 0;
  background: transparent;
}

.hero-capability {
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(circle at 20% 12%, rgba(44, 255, 145, 0.13), transparent 58%),
    rgba(8, 18, 14, 0.58);
}

.hero-capability strong,
.hero-capability span,
.hero-capability small {
  display: block;
}

.hero-capability strong {
  color: var(--green);
  font-size: 1.1rem;
}

.hero-capability span {
  margin-top: 12px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.hero-capability small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.terminal-panel.hero-capability-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
  margin-left: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.terminal-panel {
  margin-left: 0;
  margin-top: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.terminal-top {
  display: none;
  gap: 7px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.24);
}

.terminal-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0.8;
}

.tech-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
}

.tech-stack p {
  margin: 0;
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  color: #cdf8dc;
  background: rgba(255, 255, 255, 0.028);
  font-size: clamp(0.86rem, 1.2vw, 0.96rem);
  overflow-wrap: normal;
  word-break: normal;
}

.tech-stack strong {
  display: block;
  margin-bottom: 4px;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 0.72fr));
  gap: 16px;
  padding: 54px 0 30px;
}

.section-heading h2 {
  max-width: 900px;
}

.section-intro {
  max-width: 780px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.16rem);
}

.principle,
.capability {
  padding: 24px;
}

.principle strong,
.capability span {
  display: block;
  margin-bottom: 10px;
  color: var(--green);
}

.principle p,
.capability p,
.detail-block p,
.check-list {
  color: var(--muted);
}

.projects-index {
  padding: 90px 0 36px;
  scroll-margin-top: 128px;
  padding-inline: clamp(18px, 2.4vw, 32px);
}

.index-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.index-list a {
  min-height: 178px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  color: var(--text);
  background:
    radial-gradient(circle at 70% 10%, rgba(44, 255, 145, 0.13), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)),
    rgba(8, 18, 14, 0.72);
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.index-list a:hover {
  transform: translateY(-5px);
  border-color: rgba(44, 255, 145, 0.48);
  background:
    radial-gradient(circle at 70% 10%, rgba(44, 255, 145, 0.2), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.072), rgba(255, 255, 255, 0.024)),
    rgba(8, 18, 14, 0.82);
}

.index-list span {
  color: var(--green);
  font-weight: 900;
}

.index-list strong {
  display: block;
  margin-top: auto;
  font-size: 1.2rem;
}

.index-list small {
  color: var(--muted);
}

.project-section {
  padding: clamp(72px, 9vw, 126px) 0;
  border-top: 1px solid var(--line);
}

.feature-project {
  background: linear-gradient(180deg, transparent, rgba(44, 255, 145, 0.035), transparent);
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.86fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: start;
}

.project-layout.reverse {
  grid-template-columns: minmax(360px, 0.86fr) minmax(0, 0.95fr);
}

.project-copy {
  display: grid;
  gap: 24px;
}

.project-copy h2 {
  max-width: 900px;
}

.audio-compare {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 18px;
  overflow: hidden;
  border: 1px solid rgba(139, 255, 191, 0.22);
  border-radius: 8px;
  padding: clamp(18px, 2.5vw, 26px);
  background:
    linear-gradient(120deg, rgba(44, 255, 145, 0.08), transparent 42%),
    rgba(3, 10, 7, 0.9);
  box-shadow: 0 24px 54px -42px rgba(44, 255, 145, 0.7);
}

.audio-compare::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), rgba(44, 255, 145, 0.08));
  transform: scaleX(0.22);
  transform-origin: left;
  transition: transform 360ms ease;
}

.audio-compare.is-playing::after {
  transform: scaleX(1);
}

.audio-compare-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
}

.audio-compare-heading > div:first-child {
  display: grid;
  gap: 6px;
}

.audio-compare-kicker {
  margin: 0;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.audio-compare-heading h3 {
  margin: 0;
  font-size: clamp(1.3rem, 2.2vw, 1.85rem);
}

.audio-compare-heading p:not(.audio-compare-kicker) {
  max-width: 52ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.audio-version-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(118px, 1fr));
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.32);
}

.audio-version-switch button {
  display: grid;
  gap: 2px;
  min-height: 50px;
  border: 0;
  border-radius: 5px;
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.audio-version-switch button span {
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.audio-version-switch button small {
  font-size: 0.7rem;
}

.audio-version-switch button.is-active {
  color: #031008;
  background: var(--green);
  box-shadow: 0 8px 22px -14px rgba(44, 255, 145, 0.9);
}

.audio-version-switch button:focus-visible,
.audio-play:focus-visible,
.audio-progress:focus-visible,
.audio-volume input:focus-visible {
  outline: 2px solid #b5ffd4;
  outline-offset: 3px;
}

.audio-transport {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.audio-play {
  position: relative;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border: 1px solid rgba(44, 255, 145, 0.5);
  border-radius: 50%;
  padding: 0;
  background: rgba(44, 255, 145, 0.1);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.audio-play:hover {
  transform: translateY(-2px);
  background: rgba(44, 255, 145, 0.18);
  box-shadow: 0 12px 28px -18px rgba(44, 255, 145, 0.9);
}

.audio-play span {
  position: absolute;
  top: 50%;
  left: 52%;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid var(--green);
  transform: translate(-50%, -50%);
}

.audio-compare.is-playing .audio-play span {
  left: 50%;
  width: 12px;
  height: 16px;
  border: 0;
  background: linear-gradient(90deg, var(--green) 0 4px, transparent 4px 8px, var(--green) 8px 12px);
}

.audio-timeline {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.audio-current-version {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
}

.audio-current-version span {
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.audio-current-version strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audio-progress,
.audio-volume input {
  width: 100%;
  min-width: 0;
  height: 18px;
  margin: 0;
  accent-color: var(--green);
  cursor: pointer;
}

.audio-time {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
}

.audio-volume {
  display: grid;
  width: 94px;
  gap: 4px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
}

.audio-compare-note {
  margin: -6px 0 0;
  color: rgba(235, 255, 244, 0.52);
  font-size: 0.72rem;
}

.audio-compare audio {
  display: none;
}

.audio-compare.has-audio-error .audio-compare-note {
  color: #ff9e9e;
}

.detail-block {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.proof-grid div {
  padding: 16px;
  box-shadow: none;
}

.proof-grid span {
  display: block;
  margin-bottom: 7px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.proof-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}

.check-list li {
  position: relative;
  padding-left: 24px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 18px rgba(44, 255, 145, 0.38);
}

.stack-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stack-groups div {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.stack-groups span {
  display: block;
  margin-bottom: 5px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stack-groups p {
  margin: 0;
  color: var(--muted);
}

.project-media {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 96px;
}

.media-main {
  width: 100%;
  max-height: 540px;
  object-fit: contain;
  background:
    radial-gradient(circle at 80% 8%, rgba(44, 255, 145, 0.1), transparent 36%),
    rgba(0, 0, 0, 0.28);
}

video.media-main {
  aspect-ratio: 16 / 10;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.media-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-thumb {
  padding: 0;
  cursor: zoom-in;
  overflow: hidden;
}

.media-thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 220ms ease, filter 220ms ease;
}

.media-thumb:hover img {
  transform: scale(1.04);
  filter: saturate(1.1);
}

.project-visual-placeholder {
  min-height: 460px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  background:
    radial-gradient(circle at 50% 32%, rgba(44, 255, 145, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    #030504;
}

.project-visual-placeholder span {
  display: grid;
  place-items: center;
  width: clamp(120px, 20vw, 180px);
  height: clamp(120px, 20vw, 180px);
  border: 1px solid rgba(44, 255, 145, 0.46);
  border-radius: var(--radius-lg);
  color: var(--green);
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 950;
}

.project-visual-placeholder p,
.crm-redacted p,
.crm-gallery p {
  margin: 0;
  color: var(--muted);
}

.crm-gallery {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.capabilities {
  padding: 86px 0;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.capability h3 {
  margin-bottom: 10px;
}

.api-section {
  margin-top: 38px;
  padding: clamp(28px, 5vw, 48px);
}

.api-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding: 16px;
  box-shadow: none;
}

.contact-section {
  padding: 24px 0 98px;
}

.contact-card {
  padding: clamp(30px, 6vw, 60px);
  position: relative;
  overflow: hidden;
}

.contact-card::after {
  content: "";
  position: absolute;
  right: clamp(16px, 7vw, 92px);
  top: 50%;
  width: min(360px, 30vw);
  aspect-ratio: 1.25;
  transform: translateY(-50%) rotate(-8deg);
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(44, 255, 145, 0.22) 1px, transparent 1px),
    linear-gradient(rgba(44, 255, 145, 0.16) 1px, transparent 1px),
    radial-gradient(circle at 45% 30%, rgba(44, 255, 145, 0.18), transparent 44%),
    rgba(0, 0, 0, 0.26);
  background-size: 22px 22px, 22px 22px, auto, auto;
  box-shadow: 0 0 80px rgba(44, 255, 145, 0.16);
  opacity: 0.62;
}

.contact-card > * {
  position: relative;
  z-index: 1;
}

.contact-card h2 {
  max-width: 900px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 54px 18px 18px;
  background: rgba(0, 0, 0, 0.88);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-height: calc(100svh - 92px);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

.jonny-widget {
  position: fixed;
  right: clamp(16px, 3vw, 34px);
  bottom: clamp(16px, 3vw, 34px);
  z-index: 180;
  display: grid;
  justify-items: end;
  gap: 14px;
  pointer-events: none;
}

.jonny-panel,
.jonny-fab {
  pointer-events: auto;
}

.jonny-panel {
  width: min(390px, calc(100vw - 32px));
  max-height: min(680px, calc(100svh - 112px));
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr) auto auto;
  overflow: hidden;
  border: 1px solid rgba(157, 255, 200, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(13, 28, 21, 0.94), rgba(3, 7, 6, 0.96)),
    var(--surface-2);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.54),
    0 0 80px rgba(44, 255, 145, 0.12);
  backdrop-filter: blur(22px);
}

.jonny-panel[hidden] {
  display: none;
}

.jonny-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(139, 255, 191, 0.1);
}

.jonny-status {
  display: block;
  margin-bottom: 2px;
  color: var(--green-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.jonny-header h2 {
  margin: 0;
  font-size: 1.32rem;
  line-height: 1;
}

.jonny-close {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(242, 255, 248, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  cursor: pointer;
}

.jonny-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 16px 18px;
  scrollbar-color: rgba(44, 255, 145, 0.34) transparent;
}

.jonny-message {
  width: fit-content;
  max-width: 88%;
  border: 1px solid rgba(242, 255, 248, 0.1);
  border-radius: 18px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.jonny-message p {
  margin: 0;
  white-space: pre-line;
  font-size: 0.92rem;
  line-height: 1.55;
}

.jonny-message-user {
  align-self: flex-end;
  border-color: rgba(44, 255, 145, 0.42);
  background: linear-gradient(135deg, rgba(44, 255, 145, 0.22), rgba(86, 247, 210, 0.13));
}

.jonny-message-bot {
  align-self: flex-start;
}

.jonny-message.is-loading p::after {
  content: "...";
  display: inline-block;
  width: 0.8em;
  animation: jonnyPulse 1s ease-in-out infinite;
}

.jonny-prompts {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 18px 14px;
}

.jonny-prompts button {
  flex: 0 0 auto;
  max-width: 220px;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid rgba(139, 255, 191, 0.14);
  border-radius: 999px;
  background: rgba(44, 255, 145, 0.08);
  color: rgba(242, 255, 248, 0.78);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.jonny-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid rgba(139, 255, 191, 0.1);
  background: rgba(0, 0, 0, 0.18);
}

.jonny-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(242, 255, 248, 0.13);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  outline: none;
}

.jonny-form input:focus {
  border-color: rgba(44, 255, 145, 0.58);
  box-shadow: 0 0 0 4px rgba(44, 255, 145, 0.1);
}

.jonny-form button,
.jonny-fab {
  border: 1px solid rgba(44, 255, 145, 0.68);
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: #00160a;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 16px 42px rgba(44, 255, 145, 0.22);
}

.jonny-form button {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
}

.jonny-form button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.jonny-fab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jonny-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 52px rgba(44, 255, 145, 0.3);
}

.jonny-fab small {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(0, 22, 10, 0.14);
  color: #00160a;
  font-size: 0.68rem;
}

@keyframes jonnyPulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    padding: 8px 14px;
    min-height: 64px;
  }

  .nav-links {
    font-size: 0.86rem;
    gap: 14px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar { display: none; }

  .header-cta {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.84rem;
  }

  .hero,
  .project-layout,
  .project-layout.reverse,
  .intro-grid {
    grid-template-columns: 1fr;
  }

  .project-media {
    position: static;
  }

  .index-list,
  .capability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-card::after {
    opacity: 0.22;
  }
}

@media (min-width: 701px) and (max-width: 1080px) {
  .hero.section-shell {
    gap: 28px;
    min-height: auto;
    padding: 34px 0 10px;
  }

  .hero-copy {
    padding-top: 0;
    padding-left: 0;
  }

  .hero-copy .eyebrow {
    margin-bottom: 18px;
    padding-left: 18px;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
  }

  .hero h1 {
    max-width: 11ch;
    font-size: clamp(2.85rem, 7.1vw, 4.1rem);
    line-height: 1.02;
  }

  .hero-visual {
    min-height: auto;
    margin-top: 0;
    padding: 18px;
  }

  .profile-panel {
    grid-template-columns: minmax(188px, 238px) minmax(0, 1fr);
    gap: 18px;
    align-items: end;
  }

  .profile-panel::before {
    left: 24px;
    top: 22px;
    width: 176px;
    height: 176px;
    border-width: 1px;
    box-shadow: 0 0 22px rgba(95, 255, 207, 0.28);
  }

  .profile-photo {
    height: 356px;
    min-height: 356px;
    border-radius: 18px !important;
  }

  .profile-panel h2 {
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    line-height: 1.04;
  }

  .profile-panel .panel-kicker {
    margin-bottom: 12px;
    font-size: 0.74rem;
    letter-spacing: 0.16em;
  }

  .profile-panel p:not(.panel-kicker) {
    font-size: 1rem;
    line-height: 1.45;
  }

  .terminal-panel.hero-capability-panel {
    margin-top: 16px;
  }

  .hero-capability {
    min-height: 96px;
    padding: 14px;
  }

  .hero-capability span {
    margin-top: 8px;
    font-size: 0.82rem;
  }

  .hero-capability small {
    font-size: 0.72rem;
  }

  .hero-scroll-cue {
    display: none;
  }

  .jonny-widget {
    right: 12px;
    bottom: 12px;
  }

  .jonny-fab {
    transform: scale(0.9);
    transform-origin: bottom right;
  }
}

@media (max-width: 700px) {
  .site-header {
    min-height: 64px;
    padding: 12px 18px;
  }

  .brand {
    font-size: 0.94rem;
  }

  .header-cta {
    display: none;
  }

  .section-shell {
    width: min(100% - 28px, 1280px);
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .profile-panel,
  .tech-stack,
  .stack-groups,
  .proof-grid,
  .index-list,
  .capability-grid,
  .media-grid,
  .media-grid.two {
    grid-template-columns: 1fr;
  }

  .profile-photo {
    width: 112px;
    height: 132px;
  }

  .media-main {
    max-height: none;
  }

  .media-thumb img {
    aspect-ratio: 16 / 9;
  }

  .project-section {
    padding: 56px 0;
  }

  h1 {
    font-size: clamp(2.45rem, 11vw, 3.35rem);
    line-height: 1.02;
  }

  h2 {
    font-size: clamp(1.82rem, 8.6vw, 2.7rem);
    line-height: 1.08;
  }

  .jonny-widget {
    right: 14px;
    bottom: 14px;
    left: 14px;
    justify-items: stretch;
  }

  .jonny-panel {
    width: 100%;
    max-height: calc(100svh - 96px);
    border-radius: 22px;
  }

  .jonny-fab {
    justify-self: end;
    min-height: 52px;
  }

  .jonny-form {
    grid-template-columns: 1fr;
  }

  .jonny-form button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Reference pass for the supplied 2026 portfolio mockups. */
@media (min-width: 1200px) {
  .site-header {
    top: 18px;
    width: min(1532px, calc(100% - 40px));
    min-height: 78px;
    margin-top: 0;
    padding: 12px 18px;
    border-radius: 22px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .header-cta {
    min-width: 146px;
    min-height: 44px;
    border-color: rgba(44, 255, 145, 0.72);
    border-radius: 14px;
    font-size: 0.98rem;
  }

  .header-cta span {
    margin-left: 8px;
  }

  .hero.section-shell {
    position: relative;
    width: min(1532px, calc(100% - 64px));
    grid-template-columns: minmax(0, 1.04fr) minmax(460px, 0.96fr);
    gap: 50px;
    min-height: min(803px, calc(100svh - 160px));
    padding: 76px 0 0;
  }

  .hero-copy {
    align-self: start;
    width: auto;
    max-width: 100%;
    padding-top: 32px;
    padding-left: 34px;
  }

  .hero-copy .eyebrow {
    position: relative;
    margin-bottom: 30px;
    padding-left: 24px;
    font-size: 16px;
    letter-spacing: 0.2em;
  }

  .hero-copy .eyebrow::before,
  .projects-index .eyebrow::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--green);
    box-shadow: 0 0 18px rgba(44, 255, 145, 0.9);
    transform: translateY(-50%);
  }

.hero h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 4.2vw, 4rem);
  line-height: 0.98;
  letter-spacing: 0;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.16), 0 20px 58px rgba(0, 0, 0, 0.45);
}

  .hero h1 .text-accent {
    display: inline;
  }

  .hero-visual {
    width: 100%;
    min-height: 635px;
    margin-top: 14px;
    border-radius: 16px;
    padding: 24px;
    align-content: start;
  }

  .profile-panel {
    grid-template-columns: minmax(290px, 330px) minmax(0, 1fr);
    gap: clamp(24px, 3vw, 46px);
  }

  .profile-photo {
    height: 586px;
    min-height: 586px;
    border-radius: 14px;
    object-position: center top;
  }

  .profile-panel::before {
    content: "";
    position: absolute;
    left: 48px;
    top: 38px;
    width: 282px;
    height: 282px;
    border: 2px solid rgba(95, 255, 207, 0.75);
    border-radius: 999px;
    box-shadow: 0 0 38px rgba(95, 255, 207, 0.42);
    pointer-events: none;
  }

  .profile-panel h2 {
    font-size: 50px;
    line-height: 1.16;
    text-shadow: 0 3px 0 rgba(255, 255, 255, 0.16);
  }

  .profile-panel .panel-kicker {
    margin-top: 4px;
    margin-bottom: 22px;
    font-size: 14px;
    letter-spacing: 0.22em;
  }

  .profile-panel p:not(.panel-kicker) {
    font-size: 21px;
    line-height: 1.55;
  }

  .terminal-panel.hero-capability-panel {
    margin-left: 0;
    margin-top: 22px;
    gap: 10px;
    width: 100%;
  }

  .hero-capability {
    min-height: 112px;
    border-radius: 12px;
  }

  .hero-scroll-cue {
    display: none;
  }

  .projects-index {
    position: relative;
    width: 100%;
    min-height: auto;
    padding: 78px 0 56px;
    scroll-margin-top: 118px;
    background:
      radial-gradient(circle at 94% 25%, rgba(44, 255, 145, 0.24), transparent 19rem),
      radial-gradient(circle at 75% 18%, rgba(86, 247, 210, 0.08), transparent 28rem);
  }

  .projects-index .section-heading {
    max-width: 810px;
  }

  .projects-index .eyebrow {
    position: relative;
    margin-bottom: 26px;
    padding-left: 24px;
    font-size: 16px;
    letter-spacing: 0;
  }

  .projects-index h2 {
    max-width: 800px;
    font-size: 48px;
    line-height: 1.18;
    text-shadow: 0 3px 0 rgba(255, 255, 255, 0.16);
  }

  .projects-index .section-intro {
    max-width: 795px;
    margin-top: 18px;
    font-size: 19px;
    line-height: 1.45;
  }

  .index-list {
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-top: 30px;
  }

  .index-list a {
    min-height: 220px;
    border-radius: 18px;
    padding: 18px;
    color: var(--text);
    background:
      radial-gradient(circle at 78% 14%, rgba(44, 255, 145, 0.12), transparent 34%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.018)),
      rgba(8, 18, 14, 0.74);
  }

  .index-list a > * {
    opacity: 1;
  }
}

/* ================================================================
   REFINO 2026 — fixes + polish
   - Circulo do hero vai pra trás da foto
   - Bordas com gradient sutil, glow refinado, hover suave
   - Tipografia com tracking ajustado
   - Cards de projeto com brilho animado nas bordas
   ================================================================ */

/* Fix: círculo decorativo atrás da foto, não em cima */
.hero-visual { position: relative; isolation: isolate; }
.hero-visual::before {
  z-index: 0 !important;
  inset: 2rem auto auto 3rem !important;
  width: 21rem !important;
  aspect-ratio: 1;
  filter: blur(16px) !important;
  opacity: 0.9;
}
.profile-panel { position: relative; z-index: 2; }
.profile-panel::before {
  z-index: 0;
}
.profile-photo {
  position: relative;
  z-index: 2;
  border-radius: 28px !important;
  box-shadow:
    0 0 0 1px rgba(44, 255, 145, 0.18),
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 90px rgba(44, 255, 145, 0.18) !important;
}

/* Tipografia 2026 */
.hero h1 {
  letter-spacing: -0.025em;
  font-weight: 700;
  line-height: 1.05;
}
.eyebrow {
  letter-spacing: 0.32em !important;
  font-size: 0.72rem !important;
  text-transform: uppercase;
  color: rgba(157, 255, 200, 0.78) !important;
  position: relative;
  padding-left: 26px;
}
.eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, var(--green), transparent);
}

/* Botões refinados */
.button {
  position: relative;
  letter-spacing: 0.02em;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), box-shadow 220ms ease, background 220ms ease, border-color 220ms ease;
  overflow: hidden;
}
.button.primary {
  background: linear-gradient(135deg, var(--green) 0%, #5fffae 100%);
  color: #00160a;
  box-shadow: 0 10px 30px rgba(44, 255, 145, 0.28), 0 0 0 1px rgba(44, 255, 145, 0.4) inset;
}
.button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 50px rgba(44, 255, 145, 0.42), 0 0 0 1px rgba(44, 255, 145, 0.55) inset;
}
.button.secondary:hover {
  transform: translateY(-2px);
  border-color: rgba(44, 255, 145, 0.55);
  background: rgba(44, 255, 145, 0.08);
}

/* Cards: borda gradiente animada sutil */
.project-card,
.contact-card,
.principle,
.capability {
  position: relative;
  transition: transform 320ms cubic-bezier(.2,.8,.2,1), box-shadow 320ms ease, border-color 320ms ease;
}
.project-card::after,
.contact-card::after,
.principle::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(44,255,145,0.55), rgba(86,247,210,0.0) 35%, rgba(44,255,145,0.0) 65%, rgba(157,255,200,0.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 320ms ease;
  pointer-events: none;
}
.project-card:hover,
.contact-card:hover,
.principle:hover {
  transform: translateY(-4px);
  border-color: rgba(44, 255, 145, 0.32);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 60px rgba(44,255,145,0.12);
}
.project-card:hover::after,
.contact-card:hover::after,
.principle:hover::after { opacity: 1; }

/* Capability cards no hero — chips com brilho */
.hero-capability {
  position: relative;
  transition: transform 220ms ease, background 220ms ease;
}
.hero-capability:hover {
  transform: translateY(-2px);
  background:
    radial-gradient(circle at 20% 12%, rgba(44, 255, 145, 0.22), transparent 58%),
    rgba(44, 255, 145, 0.04);
}
.hero-capability strong {
  background: linear-gradient(135deg, var(--green), var(--green-2));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(44,255,145,0.35));
}

/* Header — micro refinement */
.site-header {
  border-radius: 26px;
  transition: background 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}
.brand-mark {
  letter-spacing: -0.02em;
}

/* Texto de destaque verde — leve glow */
.text-accent {
  background: linear-gradient(135deg, #2cff91 0%, #9dffc8 60%, #56f7d2 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(44, 255, 145, 0.22));
}

/* Scroll cue com pulse */
.hero-scroll-cue strong {
  display: inline-block;
  animation: fp-bounce 2s ease-in-out infinite;
}
@keyframes fp-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(6px); opacity: 1; }
}

/* Reveal mais elegante sem esconder conteúdo por padrão */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 700ms cubic-bezier(.2,.8,.2,1), transform 700ms cubic-bezier(.2,.8,.2,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Noise texture overlay sutil para sensação tátil */
body::after {
  background-image:
    radial-gradient(circle, rgba(44, 255, 145, 0.12), transparent 62%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.17  0 0 0 0 1  0 0 0 0 0.57  0 0 0 0.035 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Jonny FAB refinado */
.jonny-fab {
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), box-shadow 220ms ease;
  box-shadow: 0 14px 40px rgba(44,255,145,0.28), 0 0 0 1px rgba(44,255,145,0.35) inset;
}
.jonny-fab:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 22px 60px rgba(44,255,145,0.4), 0 0 0 1px rgba(44,255,145,0.55) inset;
}

/* Foco acessível consistente */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 8px;
}

/* =====================================================================
   2026 CARD REFRESH — prints 1-5 + matrix bg behind profile photo
   ===================================================================== */

/* --- Matrix rain wrap atrás da foto (Print: foto) --- */
.profile-photo-wrap {
  position: relative;
  width: 100%;
  height: min(46svh, 430px);
  min-height: 360px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 1px rgba(44, 255, 145, 0.06), 0 0 70px rgba(44, 255, 145, 0.22);
  isolation: isolate;
  background: #030807;
}
.profile-photo-wrap .profile-matrix {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}
.profile-photo-wrap .profile-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  /* deixa a foto se misturar com o matrix nas bordas */
  -webkit-mask-image: radial-gradient(ellipse at 50% 35%, #000 55%, rgba(0,0,0,0.85) 75%, rgba(0,0,0,0.55) 100%);
          mask-image: radial-gradient(ellipse at 50% 35%, #000 55%, rgba(0,0,0,0.85) 75%, rgba(0,0,0,0.55) 100%);
}

/* --- PRINT 1: principle carousel cards --- */
.principle-carousel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 8px;
}
.principle-v2 {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(8,18,14,0.92), rgba(4,10,8,0.92));
  overflow: hidden;
  transform: translateY(0) rotateX(0);
  transform-style: preserve-3d;
  transition: transform 320ms cubic-bezier(.2,.8,.2,1), border-color 280ms ease, box-shadow 320ms ease;
  box-shadow: 0 18px 40px -28px rgba(44,255,145,0.15);
  padding: 0;
}
.principle-v2 .principle-cover {
  height: 170px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.principle-v2 .principle-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(4,10,8,0.85));
}
.principle-v2 .principle-body {
  padding: 22px 24px 26px;
  display: grid;
  gap: 10px;
}
.principle-v2 strong {
  color: var(--green);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.principle-v2 p { color: var(--muted); margin: 0; }
.principle-v2:hover {
  transform: translateY(-6px);
  border-color: rgba(44,255,145,0.45);
  box-shadow: 0 28px 60px -28px rgba(44,255,145,0.45);
}
@media (max-width: 880px) {
  .principle-carousel { grid-template-columns: 1fr; }
}

/* --- PRINT 2: capability cards (card-21 vibe) --- */
.cap-grid { gap: 14px !important; }
.cap-card {
  position: relative;
  display: grid !important;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px !important;
  min-height: 116px;
  border-radius: 16px !important;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.35)), rgba(8,18,14,0.6) !important;
  transition: transform 240ms cubic-bezier(.2,.8,.2,1), border-color 240ms ease, box-shadow 240ms ease;
}
.cap-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(44,255,145,0.55), transparent 40%, transparent 60%, rgba(44,255,145,0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.6;
  transition: opacity 240ms ease;
  pointer-events: none;
}
.cap-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -22px rgba(44,255,145,0.5); }
.cap-card:hover::before { opacity: 1; }
.cap-card .cap-img {
  width: 78px;
  height: 78px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(44,255,145,0.25);
  box-shadow: inset 0 0 24px rgba(44,255,145,0.18);
}
.cap-card .cap-body { display: grid; gap: 2px; min-width: 0; }
.cap-card .cap-body strong { color: var(--green); font-size: 0.92rem; }
.cap-card .cap-body span { color: var(--text); font-weight: 800; font-size: 0.95rem; line-height: 1.15; margin-top: 6px; }
.cap-card .cap-body small { color: var(--muted); font-size: 0.76rem; }

/* --- PRINT 4: project cards 01-05 (card-17 vibe, image bg) --- */
.project-card-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
.pcard {
  position: relative;
  display: block !important;
  min-height: 240px !important;
  border-radius: 18px !important;
  overflow: hidden;
  border: 1px solid var(--line) !important;
  background-size: cover !important;
  background-position: center !important;
  background-color: #06100c !important;
  text-decoration: none;
  isolation: isolate;
  transition: transform 280ms cubic-bezier(.2,.8,.2,1), border-color 280ms ease, box-shadow 280ms ease;
}
.pcard::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3,8,6,0.15) 0%, rgba(3,8,6,0.55) 55%, rgba(3,8,6,0.95) 100%);
  z-index: 1;
  transition: background 280ms ease;
}
.pcard:hover {
  transform: translateY(-6px);
  border-color: rgba(44,255,145,0.55) !important;
  box-shadow: 0 28px 60px -22px rgba(44,255,145,0.45);
}
.pcard:hover::before {
  background: linear-gradient(180deg, rgba(3,8,6,0.05) 0%, rgba(3,8,6,0.45) 55%, rgba(3,8,6,0.92) 100%);
}
.pcard .pcard-num {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  color: var(--green);
  font-weight: 900;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88rem;
  letter-spacing: 0.16em;
  background: rgba(3,8,6,0.55);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(44,255,145,0.35);
  backdrop-filter: blur(6px);
}
.pcard .pcard-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 14px 16px 16px;
  display: grid;
  gap: 4px;
}
.pcard .pcard-overlay strong {
  display: block;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.pcard .pcard-overlay small {
  color: var(--muted);
  font-size: 0.78rem;
}
@media (max-width: 1100px) {
  .project-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 560px) {
  .project-card-grid { grid-template-columns: 1fr !important; }
}

/* --- PRINT 3: circular gallery (horizontal scroll com itens circulares) --- */
.circular-gallery {
  margin-top: 36px;
  position: relative;
  padding: 36px 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.circular-gallery .cg-track {
  display: flex;
  gap: 48px;
  justify-content: center;
  align-items: center;
  perspective: 1200px;
  flex-wrap: wrap;
}
.cg-item {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(44,255,145,0.35);
  box-shadow: 0 0 0 1px rgba(44,255,145,0.08), 0 18px 40px -20px rgba(44,255,145,0.45);
  background: #06100c;
  text-decoration: none;
  transition: transform 380ms cubic-bezier(.2,.8,.2,1), border-color 280ms ease, box-shadow 280ms ease;
  flex: 0 0 auto;
}
.cg-item:nth-child(odd) { transform: translateY(-12px) rotate(-2deg); }
.cg-item:nth-child(even) { transform: translateY(12px) rotate(2deg); }
.cg-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(.2,.8,.2,1);
}
.cg-item span {
  position: absolute;
  left: 50%;
  bottom: -28px;
  transform: translateX(-50%);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cg-item:hover {
  transform: translateY(-18px) rotate(0deg) scale(1.06);
  border-color: var(--green);
  box-shadow: 0 0 0 1px rgba(44,255,145,0.25), 0 30px 60px -18px rgba(44,255,145,0.7);
}
.cg-item:hover img { transform: scale(1.12); }
@media (max-width: 720px) {
  .cg-item { width: 130px; height: 130px; }
  .circular-gallery .cg-track { gap: 28px; }
}

/* --- PRINT 5: image-auto-slider --- */
.image-slider {
  position: relative;
  margin: 24px 0 56px;
  padding: 18px 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(44,255,145,0.04), transparent);
}
.slider-track {
  display: flex;
  gap: 22px;
  width: max-content;
  animation: slider-scroll 38s linear infinite;
}
.image-slider:hover .slider-track { animation-play-state: running; }
.slider-item {
  flex: 0 0 auto;
  width: 280px;
  height: 180px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(44,255,145,0.25);
  box-shadow: 0 14px 30px -18px rgba(44,255,145,0.4);
}
.slider-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@keyframes slider-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Responsive overrides for the new .profile-photo-wrap (matches old .profile-photo heights) */
@media (max-width: 900px) {
  .profile-photo-wrap { height: 356px; min-height: 356px; border-radius: 18px; }
}
@media (max-width: 560px) {
  .profile-photo-wrap { width: 100%; height: 280px; min-height: 280px; }
}
@media (min-width: 1600px) {
  .profile-photo-wrap { height: 586px; min-height: 586px; border-radius: 14px; }
}
.profile-photo-wrap .profile-photo {
  height: 100% !important;
  min-height: 0 !important;
  width: 100% !important;
  border-radius: 0 !important;
}

/* New intro-grid layout: heading on top, principle carousel below */
.intro-grid { grid-template-columns: 1fr !important; gap: 28px !important; }
.intro-grid .section-heading { max-width: 900px; }

/* Estabilização final do hero e do matrix nas larguras intermediárias */
@media (min-width: 701px) and (max-width: 1080px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: 22px;
    align-items: start;
  }

  .hero.section-shell {
    padding: 26px 0 18px;
  }

  .hero h1 {
    max-width: 7.2ch;
    font-size: clamp(2.35rem, 5.2vw, 3.45rem);
    line-height: 0.96;
  }

  .hero-text {
    max-width: 42ch;
    margin-top: 18px;
    font-size: 0.92rem;
    line-height: 1.48;
  }

  .hero-actions,
  .hero .signal-row {
    display: flex;
  }

  .hero-visual {
    min-height: 0;
    margin-top: 0;
    padding: 16px;
  }

  .profile-panel {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .profile-photo-wrap {
    height: 300px;
    min-height: 300px;
    border-radius: 18px;
  }

  .profile-panel h2 {
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  }

  .profile-panel p:not(.panel-kicker) {
    font-size: 0.95rem;
    line-height: 1.42;
  }

  .terminal-panel.hero-capability-panel {
    margin-top: 12px;
  }

  .cap-card {
    grid-template-columns: 64px 1fr;
    min-height: 98px;
  }

  .cap-card .cap-img {
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 900px) {
  .hero,
  .project-layout,
  .project-layout.reverse,
  .intro-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-copy,
  .hero-visual {
    max-width: 100%;
  }

  .hero h1 {
    max-width: 12ch;
    font-size: clamp(2.8rem, 6.4vw, 4.2rem);
    line-height: 0.98;
    overflow-wrap: normal;
    word-break: keep-all;
  }

  .hero-visual {
    width: min(100%, 440px);
  }
}

.profile-photo-wrap .profile-matrix {
  opacity: 0.24;
}

.profile-photo-wrap .profile-photo {
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 78%, rgba(0, 0, 0, 0.88) 92%, rgba(0, 0, 0, 0.7) 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 78%, rgba(0, 0, 0, 0.88) 92%, rgba(0, 0, 0, 0.7) 100%);
}

/* =====================================================================
   HOTFIX FINAL — botão, foto inteira + matrix e cards mais fiéis
   ===================================================================== */

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  line-height: 1;
}

.header-cta span {
  display: inline-flex;
  align-items: center;
}

.language-switcher {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 42px;
  padding: 4px;
  border: 1px solid rgba(139, 255, 191, 0.18);
  border-radius: 999px;
  background: rgba(3, 12, 8, 0.56);
  box-shadow: inset 0 0 0 1px rgba(44, 255, 145, 0.045);
}

.language-switcher button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.language-switcher button:hover,
.language-switcher button:focus-visible {
  color: var(--green-2);
  background: rgba(44, 255, 145, 0.1);
}

.language-switcher button.is-active {
  color: #00160a;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  box-shadow: 0 0 24px rgba(44, 255, 145, 0.26);
}

@media (min-width: 1081px) {
  .site-header {
    grid-template-columns: 1fr auto auto auto;
  }
}

.profile-panel {
  grid-template-columns: 1fr !important;
  gap: 18px !important;
  align-items: start !important;
}

.profile-panel > div:last-child {
  display: grid;
  gap: 10px;
}

.profile-photo-wrap {
  position: relative;
  width: min(100%, 430px);
  aspect-ratio: 0.82;
  height: auto !important;
  min-height: 0 !important;
  margin-inline: auto;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 20%, rgba(44, 255, 145, 0.24), transparent 26%),
    linear-gradient(180deg, #05110d 0%, #020806 100%);
  border: 1px solid rgba(44, 255, 145, 0.22);
  box-shadow:
    inset 0 0 0 1px rgba(44, 255, 145, 0.08),
    0 26px 80px rgba(0, 0, 0, 0.42);
}

.profile-photo-wrap::before {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  top: 8%;
  height: 44%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(44, 255, 145, 0.42), rgba(44, 255, 145, 0.12) 42%, transparent 74%);
  filter: blur(24px);
  z-index: 0;
  pointer-events: none;
}

.profile-matrix {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.profile-matrix {
  z-index: 0;
  pointer-events: none;
  opacity: 0.58;
  mix-blend-mode: screen;
}

.profile-photo-wrap .profile-photo,
.profile-photo {
  position: relative;
  z-index: 2;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 18px 14px 0 !important;
  object-fit: contain !important;
  object-position: center bottom !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  -webkit-mask-image: none !important;
          mask-image: none !important;
}

.profile-photo-wrap .profile-photo[src$="felipe-transparent.png"] {
  padding: 0 !important;
  width: 112% !important;
  max-width: none !important;
  margin: -4% -6% 0 !important;
  object-fit: contain !important;
  object-position: center bottom !important;
}

.profile-panel h2 {
  max-width: 12ch;
  font-size: clamp(2rem, 2.8vw, 3rem);
}

.profile-panel p:not(.panel-kicker) {
  max-width: 30ch;
}

.hero-visual {
  gap: 22px;
}

.principle-carousel {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
}

.principle-carousel::-webkit-scrollbar {
  height: 0;
}

.principle-v2 {
  position: relative;
  flex: 0 0 clamp(290px, 31vw, 376px);
  min-height: 450px;
  scroll-snap-align: start;
  border-radius: 28px;
  border: 1px solid rgba(44, 255, 145, 0.16);
  background:
    radial-gradient(circle at 50% 0%, rgba(44, 255, 145, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(8, 18, 14, 0.98), rgba(3, 8, 6, 0.96));
  box-shadow: 0 28px 60px -34px rgba(0, 0, 0, 0.72);
  overflow: hidden;
}

.principle-v2::before {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 3;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.principle-v2:nth-child(1)::before { content: "01"; }
.principle-v2:nth-child(2)::before { content: "02"; }
.principle-v2:nth-child(3)::before { content: "03"; }

.principle-v2 .principle-cover {
  height: 250px;
  margin: 12px;
  border-radius: 20px;
  border: 1px solid rgba(44, 255, 145, 0.14);
  background-size: cover;
  background-position: center;
}

.principle-v2 .principle-cover::after {
  background: linear-gradient(180deg, rgba(3, 8, 6, 0) 28%, rgba(3, 8, 6, 0.2) 60%, rgba(3, 8, 6, 0.92) 100%);
}

.principle-v2 .principle-body {
  padding: 10px 24px 26px;
  gap: 12px;
}

.principle-v2 strong {
  color: var(--text);
  font-size: 1.3rem;
  text-transform: none;
  letter-spacing: 0;
}

.principle-v2 p {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.principle-v2:hover {
  transform: translateY(-8px) rotate(-1deg);
}

.cap-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.cap-card {
  grid-template-columns: 1fr !important;
  align-items: end;
  min-height: 250px;
  padding: 12px !important;
  border-radius: 22px !important;
  background:
    radial-gradient(circle at 50% 0%, rgba(44, 255, 145, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(11, 24, 18, 0.92), rgba(4, 10, 8, 0.96)) !important;
}

.cap-card .cap-img {
  width: 100% !important;
  height: 138px !important;
  border-radius: 16px;
}

.cap-card .cap-body {
  gap: 6px;
  padding: 6px 4px 2px;
}

.cap-card .cap-body strong {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
}

.cap-card .cap-body span {
  margin-top: 0;
  font-size: 1.05rem;
}

.cap-card .cap-body small {
  font-size: 0.82rem;
  line-height: 1.45;
}

.projects-index > .index-list:not(.project-card-grid) {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 14px !important;
  margin: 22px 0 28px !important;
}

.projects-index > .index-list:not(.project-card-grid) a {
  position: relative !important;
  min-height: 220px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  align-items: flex-start !important;
  padding: 22px 18px 18px !important;
  overflow: hidden;
  border-radius: 20px !important;
  border: 1px solid rgba(44, 255, 145, 0.14) !important;
  background:
    radial-gradient(circle at 78% 14%, rgba(44, 255, 145, 0.16), rgba(44, 255, 145, 0.06) 20%, transparent 34%),
    linear-gradient(180deg, rgba(5, 16, 12, 0.98), rgba(3, 9, 7, 0.99)) !important;
  box-shadow: none !important;
}

.projects-index > .index-list:not(.project-card-grid) a:hover {
  transform: translateY(-4px);
}

.projects-index > .index-list:not(.project-card-grid) a::after {
  content: "";
  position: absolute;
  top: -8px;
  right: 18px;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(44, 255, 145, 0.22), rgba(44, 255, 145, 0.08) 42%, transparent 72%);
  filter: blur(10px);
  pointer-events: none;
}

.projects-index > .index-list:not(.project-card-grid) span {
  position: absolute !important;
  top: 18px !important;
  left: 18px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--green) !important;
  font-size: 0.95rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}

.projects-index > .index-list:not(.project-card-grid) strong,
.projects-index > .index-list:not(.project-card-grid) small {
  position: relative !important;
  z-index: 1 !important;
  margin: 0 !important;
}

.projects-index > .index-list:not(.project-card-grid) strong {
  display: block !important;
  margin-top: auto !important;
  font-size: 1.1rem !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
}

.projects-index > .index-list:not(.project-card-grid) small {
  max-width: 15ch !important;
  margin-top: 4px !important;
  color: var(--muted) !important;
  font-size: 0.78rem !important;
  line-height: 1.4 !important;
}

.project-card-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.pcard {
  min-height: 184px !important;
  border-radius: 18px !important;
}

.pcard .pcard-num {
  top: 10px;
  left: 10px;
  min-width: 36px;
  justify-content: center;
}

.pcard .pcard-overlay {
  padding: 12px 14px 14px;
}

.pcard .pcard-overlay strong {
  font-size: 1rem;
}

.circular-gallery {
  margin-top: 28px;
  padding: 28px 0 44px;
}

.circular-gallery .cg-track {
  width: max-content;
  gap: 20px;
  align-items: flex-end;
  flex-wrap: nowrap;
  animation: circular-drift 28s linear infinite;
}

.circular-gallery:hover .cg-track {
  animation-play-state: running;
}

.cg-item {
  width: 170px;
  height: 170px;
}

.cg-item:nth-child(3n + 1) { transform: translateY(18px) rotate(-2deg); }
.cg-item:nth-child(3n + 2) { transform: translateY(-8px) rotate(1deg); }
.cg-item:nth-child(3n + 3) { transform: translateY(24px) rotate(2deg); }

@keyframes circular-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.portfolio-circular-gallery {
  --pcg-radius: clamp(260px, 35vw, 470px);
  --pcg-card-w: clamp(190px, 22vw, 292px);
  --pcg-card-h: clamp(252px, 29vw, 386px);
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 540px;
  overflow: hidden;
  cursor: grab;
  perspective: 1100px;
  perspective-origin: 50% 45%;
  touch-action: pan-y;
}

.portfolio-circular-gallery:active {
  cursor: grabbing;
}

.pcg-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 1px;
  transform-style: preserve-3d;
  transform: translate3d(-50%, -48%, 0) rotateX(-8deg);
}

.pcg-card {
  position: absolute;
  left: calc(var(--pcg-card-w) / -2);
  top: calc(var(--pcg-card-h) / -2);
  display: block;
  width: var(--pcg-card-w);
  height: var(--pcg-card-h);
  overflow: hidden;
  border: 1px solid rgba(139, 255, 191, 0.26);
  border-radius: 20px;
  background: rgba(5, 13, 10, 0.92);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(44, 255, 145, 0.08);
  opacity: var(--pcg-opacity);
  transform: rotateY(var(--pcg-angle)) translateZ(var(--pcg-radius)) rotateY(var(--pcg-facing)) scale(var(--pcg-scale));
  transform-style: preserve-3d;
  transition: opacity 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.pcg-card:hover {
  filter: brightness(1.12) saturate(1.06);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.58), 0 0 40px rgba(44, 255, 145, 0.2);
}

.pcg-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.pcg-shade,
.pcg-copy {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pcg-shade {
  background: linear-gradient(180deg, rgba(2, 8, 6, 0.12), rgba(2, 8, 6, 0.2) 42%, rgba(1, 6, 4, 0.92));
}

.pcg-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 18px;
}

.pcg-copy small {
  width: max-content;
  padding: 5px 8px;
  border: 1px solid rgba(139, 255, 191, 0.26);
  border-radius: 999px;
  background: rgba(2, 8, 6, 0.58);
  color: var(--green-2);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.pcg-copy strong {
  color: var(--text);
  font-size: clamp(1.35rem, 2.25vw, 2.1rem);
  font-weight: 900;
  line-height: 0.95;
}

.pcg-copy em {
  color: var(--muted);
  font-size: 0.92rem;
  font-style: normal;
  font-weight: 700;
}

.image-slider {
  margin: 26px 0 60px;
  padding: 20px 0;
  background:
    linear-gradient(180deg, rgba(44, 255, 145, 0.05), rgba(44, 255, 145, 0.01)),
    rgba(4, 10, 8, 0.34);
}

.slider-track {
  gap: 18px;
  animation-duration: 30s;
}

.slider-item {
  width: 320px;
  height: 196px;
  border-radius: 18px;
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    min-height: auto;
  }

  .hero-visual {
    width: min(100%, 560px) !important;
  }

  .projects-index > .index-list:not(.project-card-grid),
  .project-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 720px) {
  .cap-grid,
  .projects-index > .index-list:not(.project-card-grid),
  .project-card-grid {
    grid-template-columns: 1fr !important;
  }

  .profile-photo-wrap {
    width: 100%;
    max-width: 360px;
  }

  .principle-v2 {
    flex-basis: 86vw;
  }

  .cg-item {
    width: 132px;
    height: 132px;
  }

  .slider-item {
    width: 260px;
    height: 164px;
  }
}

/* Profile photo wrap — restore matrix backdrop with centered glow */
.profile-photo-wrap.no-matrix,
.profile-photo-wrap {
  background:
    radial-gradient(circle at 50% 42%, rgba(44, 255, 145, 0.30), transparent 48%),
    linear-gradient(180deg, #05110d 0%, #020806 100%) !important;
  border: 1px solid rgba(44, 255, 145, 0.28) !important;
  box-shadow:
    inset 0 0 0 1px rgba(44, 255, 145, 0.10),
    0 26px 80px rgba(0, 0, 0, 0.45) !important;
}

.profile-photo-wrap::before {
  content: "" !important;
  display: block !important;
  position: absolute;
  left: 50%;
  top: 42%;
  width: 62%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 1px solid rgba(44, 255, 145, 0.55);
  background: radial-gradient(circle, rgba(44, 255, 145, 0.18), transparent 65%);
  filter: blur(2px);
  z-index: 1;
  pointer-events: none;
}

.profile-photo-wrap .profile-matrix {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.85;
  mix-blend-mode: screen;
  pointer-events: none;
}

/* Global matrix background — slightly more visible (+10%) */
.site-matrix-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  background: #030706;
  opacity: 0.18;
}

/* Circular gallery — fix oversize / cutoff */
#projects-circular-gallery {
  height: auto !important;
  min-height: 0;
  overflow: hidden;
  border-radius: 28px;
  padding: clamp(14px, 2vw, 22px);
}

#projects-circular-gallery::before,
#projects-circular-gallery::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#projects-circular-gallery::before {
  border: 1px solid rgba(139, 255, 191, 0.12);
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 44%, rgba(44, 255, 145, 0.13), transparent 30rem),
    radial-gradient(circle at 50% 78%, rgba(86, 247, 210, 0.08), transparent 26rem),
    linear-gradient(180deg, rgba(4, 13, 9, 0.28), rgba(2, 7, 5, 0.06));
}

#projects-circular-gallery::after {
  background:
    linear-gradient(90deg, rgba(139, 255, 191, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(139, 255, 191, 0.028) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 50%, #000 0%, transparent 76%);
}

#projects-circular-react {
  position: relative;
  z-index: 1;
}

.portfolio-circular-gallery {
  --pcg-radius: clamp(250px, 30vw, 420px) !important;
  --pcg-card-w: clamp(214px, 20vw, 292px) !important;
  --pcg-card-h: clamp(292px, 27vw, 392px) !important;
  min-height: 650px !important;
  perspective: 1400px !important;
}

.pcg-stage {
  transform: translate3d(-50%, -50%, 0) rotateX(-4deg) !important;
}

.pcg-copy {
  gap: 8px !important;
  padding: 16px !important;
}

.pcg-copy strong {
  font-size: clamp(1.15rem, 1.5vw, 1.5rem) !important;
  line-height: 1.05 !important;
}

.pcg-copy em {
  font-size: 0.82rem !important;
  line-height: 1.35 !important;
  color: rgba(242, 255, 248, 0.78) !important;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pcg-tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(44, 255, 145, 0.45);
  border-radius: 999px;
  background: rgba(2, 8, 6, 0.6);
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pcg-shade {
  background: linear-gradient(180deg, rgba(2, 8, 6, 0.10), rgba(2, 8, 6, 0.55) 48%, rgba(1, 6, 4, 0.96)) !important;
}

.pcg-card {
  filter: brightness(var(--pcg-brightness, 1));
  transform: rotateY(var(--pcg-angle)) translateZ(var(--pcg-radius)) rotateY(var(--pcg-facing)) translateY(var(--pcg-y, 0)) scale(var(--pcg-scale)) !important;
}

.blog-radar {
  padding-top: clamp(72px, 10vw, 140px);
}

.blog-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.blog-controls {
  display: flex;
  gap: 12px;
  flex: 0 0 auto;
}

.blog-controls button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(238, 255, 244, 0.16);
  background: rgba(238, 255, 244, 0.08);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.blog-controls button:hover,
.blog-controls button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(44, 255, 145, 0.5);
  background: rgba(44, 255, 145, 0.12);
  outline: none;
}

.blog-grid {
  display: flex;
  gap: 18px;
  margin-top: 34px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 4px 4px 18px;
  scroll-padding-inline: 4px;
  scroll-snap-type: x mandatory;
  scrollbar-color: rgba(44, 255, 145, 0.45) rgba(238, 255, 244, 0.08);
}

.blog-grid a {
  position: relative;
  flex: 0 0 clamp(270px, 27vw, 360px);
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
  padding: 0 0 22px;
  border: 1px solid rgba(238, 255, 244, 0.11);
  border-radius: 18px;
  background: rgba(8, 16, 13, 0.9);
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.blog-grid a::before {
  content: "";
  display: block;
  width: 100%;
  height: 155px;
  background:
    linear-gradient(180deg, rgba(4, 8, 7, 0.04), rgba(4, 8, 7, 0.54)),
    url("/assets/cards/slider-1.jpg") center/cover no-repeat;
}

.blog-grid a:nth-child(5n + 2)::before {
  background-image:
    linear-gradient(180deg, rgba(4, 8, 7, 0.04), rgba(4, 8, 7, 0.54)),
    url("/assets/cards/slider-2.jpg");
}

.blog-grid a:nth-child(5n + 3)::before {
  background-image:
    linear-gradient(180deg, rgba(4, 8, 7, 0.04), rgba(4, 8, 7, 0.54)),
    url("/assets/cards/slider-3.jpg");
}

.blog-grid a:nth-child(5n + 4)::before {
  background-image:
    linear-gradient(180deg, rgba(4, 8, 7, 0.04), rgba(4, 8, 7, 0.54)),
    url("/assets/cards/slider-4.jpg");
}

.blog-grid a:nth-child(5n + 5)::before {
  background-image:
    linear-gradient(180deg, rgba(4, 8, 7, 0.04), rgba(4, 8, 7, 0.54)),
    url("/assets/cards/slider-5.jpg");
}

.blog-grid a::after {
  content: "↗";
  position: absolute;
  right: 18px;
  top: 18px;
  color: var(--accent);
  font-size: 16px;
}

.blog-grid a:hover,
.blog-grid a:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(44, 255, 145, 0.5);
  box-shadow: 0 20px 50px -32px rgba(44, 255, 145, 0.65);
  outline: none;
}

.blog-grid span,
.blog-grid em {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-style: normal;
}

.blog-grid span {
  color: var(--accent);
  font-size: 11px;
  padding: 0 24px;
}

.blog-grid strong {
  display: block;
  min-height: 88px;
  padding: 0 24px;
  font-size: clamp(18px, 1.45vw, 22px);
  line-height: 1.35;
  font-weight: 700;
}

.blog-grid em {
  color: var(--muted);
  margin-top: auto;
  padding: 0 24px;
  font-size: 10px;
}

.blog-action {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.spotlight-card {
  --spotlight-x: 50%;
  --spotlight-y: 50%;
  --spotlight-opacity: 0;
  --spotlight-size: 360px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.spotlight-card > :not(.spotlight-card-glow) {
  position: relative;
  z-index: 1;
}

.spotlight-card-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: var(--spotlight-opacity);
  background:
    radial-gradient(
      var(--spotlight-size) circle at var(--spotlight-x) var(--spotlight-y),
      rgba(44, 255, 145, 0.28),
      rgba(44, 255, 145, 0.11) 32%,
      rgba(44, 255, 145, 0.035) 52%,
      transparent 72%
    );
  mix-blend-mode: screen;
  transition: opacity 180ms ease;
}

.spotlight-card:is(:hover, :focus-within) {
  border-color: rgba(44, 255, 145, 0.46);
}

.media-thumb.spotlight-card {
  --spotlight-size: 180px;
}

.pcard.spotlight-card,
.pcg-card.spotlight-card,
.blog-grid a.spotlight-card,
.principle.spotlight-card {
  --spotlight-size: 430px;
}

@media (prefers-reduced-motion: reduce) {
  .spotlight-card-glow {
    transition: none;
  }
}

.profile-photo-wrap .profile-matrix-canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Final restore: photo/matrix composition must match the reference video. */
.hero.section-shell {
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.78fr) !important;
  align-items: start !important;
}

.hero-visual {
  width: min(100%, 500px) !important;
  justify-self: end;
}

.profile-panel {
  grid-template-columns: 1fr !important;
  gap: 16px !important;
}

.profile-photo-wrap {
  width: min(100%, 430px) !important;
  aspect-ratio: 0.82 !important;
  height: auto !important;
  min-height: 0 !important;
  margin-inline: auto !important;
  background: linear-gradient(180deg, #04100c 0%, #010604 100%) !important;
  border: 1px solid rgba(44, 255, 145, 0.38) !important;
  border-radius: 18px !important;
  box-shadow: inset 0 0 0 1px rgba(44, 255, 145, 0.16), 0 28px 78px rgba(0, 0, 0, 0.48) !important;
}

.profile-photo-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 48%, rgba(44, 255, 145, 0.18), transparent 42%);
  mix-blend-mode: screen;
}

.profile-photo-wrap::before {
  top: 46% !important;
  width: 58% !important;
  opacity: 0.9 !important;
  z-index: 0 !important;
}

.profile-photo-wrap .profile-matrix {
  z-index: 1 !important;
  opacity: 1 !important;
  mix-blend-mode: normal !important;
  filter: brightness(2.65) saturate(1.7) contrast(1.25) !important;
}

.profile-photo-wrap .profile-matrix span {
  position: absolute;
  top: -30%;
  width: 14px;
  height: 160%;
  color: rgba(82, 255, 151, 0.78);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.08;
  text-orientation: upright;
  text-shadow: 0 0 7px rgba(44, 255, 145, 0.82), 0 0 18px rgba(44, 255, 145, 0.46);
  writing-mode: vertical-rl;
  animation: profile-matrix-fall 3.2s linear infinite;
}

.profile-photo-wrap .profile-matrix span:nth-child(1) { left: 8%; animation-delay: -0.4s; }
.profile-photo-wrap .profile-matrix span:nth-child(2) { left: 17%; animation-delay: -1.8s; opacity: 0.72; }
.profile-photo-wrap .profile-matrix span:nth-child(3) { left: 26%; animation-delay: -0.9s; }
.profile-photo-wrap .profile-matrix span:nth-child(4) { left: 35%; animation-delay: -2.4s; opacity: 0.66; }
.profile-photo-wrap .profile-matrix span:nth-child(5) { left: 44%; animation-delay: -1.1s; }
.profile-photo-wrap .profile-matrix span:nth-child(6) { left: 53%; animation-delay: -2.9s; opacity: 0.76; }
.profile-photo-wrap .profile-matrix span:nth-child(7) { left: 62%; animation-delay: -0.2s; }
.profile-photo-wrap .profile-matrix span:nth-child(8) { left: 71%; animation-delay: -1.5s; opacity: 0.7; }
.profile-photo-wrap .profile-matrix span:nth-child(9) { left: 80%; animation-delay: -2.2s; }
.profile-photo-wrap .profile-matrix span:nth-child(10) { left: 89%; animation-delay: -0.7s; opacity: 0.72; }
.profile-photo-wrap .profile-matrix span:nth-child(11) { left: 12%; animation-delay: -2.7s; opacity: 0.5; }
.profile-photo-wrap .profile-matrix span:nth-child(12) { left: 74%; animation-delay: -3.1s; opacity: 0.52; }

@keyframes profile-matrix-fall {
  from { transform: translateY(-18%); }
  to { transform: translateY(28%); }
}

.profile-photo-wrap .profile-photo[src$="felipe-transparent.png"] {
  position: relative !important;
  z-index: 2 !important;
  width: 112% !important;
  height: 100% !important;
  margin: -3% -6% 0 !important;
  padding: 0 !important;
  object-fit: contain !important;
  object-position: center bottom !important;
}

@media (max-width: 1180px) and (min-width: 701px) {
  .hero.section-shell {
    grid-template-columns: minmax(0, 0.98fr) minmax(320px, 0.72fr) !important;
    gap: 24px !important;
  }

  .hero-visual {
    width: min(100%, 430px) !important;
  }

  .profile-photo-wrap {
    width: min(100%, 360px) !important;
  }
}

/* QA hardening: mobile must not inherit the desktop two-column hero override. */
@media (max-width: 700px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .site-header {
    width: calc(100% - 24px) !important;
    grid-template-columns: 1fr auto !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    border-radius: 18px !important;
  }

  .brand {
    min-width: 0;
  }

  .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-links {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding: 6px 2px 2px;
    scroll-snap-type: x proximity;
  }

  .nav-links a {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .header-cta {
    justify-self: end;
    white-space: nowrap;
  }

  .hero.section-shell {
    width: min(100% - 28px, 1532px) !important;
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    padding-top: 32px !important;
  }

  .hero h1 {
    max-width: 11ch !important;
    font-size: clamp(2.35rem, 12vw, 3.7rem) !important;
    line-height: 1 !important;
  }

  .hero-text,
  .project-lead,
  .section-intro {
    max-width: 100% !important;
  }

  .hero-visual {
    width: 100% !important;
    justify-self: stretch !important;
    padding: 12px !important;
  }

  .profile-photo-wrap {
    width: min(100%, 340px) !important;
  }

  .terminal-panel.hero-capability-panel {
    grid-template-columns: 1fr 1fr !important;
  }

  .section-shell {
    width: min(100% - 28px, 1532px) !important;
  }

  .project-layout,
  .project-layout.reverse {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .project-media {
    width: 100%;
    min-width: 0;
  }

  .media-main {
    max-width: 100%;
    height: auto;
  }

  #projects-circular-gallery {
    height: 560px !important;
    min-height: 560px;
  }

  .portfolio-circular-gallery {
    --pcg-radius: 190px !important;
    --pcg-card-w: 150px !important;
    --pcg-card-h: 220px !important;
    min-height: 520px !important;
  }
}

@media (max-width: 1180px) {
  #projects-circular-gallery:has(.gallery-fallback) {
    height: auto !important;
    min-height: 0 !important;
  }
}

.gallery-fallback {
  display: grid;
}

/* QA hardening: horizontal galleries must not become page-level overflow. */
.principle-carousel,
.image-slider {
  min-width: 0;
  max-width: 100%;
  contain: paint;
}

.image-slider {
  overflow: hidden;
}

main,
.section-shell,
.projects-index,
.project-section,
.project-layout {
  min-width: 0;
  max-width: 100%;
}

/* Zoom QA: keep text and project cards balanced when the browser is zoomed. */
#projects-circular-react {
  display: none !important;
}

#projects-circular-gallery .gallery-fallback {
  position: relative;
  z-index: 1;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
  margin: 0 !important;
  padding: 4px !important;
  overflow: visible;
  scrollbar-width: auto;
}

#projects-circular-gallery .gallery-fallback .pcard {
  min-height: clamp(238px, 22vw, 320px) !important;
}

.hero h1 {
  max-width: min(15ch, 100%) !important;
  font-size: clamp(2.85rem, 3.72vw, 3.95rem) !important;
}

@media (max-width: 1180px) {
  .hero.section-shell {
    min-height: auto !important;
    padding-top: clamp(34px, 5vw, 58px) !important;
    padding-bottom: clamp(18px, 3vw, 34px) !important;
  }

  .hero h1 {
    max-width: min(18ch, 100%) !important;
    font-size: clamp(2.55rem, 4.1vw, 3.35rem) !important;
    line-height: 1 !important;
  }

  .hero-scroll-cue {
    display: none !important;
  }

  #projects-circular-gallery {
    height: auto !important;
    min-height: 0 !important;
    margin-top: 28px !important;
  }

  #projects-circular-react {
    display: none !important;
  }

  #projects-circular-gallery .gallery-fallback {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }

  .pcard {
    min-height: 218px !important;
  }

  .project-section {
    padding: clamp(56px, 7vw, 88px) 0 !important;
  }

  .project-layout,
  .project-layout.reverse {
    gap: clamp(22px, 3vw, 40px) !important;
  }

  .project-copy {
    gap: 18px !important;
  }

  .project-copy h2 {
    max-width: 780px !important;
    font-size: clamp(2rem, 4vw, 3.25rem) !important;
    line-height: 1.02 !important;
  }

  .project-copy .proof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .project-copy .proof-grid > div:nth-child(3) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .project-layout,
  .project-layout.reverse {
    grid-template-columns: 1fr !important;
  }

  .project-copy {
    order: 1;
  }

  .project-media {
    order: 2;
    position: static !important;
  }

  .project-copy h2 {
    max-width: 100% !important;
  }
}

@media (max-width: 760px) {
  .hero h1 {
    max-width: min(12ch, 100%) !important;
    font-size: clamp(2.25rem, 10.8vw, 3.35rem) !important;
  }

  .audio-compare-heading {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .audio-version-switch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audio-transport {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 12px;
  }

  .audio-play {
    width: 50px;
    height: 50px;
  }

  .audio-volume {
    grid-column: 2;
    width: min(140px, 100%);
  }

  #projects-circular-gallery .gallery-fallback {
    grid-template-columns: 1fr !important;
  }

  .pcard {
    min-height: 210px !important;
  }

  .project-copy .proof-grid {
    grid-template-columns: 1fr !important;
  }

  .project-copy .proof-grid > div:nth-child(3) {
    grid-column: auto;
  }
}

main {
  overflow-x: clip;
}

@media (max-width: 1180px) {
  .principle-carousel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
  }

  .principle-v2 {
    flex-basis: min(86vw, calc(100vw - 48px)) !important;
  }
}

@media (max-width: 1180px) {
  .blog-grid a {
    flex-basis: clamp(270px, 38vw, 340px);
  }
}

@media (max-width: 760px) {
  .blog-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .blog-grid {
    margin-inline: -20px;
    padding-inline: 20px;
  }

  .blog-grid a {
    flex-basis: min(82vw, 340px);
    min-height: 340px;
  }
}

@media (max-width: 1080px) {
  .site-header {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }

  .language-switcher {
    min-height: 38px;
    padding: 3px;
  }

  .language-switcher button {
    min-width: 34px;
    min-height: 30px;
    font-size: 0.72rem;
  }
}

@media (max-width: 700px) {
  .language-switcher {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
}
