/* Shared ASCII direction. Keep text and portfolio work in their native form. */
:root {
  --ascii-cell-width: 6px;
  --ascii-cell-height: 9px;
}
@supports (width: round(nearest, 1.5px, 1px)) {
  :root {
    --ascii-cell-width: clamp(6px, round(nearest, calc(100vw / 180), 1px), 10px);
    --ascii-cell-height: round(nearest, calc(var(--ascii-cell-width) * 1.45), 1px);
  }
}
@media(max-width:599px) {
  :root { --ascii-cell-width:4px; --ascii-cell-height:6px; }
}
.ascii-home {
  background-color: #fafafa;
  position: relative;
  isolation: isolate;
}
.ascii-hero-art {
  position: absolute; inset: 0 0 auto; height: 300px; pointer-events: none;
  background: url('../assets/images/home-ascii-seascape.png') center top / 100% auto no-repeat;
  mask-image: linear-gradient(#000 75%,transparent);
}
.ascii-home .hp-header { padding-top: 188px; }
.ascii-home .hp-main { position: relative; }
.ascii-home .hp-intro { padding-top: 32px; }
.ascii-home .hp-person { gap: 28px; }
.ascii-home .hp-person img { width: 156px; height: 156px; border-radius: 0; object-fit: contain; }
.ascii-home .hp-role { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: 13px; color: #557078; }
.ascii-home .hp-intro h1 { margin-top: 28px; }
.ascii-home .hp-preview { background-color: #f2f4f4; background-image: radial-gradient(#69858c18 .7px,transparent .7px); background-size: 8px 8px; border: 1px solid #dce3e3; }
.ascii-home .hp-project-heading > span,
.ascii-home .hp-side-heading > span { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; color: #587079; }
.ascii-home .hp-nav { background: #fafafae8; backdrop-filter: none; }
.ascii-home .hp-nav a[aria-current] { text-decoration: none; }
.ascii-home .hp-nav a[aria-current]::before { content: '['; margin-right: 6px; color: #66858a; }
.ascii-home .hp-nav a[aria-current]::after { content: ']'; margin-left: 6px; color: #66858a; }
.ascii-home .footer-copy { background: transparent; }
@media(max-width:1051px) {
  .ascii-hero-art { background-position: 32% top; }
  .ascii-home .hp-header { padding-top: 184px; }
}
@media(max-width:539px) {
  .ascii-hero-art { height: 190px; background-size: 900px 188px; background-position: 23% top; }
  .ascii-home .hp-header { padding-top: 148px; }
  .ascii-home .hp-person { gap: 20px; }
  .ascii-home .hp-person img { width: 128px; height: 128px; }
  .ascii-home .hp-role { font-size: 12px; }
  .ascii-home .hp-intro h1 { margin-top: 24px; }
  .ascii-home .hp-section-title::before,
  .ascii-home .hp-testimonials .section-head h2::before { margin-right: 8px; }
}

/* Quiet square graph paper replaces the scattered background particles. */
.ascii-current { position:fixed;inset:0;z-index:-1;pointer-events:none;background-image:linear-gradient(rgba(67,100,115,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(67,100,115,.035) 1px,transparent 1px);background-size:var(--ascii-cell-width) var(--ascii-cell-height); }
.ascii-current span { display:none; }

/* About and case studies use the same paper, ink and restrained character details. */
.ascii-home .ab-portrait { width:132px;height:132px;object-fit:contain;border-radius:0; }
.ascii-home .case-context,.ascii-home .ab-intro-role { font-family:ui-monospace,'SFMono-Regular',Consolas,monospace;color:#557078; }
.ascii-home .case-sidebar a[aria-current] { border-left-color:#42575d;color:#34494f; }
@media(max-width:539px) { .ascii-home .ab-portrait { width:104px;height:104px; } }
/* Decorative currents and album glows must never widen the document. */
.ascii-home{overflow-x:clip}

/* Real portraits and a consistent introduction hierarchy across both pages. */
.ascii-home .hp-person img,.ascii-home .ab-portrait {
  object-fit:cover;object-position:center 35%;border-radius:6px;
}
.ascii-home .hp-name {
  font-family:var(--font-heading);font-size:32px;line-height:1.3;
  font-weight:500;letter-spacing:-.035em;
}
.ascii-home .hp-role,.ascii-home .ab-intro-role {
  font-family:var(--font-body);font-size:14px;line-height:1.5;
  color:var(--ink-2);margin-top:8px;
}
[data-hero-aquarium] .hp-intro-content { position:relative;isolation:isolate; }
[data-hero-aquarium] .hp-intro-content::before {
  content:'';position:absolute;inset:-24px -28px;z-index:-1;pointer-events:none;
  background:var(--paper);
  mask-image:radial-gradient(ellipse farthest-corner,#000 42%,transparent 83%);
}
@media(max-width:539px) {
  .ascii-home .hp-name {font-size:28px;}
  .ascii-home .hp-role,.ascii-home .ab-intro-role {font-size:13px;margin-top:6px;}
  [data-hero-aquarium] .hp-person {gap:20px;}
  [data-hero-aquarium] .hp-person img {width:112px;height:112px;}
  [data-hero-aquarium] .hp-intro-content::before {inset:-16px -20px;}
}

/* Center the intro against the viewport, independently of the navigation. */
.home-page[data-hero-aquarium] .hp-header {
  padding-block: 0;
  margin-block: 0;
}
.home-page[data-hero-aquarium] .hp-intro {
  display: grid;
  align-items: center;
  min-height: 100svh;
  padding-block: 32px;
  text-align: center;
}
.home-page[data-hero-aquarium] .hp-person {
  flex-direction: column;
  gap: clamp(14px, 2.5svh, 20px);
}
.hp-intro .hp-person .hp-name { font-size: clamp(26px, 3vw, 28px); }
.hp-intro .hp-person .hp-role { margin-top: 4px; }
.home-page[data-hero-aquarium] .hp-intro h1 {
  max-width: none;
  margin-top: clamp(12px, 3.5svh - 10px, 22px);
  font-size: clamp(28px, 3.2vw, 38px); /* 38px keeps the first clause on one line in the 700px column */
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
}
.hp-intro-accent {
  position: relative;
  white-space: nowrap;
}
.hp-intro-accent::after {
  position: absolute;
  inset: auto 0 -.11em;
  height: .19em;
  content: '';
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M3 8Q100 0 197 8' fill='none' stroke='%23c9c4f8' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.home-page[data-hero-aquarium] .hp-intro-copy {
  max-width: 720px;
  margin: clamp(20px, 3svh, 24px) auto 0;
  text-wrap: pretty;
}
.hp-intro-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  margin-top: clamp(20px, 4svh, 36px);
}
.hp-intro-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid #bbb;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}
.hp-intro-action:hover { background: #eee; }
.hp-intro-action-primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 4px 12px #24242418;
}
.hp-intro-action-primary:hover { background: #424242; }
@media (max-width: 599px) {
  .hp-intro-action { padding-inline: 14px; }
}
@media(max-width:1199px) {
  .home-page[data-hero-aquarium] .hp-header {
    position: fixed;
    inset-inline: 0;
    padding-block: 16px;
  }
  .home-page[data-hero-aquarium] .hp-intro {
    grid-template-rows: minmax(68px, 1fr) auto minmax(24px, 1fr);
    padding-block: 0;
  }
  .home-page[data-hero-aquarium] .hp-intro-content { grid-row: 2; }
}
@media(max-width:359px) {
  .home-page[data-hero-aquarium] .hp-header { padding-block: 10px; }
  .home-page[data-hero-aquarium] .hp-intro {
    grid-template-rows: minmax(86px, 1fr) auto minmax(24px, 1fr);
  }
  .hp-intro-actions { gap: 8px; }
  .hp-intro-action { padding-inline: 9px; font-size: 13px; }
}
@media (max-width: 599px) and (max-height: 650px), (600px <= width < 1200px) and (max-height: 500px) {
  .home-page[data-hero-aquarium] .hp-person { gap: 8px; }
  .home-page[data-hero-aquarium] .hp-person img { width: 80px; height: 80px; }
  .home-page[data-hero-aquarium] .hp-intro h1 { margin-top: 8px; }
  .home-page[data-hero-aquarium] .hp-intro-copy { margin-top: 12px; }
  .hp-intro-actions { margin-top: 16px; }
}

/* Compact navigation follows the same reading-column edges as the content. */
@media(max-width:1199px) {
  .home-page.ascii-home .hp-nav {max-width:700px;margin-inline:auto;}
  /* Keep the compact header height while giving each control a full tap area. */
  body.home-page.ascii-home .hp-header.hp-column {padding-block:8px;}
  .home-page.ascii-home .hp-nav a,
  .home-page.ascii-home .hp-nav .pip-toggle {min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;}
}
@media(max-width:599px) {
  .home-page.ascii-home .hp-header.hp-column {padding-inline:20px;}
}
@media(max-width:359px) {
  .home-page.ascii-home .hp-nav {column-gap:7px;}
}
