html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { overflow-x: hidden !important; overflow-y: auto !important; }
.terminal-shell,.terminal-screen { min-height:100vh; overflow:visible; }
.hero-stage { grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr); }
.hero-main { width:100%; gap:0; }
.hero-stage .identity { max-width:900px; }
.hero-stage .profile-panel { position:relative; inset:auto; width:100%; max-width:520px; justify-self:end; align-self:center; padding:26px 0 26px 28px; border-left:1px solid var(--line); }
.hero-stage .profile-line { font-size:clamp(18px,1.45vw,27px); }
.hero-stage .name { font-size:clamp(54px,7vw,118px); }
.section-nav { position:sticky; top:0; z-index:15; display:flex; justify-content:flex-end; gap:10px; padding:12px clamp(28px,4vw,58px); border-top:1px solid var(--line); border-bottom:1px solid var(--line); background:rgba(7,11,18,.88); backdrop-filter:blur(14px); }
.section-nav a,.section-return { min-height:38px; display:inline-flex; align-items:center; padding:0 14px; border:1px solid var(--line); border-radius:7px; color:var(--muted); text-decoration:none; text-transform:uppercase; letter-spacing:.12em; font-size:10px; }
.section-nav a:hover,.section-nav a:focus-visible,.section-return:hover,.section-return:focus-visible { color:var(--cyan-strong); border-color:var(--cyan); outline:none; }
.single-section { position:relative; z-index:2; padding:clamp(58px,7vw,104px) clamp(28px,4vw,60px) clamp(72px,8vw,120px); border-top:1px solid var(--line); }
.single-section-header { width:min(1500px,100%); margin:0 auto 34px; display:flex; justify-content:space-between; align-items:end; gap:24px; }
.single-section-kicker,.single-section-status { color:var(--muted); text-transform:uppercase; letter-spacing:.14em; font-size:10px; }
.single-section-header h2 { margin:7px 0 0; font-family:"Orbitron","IBM Plex Mono",monospace; font-size:clamp(28px,4vw,58px); line-height:1; color:var(--cyan-strong); text-transform:uppercase; letter-spacing:.04em; }
.single-projects-section { background:linear-gradient(180deg,rgba(111,247,255,.018),transparent 30%); }
.single-projects-section .carousel { padding-top:0; }
.single-projects-section .project-heading-row h3 { margin:0; font-family:"Orbitron","IBM Plex Mono",monospace; font-size:clamp(34px,5vw,72px); line-height:1; color:var(--cyan-strong); text-transform:uppercase; }
.single-about-section .about-layout { padding-top:18px; }
.single-about-section .about-summary .about-profile-name { margin:0; font-family:"Orbitron","IBM Plex Mono",monospace; font-size:clamp(42px,6vw,86px); line-height:.95; color:var(--cyan-strong); text-transform:uppercase; }
.single-about-section .about-actions a[href="#projects"],.single-about-section .about-actions a[href="#contact"] { scroll-behavior:smooth; }
.single-contact-section .contact-layout { padding-top:18px; }
.single-contact-section .contact-intro .contact-headline { margin:0; font-family:"Orbitron","IBM Plex Mono",monospace; font-size:clamp(42px,5.5vw,82px); line-height:.95; color:var(--cyan-strong); }
html[data-theme="light"] .section-nav { background:rgba(238,244,246,.9); }
html[data-theme="light"] .single-section { background:rgba(255,255,255,.12); }
html[data-theme="light"] .single-projects-section { background:linear-gradient(180deg,rgba(0,111,123,.035),transparent 34%); }
@media (max-width:900px){
  .hero-stage { grid-template-columns:1fr; align-content:center; gap:44px; padding-top:110px; }
  .hero-stage .profile-panel { justify-self:start; max-width:100%; padding:22px 0 0; border-left:0; border-top:1px solid var(--line); }
  .section-nav { justify-content:center; }
  .single-section-header { align-items:flex-start; }
}
@media (max-width:640px){
  .section-nav { position:relative; top:auto; display:grid; grid-template-columns:repeat(3,1fr); padding:10px 16px; }
  .section-nav a { justify-content:center; padding:0 8px; }
  .single-section { padding-left:18px; padding-right:18px; }
  .single-section-header { flex-direction:column; }
  .single-section-status { text-align:left; }
  .single-projects-section .carousel-stage { grid-template-columns:36px minmax(0,1fr) 36px; }
  .single-projects-section .carousel-control { width:34px; }
}

