/* Demo 02: portrait introduction, stacked case studies, and a rounded reading chapter. */
html { scroll-padding-top: 110px; }
.site-header { gap: 24px; }
.brand-mark { display: flex; justify-content: center; letter-spacing: -.1em; padding-right: 2px; }
.micro-label { font: 10px var(--mono); letter-spacing: .1em; }

.identity-hero { position: relative; min-height: 810px; height: min(950px, 100svh); background: #11151b; overflow: hidden; }
.identity-stage { position: relative; height: 100%; min-height: inherit; padding-top: 122px; isolation: isolate; }
.identity-topline { display: flex; justify-content: space-between; align-items: center; color: #9da5ab; font: 10px var(--mono); letter-spacing: .1em; }
.identity-topline>span:first-child { display: flex; align-items: center; gap: 10px; }
.identity-topline .status-dot { display: inline-block; }
.identity-title { position: relative; margin: 28px 0 0; z-index: 1; animation: identityEnter .85s cubic-bezier(.2,.7,.2,1) both; }
.identity-greeting { display: block; font-size: clamp(26px, 3vw, 44px); font-weight: 500; line-height: 1.25; letter-spacing: -.035em; color: #bdc2c8; }
.identity-name { display: block; font-size: clamp(108px, 17.7vw, 270px); font-weight: 800; letter-spacing: -.085em; line-height: 1.12; background: linear-gradient(170deg, #f6f4f1 22%, #c1c7d1 60%, #828a99); -webkit-background-clip: text; background-clip: text; color: transparent; }
.identity-dot { color: var(--peach); }
.identity-portrait { position: absolute; z-index: 2; top: 210px; bottom: 22px; left: 32%; width: 56%; pointer-events: none; mix-blend-mode: lighten; animation: portraitEnter 1.1s .14s cubic-bezier(.2,.7,.2,1) both; }
.identity-portrait img { width: 100%; height: 100%; object-fit: contain; object-position: center; mask-image: radial-gradient(ellipse 53% 53% at 50% 49%, #000 55%, transparent 98%); }
.identity-description { position: absolute; bottom: 165px; left: 0; z-index: 3; animation: identityEnter .8s .3s both; }
.identity-description .micro-label { color: var(--peach); }
.identity-description p { font-size: clamp(17px, 1.9vw, 26px); line-height: 1.7; margin: 19px 0 15px; letter-spacing: -.03em; }
.placeholder-label, .portrait-caption { font-size: 10px; color: #89949e; letter-spacing: .04em; }
.identity-action { position: absolute; bottom: 112px; right: 0; z-index: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 23px; animation: identityEnter .8s .4s both; }
.pill-link { display: flex; align-items: center; gap: 55px; border: 1px solid #b7a4bf; padding: 18px 23px; border-radius: 40px; color: #191821; background: linear-gradient(120deg, #ddcdf1, #e9cab9); font-size: 13px; transition: transform .25s, box-shadow .25s; }
.pill-link:hover { transform: translateY(-3px); box-shadow: 0 8px 35px #d5c8f430; }
.pill-link span { font-size: 20px; }
.identity-baseline { position: absolute; bottom: 31px; left: 0; right: 0; display: flex; justify-content: space-between; font: 10px var(--mono); letter-spacing: .09em; color: #8a939e; }

.work-section { padding: 110px 0 120px; }
.work-section .section-heading { margin-bottom: 45px; }
.project-index { display: flex; flex-wrap: wrap; border-top: 1px solid #495058; border-bottom: 1px solid #495058; margin-bottom: 65px; }
.project-index a { flex: 1; min-width: 150px; padding: 20px 15px; font-size: 12px; display: flex; align-items: center; gap: 12px; transition: background .25s, color .25s; }
.project-index a:first-child { padding-left: 0; }
.project-index a>span:first-child { color: #76818b; font: 10px var(--mono); }
.project-index a>span:last-child { margin-left: auto; color: #7d8994; }
.project-index a:hover { background: #242932; color: var(--lavender); }
.project-index a[aria-current] { color: var(--lavender); background: #2c2d3a; box-shadow: inset 0 -2px var(--lavender); }
.project-index a[aria-current]>span { color: inherit; }
.project-index a:focus-visible { outline: 2px solid var(--lavender); outline-offset: -4px; }
.featured-stack { position: relative; display: flex; flex-direction: column; gap: 150px; padding-bottom: 60px; }
.feature-project { position: sticky; top: calc(105px + var(--stack-order) * 17px); z-index: calc(2 + var(--stack-order)); scroll-margin-top: 15px; }
.feature-surface { padding: 30px; background: #181e24; border: 1px solid #606874; border-radius: 27px; transform-origin: 50% 0; box-shadow: 0 -15px 65px #090d1360; }
.feature-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.feature-identity { display: flex; align-items: center; gap: 24px; }
.feature-number { font-size: 62px; font-weight: 800; line-height: 1; letter-spacing: -.07em; color: var(--feature-accent); }
.feature-identity .micro-label { color: #a8b2bd; font-size: 9px; }
.feature-identity h3 { margin: 7px 0 0; font-size: 27px; font-weight: 700; line-height: 1; letter-spacing: -.04em; }
.feature-demo-label { padding: 8px 13px; border: 1px solid #59616b; color: #b1b9c0; border-radius: 24px; font-size: 10px; }
.feature-mosaic { display: grid; grid-template-columns: 30% minmax(0, 1fr); gap: 16px; height: clamp(310px, 37vw, 450px); }
.feature-side { display: grid; grid-template-rows: 3fr 2fr; gap: 12px; min-height: 0; }
.feature-statement { position: relative; border-radius: 15px; background: var(--feature-accent); color: #29312d; padding: 25px; overflow: hidden; }
.feature-statement .micro-label { opacity: .68; font-size: 9px; }
.feature-statement h4 { margin: 19px 0 0; font-size: clamp(22px, 2.15vw, 34px); line-height: 1.35; font-weight: 600; letter-spacing: -.055em; position: relative; z-index: 1; }
.specimen-name { position: absolute; bottom: -10px; right: 10px; font: 800 clamp(36px, 5.2vw, 78px)/.85 var(--body); letter-spacing: -.07em; opacity: .075; }
.feature-detail-crop { position: relative; overflow: hidden; min-height: 0; border-radius: 15px; background: #dbe3da; }
.feature-detail-crop img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; filter: saturate(.5); }
.feature-detail-crop>span { position: absolute; bottom: 12px; left: 12px; color: #fff; background: #1a252bcd; border-radius: 20px; padding: 6px 9px; font-size: 9px; }
.feature-main-media { position: relative; min-width: 0; padding: 0; background: #e8e8e0; border: none; border-radius: 15px; overflow: hidden; cursor: pointer; }
.feature-main-media>img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.feature-main-media:hover>img, .feature-main-media:focus-visible>img { transform: scale(1.025); }
.media-corner { position: absolute; bottom: 19px; right: 19px; color: #fff; background: #162027eb; display: flex; align-items: center; gap: 25px; padding: 12px 17px; border-radius: 26px; font-size: 11px; box-shadow: 0 5px 22px #0003; transition: background .25s; }
.media-corner span { font-size: 18px; }
.feature-main-media:hover .media-corner { background: #34454b; }
.feature-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 23px; }
.feature-footer>span { font-size: 10px; color: #aab2ba; }
.feature-footer>div { display: flex; align-items: center; gap: 24px; }
.text-action, .feature-action { border: none; cursor: pointer; font: 11px var(--body); }
.text-action { padding: 10px 0; color: #c4ccd3; background: none; }
.text-action:hover { color: var(--feature-accent); }
.text-action span { padding-left: 6px; }
.feature-action { border: 1px solid #7d8a95; border-radius: 30px; padding: 11px 17px; background: transparent; color: #e3e9ec; }
.feature-action span { padding-left: 22px; }
.feature-action:hover { background: var(--feature-accent); color: #172229; border-color: var(--feature-accent); }
.more-heading { display: flex; justify-content: space-between; align-items: baseline; margin: 80px 0 32px; border-top: 1px solid #46505a; padding-top: 30px; }
.more-heading h3 { font-size: 34px; letter-spacing: -.06em; margin: 0; }
.more-heading>span { color: #7d8994; font: 10px var(--mono); letter-spacing: .08em; }
.more-projects { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.more-projects .project-card:nth-child(n) { grid-column: auto; scroll-margin-top: 20px; }
.more-projects .project-card:nth-child(n) .project-visual { aspect-ratio: .88; border-radius: 18px; }
.more-projects .project-preview { bottom: 10%; top: 10%; }
.more-projects .project-open { opacity: 1; transform: none; }
.more-projects .mock-signal .pulse, .more-projects .focus-spark { animation: none; }

.reading-panel { position: relative; z-index: 5; border-radius: 40px 40px 0 0; overflow: clip; background: var(--paper); }
.about-section { background: transparent; padding: 120px 0 110px; }
.about-layout { grid-template-columns: 24% minmax(0, 76%); gap: 30px; }
.about-main h2 { font-size: clamp(48px, 6.3vw, 95px); }
.about-main>p { font-size: 17px; max-width: 640px; }
.notes-section { background: transparent; padding-bottom: 120px; }
.project-dialog { border-radius: 24px; }
.project-dialog[open] { animation: dialogEnter .3s cubic-bezier(.2,.7,.2,1); }
.project-dialog[open]::backdrop { animation: backdropEnter .3s ease; }
.dialog-hero { padding-top: 66px; }
.dialog-close { border-radius: 50%; }
.note-arrow { display: none; }
.note-card:hover { transform: none; background: transparent; }

@keyframes identityEnter { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes portraitEnter { from { opacity: 0; transform: translateY(36px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes dialogEnter { from { opacity: 0; transform: translateY(24px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes backdropEnter { from { opacity: 0; } to { opacity: 1; } }

@media (min-width: 801px) and (max-height: 780px) {
  .feature-mosaic { height: 315px; }
  .feature-surface { padding: 22px; }
  .feature-heading { margin-bottom: 20px; }
  .feature-number { font-size: 48px; }
  .feature-statement { padding: 18px; }
  .feature-statement h4 { font-size: 24px; }
}
@media (max-width: 1000px) {
  .identity-hero { min-height: 770px; }
  .identity-portrait { left: 25%; width: 65%; top: 225px; }
  .identity-description { bottom: 135px; }
  .feature-surface { padding: 22px; }
  .feature-mosaic { grid-template-columns: 33% minmax(0, 1fr); height: 350px; }
  .feature-statement { padding: 18px; }
  .feature-statement h4 { font-size: 25px; }
  .feature-number { font-size: 50px; }
  .project-index a { flex: 1 0 30%; }
  .project-index a:first-child { padding-left: 15px; }
}
@media (max-width: 800px), (max-height: 650px) {
  .feature-project { position: relative; top: auto; }
  .featured-stack { gap: 35px; padding-bottom: 0; }
  .feature-surface { transform: none!important; filter: none!important; }
}
@media (max-width: 700px) {
  html { scroll-padding-top: 85px; }
  .site-header { gap: 10px; }
  .brand { gap: 8px; font-size: 9px; letter-spacing: .07em; }
  .brand-mark { width: 27px; height: 27px; flex-shrink: 0; }
  .header-action { padding: 9px 10px; }
  .menu-toggle { flex: 0 0 28px; margin-left: 0; }
  .identity-hero { min-height: 740px; height: 94svh; max-height: 900px; }
  .identity-stage { padding-top: 103px; }
  .identity-topline { font-size: 9px; }
  .identity-topline>span:last-child { display: none; }
  .identity-title { margin-top: 35px; }
  .identity-greeting { font-size: 24px; }
  .identity-name { font-size: clamp(66px, 20.2vw, 138px); letter-spacing: -.085em; line-height: 1.27; }
  .identity-portrait { left: -8%; width: 116%; top: 221px; bottom: 139px; }
  .identity-description { bottom: 140px; left: 0; max-width: 42%; }
  .identity-description .micro-label { font-size: 7px; }
  .identity-description p { font-size: 13px; margin: 9px 0; line-height: 1.8; text-shadow: 0 1px 8px #11151b; }
  .placeholder-label { font-size: 8px; }
  .identity-action { bottom: 71px; right: 0; gap: 12px; }
  .portrait-caption { font-size: 8px; }
  .pill-link { padding: 13px 18px; gap: 28px; font-size: 12px; }
  .identity-baseline { bottom: 22px; font-size: 8px; letter-spacing: .03em; }
  .work-section { padding-top: 80px; padding-bottom: 80px; }
  .project-index { margin-bottom: 35px; }
  .project-index a { min-width: 135px; font-size: 11px; padding: 15px 10px; }
  .project-index a:first-child { padding-left: 10px; }
  .feature-surface { padding: 19px; border-radius: 20px; }
  .feature-heading { align-items: start; gap: 12px; margin-bottom: 22px; }
  .feature-identity { gap: 14px; }
  .feature-number { font-size: 42px; }
  .feature-identity .micro-label { font-size: 7px; }
  .feature-identity h3 { font-size: 21px; }
  .feature-demo-label { display: none; }
  .feature-mosaic { display: flex; flex-direction: column; height: auto; gap: 14px; }
  .feature-side { display: grid; grid-template-columns: 60% minmax(0, 1fr); grid-template-rows: 150px; padding: 0; gap: 12px; }
  .feature-statement { padding: 15px; border-radius: 10px; }
  .feature-statement .micro-label { font-size: 7px; }
  .feature-statement h4 { font-size: 20px; margin-top: 13px; }
  .specimen-name { font-size: 40px; }
  .feature-detail-crop { border-radius: 10px; }
  .feature-main-media { height: 230px; border-radius: 10px; }
  .media-corner { padding: 8px 13px; bottom: 12px; right: 12px; font-size: 10px; gap: 15px; }
  .feature-footer { flex-direction: column; align-items: stretch; gap: 17px; padding-top: 17px; }
  .feature-footer>span { font-size: 9px; }
  .feature-footer>div { justify-content: space-between; gap: 15px; }
  .more-heading { margin-top: 65px; }
  .more-heading h3 { font-size: 29px; }
  .more-heading>span { font-size: 8px; }
  .more-projects { grid-template-columns: 1fr; gap: 38px; }
  .more-projects .project-card:nth-child(n) .project-visual { aspect-ratio: 1.1; }
  .reading-panel { border-radius: 25px 25px 0 0; clip-path: none!important; }
  .about-section { padding: 80px 0; }
  .about-layout { display: block; }
  .about-main>p { font-size: 15px; }
  .notes-section { padding-bottom: 80px; }
  .project-dialog { border-radius: 20px; }
  .dialog-hero { padding-top: 74px; }
}
@media (prefers-reduced-motion: reduce) {
  .identity-title, .identity-portrait, .identity-description, .identity-action { animation: none; }
  .feature-project { position: relative; top: auto; }
  .featured-stack { gap: 35px; }
  .feature-surface { transform: none!important; filter: none!important; }
  .reading-panel { clip-path: none!important; }
  .project-dialog[open], .project-dialog[open]::backdrop { animation: none; }
}

/* Keep the directory and exposed title above the active, upright case study. */
@media (min-width: 1001px) and (min-height: 781px) and (prefers-reduced-motion: no-preference) {
  html { scroll-padding-top: 158px; }
  .project-index { position: sticky; top: 80px; z-index: 8; background: #1b2026; }
  .project-index a:first-child { padding-left: 15px; }
  .featured-stack { --reading-gap: clamp(220px, 32vh, 380px); gap: var(--reading-gap); padding-bottom: 0; }
  .featured-stack::after { content: ""; flex: 0 0 180px; margin-top: calc(-1 * var(--reading-gap)); }
  .feature-project { top: calc(158px + var(--stack-order) * 86px); scroll-margin-top: 0; }
  .feature-mosaic { height: min(450px, calc(100svh - 475px)); }
  .feature-surface { transform-origin: 50% 0; }
}
@media (max-width: 1000px), (max-height: 780px) {
  .feature-project { position: relative; top: auto; }
  .featured-stack { gap: 35px; padding-bottom: 0; }
  .feature-surface { transform: none!important; filter: none!important; }
}