/* ========================================================================== 
   Navigation alignment + editorial two-column project layout
   ========================================================================== */

/* Keep the sticky section menu away from the fixed controls on the right. */
.section-nav {
  justify-content: flex-start;
}

/* Project: image on the left, case-study information on the right. */
.single-projects-section .project-slide {
  width: 100%;
}

.single-projects-section .project-primary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: clamp(32px, 4.5vw, 76px);
  align-items: start;
}

.single-projects-section .project-visual {
  position: sticky;
  top: 82px;
}

.single-projects-section .project-screen {
  aspect-ratio: 4 / 3;
  min-height: 0;
}

.single-projects-section .project-copy {
  margin-top: 0;
}

.single-projects-section .project-heading-row {
  padding: 0 0 24px;
}

.single-projects-section .project-heading-row h3 {
  font-size: clamp(34px, 4.2vw, 68px);
}

.single-projects-section .project-summary {
  margin-top: 24px;
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.72;
}

.single-projects-section .project-description {
  display: grid;
  gap: 22px;
  margin-top: 30px;
}

.single-projects-section .project-description .info-block {
  padding-top: 16px;
}

/* Secondary project data spans the full carousel width below both columns. */
.single-projects-section .project-lower-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(250px, 0.8fr) minmax(180px, 0.42fr);
  gap: clamp(22px, 3vw, 48px);
  align-items: start;
  margin-top: clamp(32px, 4vw, 56px);
  padding-top: 2px;
}

.single-projects-section .project-lower-row .info-block {
  min-width: 0;
}

.single-projects-section .project-highlights {
  display: block;
}

.single-projects-section .highlight-row {
  grid-template-columns: 66px minmax(0, 1fr);
}

.single-projects-section .project-actions {
  margin-top: 14px;
  align-self: start;
}

.single-projects-section .action-link {
  width: 100%;
}

@media (max-width: 1100px) {
  .single-projects-section .project-primary-grid {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.9fr);
    gap: 34px;
  }

  .single-projects-section .project-lower-row {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.7fr);
  }

  .single-projects-section .project-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
  }

  .single-projects-section .action-link {
    width: auto;
    min-width: 180px;
  }
}

@media (max-width: 820px) {
  .single-projects-section .project-primary-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .single-projects-section .project-visual {
    position: relative;
    top: auto;
  }

  .single-projects-section .project-screen {
    aspect-ratio: 16 / 10;
  }

  .single-projects-section .project-information {
    max-width: 760px;
  }

  .single-projects-section .project-lower-row {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .section-nav {
    justify-content: flex-start;
  }

  .single-projects-section .project-primary-grid {
    gap: 22px;
  }

  .single-projects-section .project-screen {
    aspect-ratio: 4 / 3;
  }

  .single-projects-section .project-heading-row {
    padding-bottom: 18px;
  }

  .single-projects-section .project-description {
    gap: 18px;
    margin-top: 24px;
  }

  .single-projects-section .project-lower-row {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 34px;
  }

  .single-projects-section .project-actions {
    display: grid;
  }

  .single-projects-section .action-link {
    width: 100%;
  }
}

/* ========================================================================== 
   Revision 4 — zoom resilience, expanded hero profile, project hierarchy,
   contact motion
   ========================================================================== */

/* Keep the principal content on a predictable readable canvas. */
.hero-stage,
.single-section > .single-section-header,
.single-projects-section .carousel,
.single-about-section .about-layout,
.single-contact-section .contact-layout {
  width: min(1540px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.hero-stage {
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: clamp(34px, 5vw, 82px);
}

.hero-main,
.hero-stage .identity,
.hero-stage .profile-panel,
.single-projects-section .project-information,
.single-projects-section .project-lower-row > * {
  min-width: 0;
}

.hero-stage .name,
.single-section-header h2,
.single-projects-section .project-heading-row h3,
.single-about-section .about-summary .about-profile-name,
.single-contact-section .contact-intro .contact-headline {
  overflow-wrap: anywhere;
}

/* Right-side hero panel: normal dynamic view -> full indexed profile on hover. */
.profile-panel--interactive {
  overflow: hidden;
  max-width: 560px !important;
  min-height: 250px;
  padding: 28px 0 28px 30px !important;
  transition:
    max-width 220ms ease,
    border-color 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease;
}

.profile-panel--interactive::before {
  content: "";
  position: absolute;
  inset: 0 0 0 14px;
  z-index: -1;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(111,247,255,.025), transparent 72%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.profile-panel--interactive:hover::before,
.profile-panel--interactive.is-expanded::before {
  opacity: 1;
}

.profile-panel--interactive .profile-lines {
  max-height: 180px;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 140ms ease,
    transform 180ms ease,
    max-height 220ms ease;
}

.profile-panel--interactive .profile-expanded {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 220ms ease,
    max-height 320ms ease;
}

.profile-panel--interactive:hover .profile-lines,
.profile-panel--interactive.is-expanded .profile-lines {
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.profile-panel--interactive:hover .profile-expanded,
.profile-panel--interactive.is-expanded .profile-expanded {
  max-height: 720px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.profile-expanded__grid {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.profile-expanded__block {
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(8px);
}

.profile-panel--interactive:hover .profile-expanded__block,
.profile-panel--interactive.is-expanded .profile-expanded__block {
  animation: profile-block-in 260ms ease forwards;
  animation-delay: calc(var(--reveal-order) * 70ms + 80ms);
}

.profile-expanded__label {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.profile-expanded__block strong {
  color: var(--cyan-strong);
  font-size: clamp(12px, 1vw, 15px);
  line-height: 1.45;
  font-weight: 600;
}

.profile-expanded__block > span:last-child {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

@keyframes profile-block-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Projects: image dominates, only essential narrative stays beside it. */
.single-projects-section .project-primary-grid {
  grid-template-columns: minmax(0, 1.62fr) minmax(300px, 0.58fr);
  gap: clamp(28px, 3.8vw, 62px);
  align-items: start;
}

.single-projects-section .project-visual {
  position: relative;
  top: auto;
}

.single-projects-section .project-screen {
  aspect-ratio: 16 / 10;
  width: 100%;
}

.single-projects-section .project-heading-row {
  display: grid;
  gap: 14px;
  padding-bottom: 20px;
}

.single-projects-section .project-heading-row h3 {
  font-size: clamp(30px, 3.3vw, 54px);
}

.single-projects-section .project-status-pill {
  justify-self: start;
}

.single-projects-section .project-summary {
  margin-top: 18px;
  font-size: clamp(14px, 1vw, 17px);
  line-height: 1.68;
}

.single-projects-section .project-description {
  margin-top: 24px;
}

.single-projects-section .project-description .info-block {
  padding-top: 14px;
}

.single-projects-section .project-lower-row {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(230px, .7fr) minmax(210px, .62fr);
  gap: clamp(22px, 3vw, 44px);
  align-items: start;
  margin-top: clamp(34px, 4vw, 58px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.single-projects-section .project-details-wide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 34px;
}

.single-projects-section .project-details-wide .info-block {
  min-width: 0;
  padding-top: 0;
}

.single-projects-section .project-details-wide #improvementsBlock:not([hidden]) {
  grid-column: 1 / -1;
}

.single-projects-section .project-tech-block,
.single-projects-section .project-highlights {
  padding-top: 0;
}

.single-projects-section .project-actions {
  grid-column: 3;
  margin-top: 0;
}

/* About is intentionally informational only. */
.single-about-section .about-hero {
  padding-bottom: 10px;
}

/* Contact motion: narrative types in; form enters as staged terminal blocks. */
.contact-motion-section [data-contact-typewrite="headline"] {
  min-height: 1.9em;
  white-space: pre-line;
}

.contact-motion-section [data-contact-typewrite="intro"] {
  min-height: 5.2em;
}

.contact-is-typing::after {
  content: "_";
  margin-left: .08em;
  color: var(--cyan);
  animation: contact-cursor 620ms steps(1, end) infinite;
}

@keyframes contact-cursor {
  50% { opacity: 0; }
}

.contact-motion-section .contact-form-panel > .panel-header,
.contact-motion-section .contact-form-panel > .form-progress,
.contact-motion-section .contact-form-panel > .contact-form {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.contact-motion-section.is-contact-visible .contact-form-panel > .panel-header {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 180ms;
}

.contact-motion-section.is-contact-visible .contact-form-panel > .form-progress {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 330ms;
}

.contact-motion-section.is-contact-visible .contact-form-panel > .contact-form {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 500ms;
}

/* Zoom / reduced viewport resilience. Browser zoom effectively reduces CSS px width,
   so these breakpoints intentionally activate earlier than phone/tablet breakpoints. */
@media (max-width: 1240px) {
  .hero-stage {
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, .88fr);
    gap: 34px;
    padding-left: clamp(22px, 3vw, 42px);
    padding-right: clamp(22px, 3vw, 42px);
  }

  .hero-stage .name {
    font-size: clamp(48px, 6.2vw, 88px);
  }

  .single-projects-section .project-primary-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
    gap: 30px;
  }

  .single-projects-section .project-lower-row {
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, .75fr);
  }

  .single-projects-section .project-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .single-projects-section .action-link {
    width: auto;
    min-width: 180px;
  }

  .single-about-section .about-layout,
  .single-contact-section .contact-layout {
    gap: clamp(32px, 4vw, 54px);
  }
}

@media (max-width: 1120px) {
  .hero-stage {
    min-height: auto;
    grid-template-columns: 1fr;
    align-content: start;
    padding-top: 118px;
    padding-bottom: 64px;
  }

  .hero-main {
    max-width: 900px;
  }

  .hero-stage .profile-panel {
    justify-self: stretch;
    max-width: 900px !important;
    padding: 22px 0 0 !important;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .profile-panel--interactive::before {
    inset: 10px 0 0;
  }

  .single-projects-section .project-primary-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(270px, .7fr);
  }

  .single-about-section .about-layout,
  .single-contact-section .contact-layout {
    grid-template-columns: 1fr;
  }

  .single-about-section .about-hero {
    position: relative;
    top: auto;
    max-width: 760px;
  }

  .single-contact-section .contact-intro {
    max-width: 800px;
  }

  .single-contact-section .contact-methods {
    margin-top: 30px;
  }
}

@media (max-width: 900px) {
  .single-projects-section .project-primary-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .single-projects-section .project-information {
    max-width: 780px;
  }

  .single-projects-section .project-lower-row {
    grid-template-columns: 1fr 1fr;
  }

  .single-projects-section .project-details-wide,
  .single-projects-section .project-actions {
    grid-column: 1 / -1;
  }

  .single-projects-section .project-details-wide {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .hero-stage {
    padding-top: 108px;
  }

  .profile-panel--interactive {
    min-height: 220px;
  }

  .profile-expanded__block {
    padding: 12px 0;
  }

  .single-projects-section .project-lower-row,
  .single-projects-section .project-details-wide {
    grid-template-columns: 1fr;
  }

  .single-projects-section .project-details-wide #improvementsBlock:not([hidden]) {
    grid-column: auto;
  }

  .single-projects-section .project-actions {
    display: grid;
  }

  .single-projects-section .action-link {
    width: 100%;
    min-width: 0;
  }

  .contact-motion-section [data-contact-typewrite="headline"] {
    min-height: 2.1em;
  }

  .contact-motion-section [data-contact-typewrite="intro"] {
    min-height: 6.8em;
  }
}

@media (hover: none) {
  .profile-panel--interactive .profile-expanded {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-expanded__block,
  .contact-motion-section .contact-form-panel > .panel-header,
  .contact-motion-section .contact-form-panel > .form-progress,
  .contact-motion-section .contact-form-panel > .contact-form {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }

  .contact-is-typing::after {
    animation: none;
  }
}

/* ========================================================================== 
   Revision 5 — profile line cursor + final project hierarchy
   ========================================================================== */

/* Expanded profile: all rows expose an underscore immediately, then each line
   types in sequence. This replaces the previous block-fade reveal. */
.profile-expanded__block,
.profile-panel--interactive:hover .profile-expanded__block,
.profile-panel--interactive.is-expanded .profile-expanded__block {
  opacity: 1;
  transform: none;
  animation: none;
}

.profile-hover-line {
  display: block;
  min-height: 1.45em;
}

.profile-hover-line.is-profile-typing::after {
  content: "_";
  display: inline-block;
  margin-left: .08em;
  color: var(--cyan);
  animation: profile-line-cursor 620ms steps(1, end) infinite;
}

@keyframes profile-line-cursor {
  50% { opacity: 0; }
}

/* Projects: screenshot + short summary above, two explicit information rows below. */
.single-projects-section .project-primary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(280px, .58fr);
  gap: clamp(28px, 3.8vw, 62px);
  align-items: start;
}

.single-projects-section .project-information {
  align-self: start;
}

.single-projects-section .project-summary {
  max-width: 46ch;
}

.single-projects-section .project-narrative-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 34px);
  margin-top: clamp(34px, 4vw, 58px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.single-projects-section .project-narrative-row .info-block,
.single-projects-section .project-meta-row .info-block {
  min-width: 0;
  padding-top: 0;
  border-top: 0;
}

.single-projects-section .project-narrative-row #improvementsBlock:not([hidden]) {
  display: block;
}

.single-projects-section .project-meta-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, .72fr) minmax(190px, .5fr);
  gap: clamp(20px, 2.8vw, 40px);
  align-items: start;
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.single-projects-section .project-meta-row .project-actions {
  display: grid;
  gap: 10px;
  margin-top: 0;
  align-self: start;
}

.single-projects-section .project-meta-row .action-link {
  width: 100%;
}

@media (max-width: 1240px) {
  .single-projects-section .project-primary-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(270px, .65fr);
  }

  .single-projects-section .project-narrative-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .single-projects-section .project-meta-row {
    grid-template-columns: minmax(0, 1fr) minmax(220px, .75fr);
  }

  .single-projects-section .project-meta-row .project-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
  }

  .single-projects-section .project-meta-row .action-link {
    width: auto;
    min-width: 180px;
  }
}

@media (max-width: 900px) {
  .single-projects-section .project-primary-grid {
    grid-template-columns: 1fr;
  }

  .single-projects-section .project-summary {
    max-width: 68ch;
  }
}

@media (max-width: 680px) {
  .single-projects-section .project-narrative-row,
  .single-projects-section .project-meta-row {
    grid-template-columns: 1fr;
  }

  .single-projects-section .project-meta-row .project-actions {
    grid-column: auto;
    display: grid;
  }

  .single-projects-section .project-meta-row .action-link {
    width: 100%;
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-hover-line.is-profile-typing::after {
    animation: none;
  }
}

/* ========================================================================== 
   Revision 8 — project actions beside screenshot + stable hover title
   ========================================================================== */
.single-projects-section .project-actions--primary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.single-projects-section .project-actions--primary .action-link {
  width: auto;
  min-width: 150px;
}

.single-projects-section .project-meta-row {
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, .75fr);
}

.profile-panel--interactive.is-expanded #profileMode {
  min-width: 7ch;
}

@media (max-width: 680px) {
  .single-projects-section .project-actions--primary {
    display: grid;
  }

  .single-projects-section .project-actions--primary .action-link {
    width: 100%;
    min-width: 0;
  }
}

/* ========================================================================== 
   Revision 11 — full project screenshots + technology strip
   ========================================================================== */
.single-projects-section .project-screen {
  aspect-ratio: 1800 / 981;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(35, 217, 255, 0.035), rgba(140, 123, 255, 0.035)),
    #090f17;
}

.single-projects-section .project-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.single-projects-section .project-tech-strip {
  display: grid;
  grid-template-columns: minmax(110px, .22fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 14px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
}

.single-projects-section .project-tech-strip .info-label {
  margin: 4px 0 0;
}

.single-projects-section .project-tech-strip .tech-stack {
  margin: 0;
}

@media (max-width: 680px) {
  .single-projects-section .project-tech-strip {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}


/* ==========================================================================
   Production hardening — v12 audit fixes
   ========================================================================== */
.single-about-section .about-summary .about-profile-name {
  margin: 0;
  max-width: 8ch;
  font-family: "Orbitron", "IBM Plex Mono", monospace;
  font-size: clamp(38px, 4.5vw, 68px);
  line-height: .98;
  color: var(--cyan-strong);
  letter-spacing: -.035em;
  text-transform: uppercase;
  text-shadow: 0 0 24px rgba(111,247,255,.08);
}

.single-contact-section .contact-intro .contact-headline {
  margin: 0;
  max-width: 8.6ch;
  font-family: "Orbitron", "IBM Plex Mono", monospace;
  font-size: clamp(54px, 5.5vw, 82px);
  line-height: .95;
  letter-spacing: -.035em;
  color: var(--cyan-strong);
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.section-nav a,
.section-return {
  min-height: 44px;
}

.global-link {
  width: 44px;
  height: 44px;
  min-width: 44px;
}

.global-link--cv {
  width: auto;
  min-width: 66px;
}

.theme-button {
  min-height: 44px;
}

.language-switch {
  min-height: 44px;
  padding: 4px 6px;
}

.lang-button {
  min-width: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border-radius: 6px;
}

.carousel-dots {
  align-items: center;
  gap: 2px;
}

.carousel-dot,
.carousel-dot.is-active {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  background: transparent;
}

.carousel-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 3px;
  transform: translate(-50%, -50%);
  background: #24414a;
  transition: width .18s ease, background .18s ease;
}

.carousel-dot.is-active::after {
  width: 38px;
  background: var(--cyan);
}

.carousel-control {
  min-width: 44px;
}

.form-privacy {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.form-privacy a {
  color: var(--cyan);
  text-underline-offset: 3px;
}

.form-privacy a:hover,
.form-privacy a:focus-visible {
  color: var(--cyan-strong);
  outline: none;
}

@media (max-width: 760px) and (min-width: 561px) {
  .global-links {
    right: 190px;
  }
}

@media (max-width: 640px) {
  .single-projects-section .carousel-stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .single-projects-section .carousel-control {
    width: 48px;
    min-width: 48px;
  }

  .lang-button {
    min-width: 40px;
    min-height: 40px;
  }

  .single-contact-section .contact-intro .contact-headline {
    font-size: clamp(46px, 13vw, 72px);
  }
}

@media (orientation: landscape) and (max-width: 640px) and (max-height: 520px) {
  .single-projects-section .carousel-stage {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
  }

  .single-projects-section .carousel-control {
    position: sticky;
    bottom: auto;
    width: 48px;
    height: 48px;
    border-radius: 8px;
  }
}

/* ==========================================================================
   Revision 13 — compact utility controls + mobile landscape hardening
   ========================================================================== */

/*
 * This site now uses .terminal-screen only as the single-page document canvas.
 * main.css still contains legacy landscape rules for the former split home.
 * Explicitly isolate the current page so those rules cannot turn the whole
 * document into a two-column grid on short landscape viewports.
 */
.terminal-screen {
  display: block;
  grid-template-columns: none;
  grid-template-areas: none;
  gap: 0;
  padding: 0;
}

/* The system readout belongs to the hero overlay. main.css makes it a normal
 * flow item below 980px; restore the single-page composition explicitly. */
.hero-stage .system-header {
  position: absolute;
  inset: auto;
  top: clamp(24px, 4vw, 48px);
  left: clamp(22px, 4vw, 58px);
  width: auto;
  order: initial;
}

.hero-stage .profile-panel,
.hero-stage .identity {
  order: initial;
}

/* Restore the compact proportions from the pre-v12 navigation controls. */
.section-nav a,
.section-return {
  min-height: 38px;
}

.global-links,
.theme-switch,
.language-switch {
  top: 15px;
}

.global-link {
  width: 32px;
  height: 32px;
  min-width: 0;
}

.global-link--cv {
  width: auto;
  min-width: 58px;
  padding-inline: 9px;
}

.theme-button {
  min-height: 32px;
}

.language-switch {
  min-height: 0;
  padding: 7px 9px;
}

.lang-button {
  min-width: 0;
  min-height: 0;
  display: inline-block;
  padding: 0;
  border-radius: 0;
}

/* Keep the utility controls and the sticky section links on the same visual
 * centerline once the section navigation reaches the top of the viewport. */
@media (min-width: 761px) {
  .section-nav {
    min-height: 62px;
    align-items: center;
  }
}

/* Undo the v12 stretch bug: contact.css deliberately moves this group to the
 * left on compact viewports. It must not have left and right set together. */
@media (max-width: 760px) {
  .global-links,
  .theme-switch,
  .language-switch {
    top: 12px;
  }

  .global-links {
    left: 14px;
    right: auto;
    gap: 4px;
  }

  .global-link {
    width: 30px;
    height: 30px;
  }

  .global-link--cv {
    width: auto;
    min-width: 52px;
    padding-inline: 7px;
  }

  .theme-button {
    min-height: 32px;
  }

  .language-switch {
    min-height: 0;
    padding: 7px 9px;
  }
}

/* Mobile landscape: use the available width without forcing the old split-page
 * layout, reduce vertical dead space, and keep every section in normal flow. */
@media (orientation: landscape) and (max-height: 620px) {
  html {
    scroll-padding-top: 58px;
  }

  .hero-stage {
    min-height: auto;
    padding-top: 82px;
    padding-bottom: 34px;
    gap: 24px;
    align-content: start;
  }

  .hero-stage .system-header {
    top: 18px;
    left: clamp(18px, 3vw, 32px);
    max-width: calc(100% - 360px);
    font-size: 9px;
    line-height: 1.45;
  }

  .hero-stage .name {
    font-size: clamp(40px, 6vw, 58px);
    line-height: .92;
  }

  .identity-role {
    margin-top: 12px;
  }

  .identity-meta {
    margin-top: 10px;
    font-size: 9px;
    line-height: 1.5;
  }

  .hero-stage .profile-panel,
  .profile-panel--interactive {
    min-height: 0;
    max-width: 100% !important;
    padding-top: 16px !important;
    padding-bottom: 0 !important;
  }

  .hero-stage .profile-line {
    font-size: clamp(15px, 2.2vw, 20px);
    line-height: 1.35;
  }

  .profile-heading {
    margin-bottom: 10px;
  }

  .single-section {
    padding-top: 44px;
    padding-bottom: 58px;
  }

  .single-section-header {
    margin-bottom: 22px;
  }

  .single-section-header h2 {
    font-size: clamp(28px, 5vw, 44px);
  }

  .single-projects-section .project-narrative-row {
    margin-top: 28px;
    padding-top: 20px;
  }

  .single-about-section .about-layout,
  .single-contact-section .contact-layout {
    padding-top: 8px;
  }

  .single-contact-section .contact-intro .contact-headline {
    font-size: clamp(42px, 7vw, 60px);
  }

  .single-contact-section .contact-form-panel {
    min-height: 0;
  }
}

/* On wider phones in landscape, use two project columns instead of stacking a
 * large screenshot above the complete case-study copy. */
@media (orientation: landscape) and (min-width: 720px) and (max-width: 960px) and (max-height: 620px) {
  .single-projects-section .project-primary-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(230px, .65fr);
    gap: 22px;
    align-items: start;
  }

  .single-projects-section .project-screen {
    max-height: none;
  }

  .single-projects-section .project-heading-row h3 {
    font-size: clamp(28px, 4.2vw, 42px);
  }

  .single-projects-section .project-summary {
    margin-top: 14px;
    font-size: 13px;
    line-height: 1.55;
  }

  .single-projects-section .project-actions--primary {
    margin-top: 18px;
  }

  .single-projects-section .project-actions--primary .action-link {
    min-width: 0;
  }
}

/* Very small landscape phones need the carousel arrows in-flow, but the arrows
 * should stay compact rather than consume the width introduced by v12. */
@media (orientation: landscape) and (max-width: 640px) and (max-height: 520px) {
  .single-projects-section .carousel-stage {
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    gap: 8px;
  }

  .single-projects-section .carousel-control {
    position: sticky;
    bottom: auto;
    width: 32px;
    min-width: 32px;
    height: 48px;
    border-radius: 8px;
  }
}

/* Portrait/mobile remains one-column; do not let the compact landscape rule
 * alter the fix that prevents the project card from collapsing below 640px. */
@media (orientation: portrait) and (max-width: 640px) {
  .single-projects-section .carousel-stage {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Language stays visually compact while retaining the WCAG 2.2 minimum target. */
.language-switch {
  gap: 4px;
  padding: 3px 6px;
}

.lang-button {
  min-width: 24px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 760px) {
  .language-switch {
    padding: 3px 6px;
  }
}

/* main.css assigns named grid areas in its legacy landscape layout. Those names
 * create implicit tracks when the same elements live inside .hero-stage. */
@media (orientation: landscape) and (max-height: 700px) {
  .hero-stage .system-header,
  .hero-stage .profile-panel,
  .hero-stage .identity {
    grid-area: auto;
  }
}

@media (orientation: landscape) and (max-width: 760px) and (max-height: 620px) {
  /* The status readout is secondary information; hiding it avoids competing
     with the compact utility controls on phones that place those controls on
     both sides of the top edge. */
  .hero-stage .system-header {
    display: none;
  }
}

@media (orientation: landscape) and (min-width: 641px) and (max-width: 760px) and (max-height: 620px) {
  .global-links,
  .theme-switch,
  .language-switch {
    top: 16px;
  }
}

/* 641–760px landscape is the only range where professional links live on the
 * left while theme/language live on the right and the section nav is sticky.
 * Reserve those side lanes so the three section links occupy the true center. */
@media (orientation: landscape) and (min-width: 641px) and (max-width: 760px) and (max-height: 620px) {
  .section-nav {
    justify-content: center;
    gap: 6px;
    padding-left: 148px;
    padding-right: 142px;
  }

  .section-nav a {
    padding-inline: 10px;
  }
}

/* Compact portrait phones keep the status block below the utility controls
 * instead of underneath them. */
@media (orientation: portrait) and (max-width: 760px) {
  .hero-stage {
    padding-top: 118px;
  }

  .hero-stage .system-header {
    display: grid;
    top: 54px;
    left: clamp(16px, 4vw, 22px);
    max-width: calc(100% - 32px);
    font-size: 9px;
    line-height: 1.45;
  }
}
