/* WordPress-only additions. Everything visual from the original site lives in site.css. */

/* Keep the sticky header below the admin toolbar when logged in. */
.admin-bar .header-band{top:32px}
@media(max-width:782px){.admin-bar .header-band{top:46px}}
@media(max-width:600px){.admin-bar .header-band{top:0}}

[data-contact-popper][hidden]{display:none}

.screen-reader-text{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}

/* Form honeypot: off-screen and ignored by assistive technology. */
.ndipowa-hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.contact-dropdown form,.newsletter-form{position:relative}
[data-form-note][data-status="error"]{color:#ffb4b4}

/* Hero metadata (TCPV-3): monospace summary under the hero actions, with a subtle entrance. */
@keyframes ndipowa-rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.hero-meta{display:grid;gap:0;max-width:520px;margin:34px 0 0;font-size:12px;letter-spacing:.04em;line-height:1.5;animation:ndipowa-rise .7s ease-out .15s both}
.hero-meta>div{display:grid;grid-template-columns:118px minmax(0,1fr);gap:14px;border-top:1px solid var(--border);padding:10px 0}
.hero-meta dt{color:#6b6b6b}
.hero-meta dd{margin:0;color:#151515}
@media(max-width:480px){.hero-meta{font-size:11px}.hero-meta>div{grid-template-columns:96px minmax(0,1fr);gap:10px}}

/* What I build (TCPV-5): three areas, large numbering, subtle hover. */
.what-i-build{border-top:1px solid var(--border)}
.build-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px;margin:36px 0 0;padding:0;list-style:none}
.build-item{border-top:2px solid #171717;padding:22px 0 8px;transition:transform .25s ease}
.build-number{display:block;font-size:clamp(56px,6vw,88px);font-weight:500;line-height:1;letter-spacing:-.05em;color:#8c8c8c;transition:color .25s ease}
.build-item h3{font-size:13px;font-weight:400;letter-spacing:.12em;margin:24px 0 10px}
.build-item p{font-size:17px;line-height:1.6;color:#555;margin:0;max-width:340px}
.build-item:hover{transform:translateY(-4px)}
.build-item:hover .build-number{color:#151515}
@media(max-width:800px){.build-grid{grid-template-columns:1fr;gap:20px}.build-item{display:grid;grid-template-columns:auto 1fr;column-gap:20px;align-items:baseline}.build-number{grid-row:span 2;font-size:56px}.build-item h3{margin-top:0}}

/* Career journey (TCPV-6): horizontal system flow on desktop, vertical timeline on mobile. */
.career-journey{border-top:1px solid var(--border)}
.journey-flow{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));margin:44px 0 0;padding:0;list-style:none}
.journey-step{position:relative;border-top:2px solid #171717;padding:24px 28px 0 0}
.journey-step::before{content:"";position:absolute;left:0;top:-6px;width:10px;height:10px;background:var(--background);border:2px solid #171717;border-radius:50%}
.journey-step:last-child::before{background:#171717}
.journey-step:not(:last-child)::after{content:"→";content:"→"/"";position:absolute;right:12px;top:-15px;padding:0 4px;background:var(--background);font-family:"SFMono-Regular",Consolas,monospace;font-size:16px;color:#171717}
.journey-step .mono{font-size:11px;letter-spacing:.08em;color:#6b6b6b}
.journey-step h3{font-size:clamp(19px,1.8vw,24px);font-weight:500;letter-spacing:-.03em;line-height:1.2;margin:8px 0 0}
@media(max-width:800px){.journey-flow{grid-template-columns:1fr;margin-top:32px}.journey-step{border-top:0;border-left:2px solid #171717;padding:0 0 28px 26px}.journey-step:last-child{padding-bottom:0;border-left-color:transparent}.journey-step::before{left:-6px;top:2px}.journey-step:not(:last-child)::after{content:none}}

/* Project cards (TCPV-7): screenshot visuals, title link, case study / demo / source links. */
.project-visual.has-shot{background:#171717;align-items:flex-start}
.project-shot{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:top center;transition:transform .5s ease}
.project-card:hover .project-shot{transform:scale(1.03)}
.has-shot .visual-meta,.has-shot .visual-label{z-index:1;background:#fafafa;color:#151515;padding:4px 8px}
.has-shot .project-arrow{z-index:1;background:#fafafa;color:#151515;padding:4px;box-sizing:content-box}
.project-title h3 a{color:inherit;text-decoration:none}
.project-title h3 a:hover{text-decoration:underline;text-underline-offset:4px}
.project-links{display:flex;flex-wrap:wrap;gap:8px 22px;margin-top:18px}
.project-links .text-link{font-size:12px;letter-spacing:.06em;text-transform:uppercase;border-bottom:1px solid currentColor;padding-bottom:2px}

/* Projects page (TCPV-8): completed and concept groups. */
.project-group{padding-top:44px}
.project-group+.project-group{border-top:1px solid var(--border);margin-top:24px}
.project-group-title{display:flex;justify-content:space-between;font-size:12px;font-weight:400;letter-spacing:.1em;margin:0}
.project-group-title span{color:#6b6b6b}

/* Project cards (TCPV-26): the summary always takes two lines and the tags one, each
   ending in an ellipsis when longer, so cards line up on Home and Projects. */
.project-card>p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;min-height:3.3em;min-height:2lh}
.project-card .tags{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.project-card .tags span{display:inline-block;margin-right:7px}

/* Case study (TCPV-9): screenshot, section index, contents, architecture diagram. */
.case-shot{margin:0;border:1px solid #e2e2e2;background:#171717}
.case-shot img{display:block;width:100%;height:auto}
.case-study .detail-grid{align-items:start}
.case-study aside{position:sticky;top:120px;max-height:calc(100vh - 140px);overflow-y:auto}
.case-contents{margin-top:36px}
.case-contents ol{list-style:none;padding:0;margin:14px 0 0;font-size:14px;line-height:1.5}
.case-contents li{border-top:1px solid var(--border)}
.case-contents a{display:block;padding:7px 0;color:#555}
.case-contents a:hover{color:#151515}
.case-section{scroll-margin-top:120px;border-top:1px solid var(--border);padding-top:22px;margin-top:40px}
.case-section:first-child{border-top:0;padding-top:0;margin-top:0}
.case-index{display:block;font-size:11px;letter-spacing:.08em;color:#6b6b6b}
.case-section h2,.prose .case-section h2:first-child{margin:8px 0 14px}
.prose ul{padding-left:22px;list-style:square;color:#555}
.case-links{list-style:none!important;padding:0!important;display:flex;flex-wrap:wrap;gap:12px 28px}
.arch-diagram{margin:18px 0 8px}
.arch-diagram ol{display:flex;flex-wrap:wrap;align-items:center;gap:14px 0;list-style:none;padding:0;margin:0}
.arch-step{display:flex;flex-direction:column;gap:6px;position:relative}
.arch-diagram .arch-step{margin:0;padding:0}
.arch-step+.arch-step{margin-left:36px}
.arch-step+.arch-step::before{content:"→";content:"→"/"";position:absolute;left:-26px;top:50%;transform:translateY(-50%);font-family:"SFMono-Regular",Consolas,monospace;color:#171717}
.arch-node{display:block;border:1px solid #171717;background:#fff;padding:10px 14px;font-family:"SFMono-Regular",Consolas,monospace;font-size:12px;line-height:1.4;color:#151515;white-space:nowrap}
.arch-step:first-child .arch-node{background:#171717;color:#fff}
@media(max-width:1000px){.case-study aside{position:static;max-height:none;overflow:visible}}
@media(max-width:800px){.arch-diagram ol{flex-direction:column;align-items:flex-start;gap:30px}.arch-step+.arch-step{margin-left:0}.arch-step+.arch-step::before{content:"↓";content:"↓"/"";top:-26px;left:14px;transform:none}.arch-step{flex-direction:row;flex-wrap:wrap}.arch-node{white-space:normal}}

/* About (TCPV-10): statement heading, technical background grid, journey, contact. */
.about-hero h1.about-statement-title{font-size:clamp(40px,4.8vw,68px);line-height:1.08}
.about-background{border-top:1px solid var(--border);padding-block:60px}
.background-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 28px;list-style:none;margin:28px 0 0;padding:0}
.background-grid li{display:flex;gap:16px;align-items:baseline;border-top:1px solid #171717;padding:16px 0 20px;font-size:15px;letter-spacing:.02em}
.background-grid span{font-size:11px;color:#6b6b6b}
.about-journey{padding-block:60px}
.about-build{padding-block:60px}
.about-contact .actions{justify-content:flex-end}
@media(max-width:800px){.background-grid{grid-template-columns:1fr 1fr}.about-contact{flex-direction:column;align-items:flex-start}.about-contact .actions{justify-content:flex-start}}
@media(max-width:480px){.background-grid{grid-template-columns:1fr}}

/* Writing page (TCPV-12): article / sample groups, dates and read links. */
.writing-group{padding-top:40px}
.writing-group+.writing-group{border-top:1px solid var(--border);margin-top:40px}
.writing-note{font-size:14px;color:#6b6b6b;max-width:640px;margin:12px 0 4px}
.post-row .eyebrow time{color:inherit}
.post-read{display:inline-block;margin-top:14px;font-size:12px;letter-spacing:.06em;text-transform:uppercase;border-bottom:1px solid currentColor;padding-bottom:2px}

/* Interactive terminal (TCPV-14): optional command line under the existing output. */
.terminal-log{max-height:10.2em;overflow-y:auto;margin-top:8px;padding-top:2px}
.terminal-log:empty{display:none}
.terminal-log p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.terminal .terminal-echo{color:#7dd3fc}
.terminal-form{display:flex;align-items:baseline;gap:8px;margin-top:6px;border-top:1px solid #222;padding-top:8px}
.terminal-form[hidden]{display:none}
.hero-bottom>.terminal{min-width:0}
.terminal-form label{flex-shrink:0;white-space:nowrap}
.terminal-form input{flex:1;min-width:0;background:transparent;border:0;color:#fff;font:inherit;padding:4px 0;caret-color:#7dd3fc}
.terminal-form input::placeholder{color:#8a919c}
.terminal-form input:focus{outline:none}
.terminal-form:focus-within{box-shadow:0 1px 0 #7dd3fc}
@media(max-width:480px){.terminal-form input{font-size:16px}}

/* Navigation (TCPV-15): mobile menu, focus states. */
.site-header nav a:focus-visible,.nav-toggle:focus-visible,.nav-contact:focus-visible{outline:2px solid #fff;outline-offset:4px}
.nav-toggle{display:none;align-items:center;justify-content:center;min-height:44px;padding:8px 16px;background:none;border:1px solid #777;color:#fff;font:inherit;font-size:14px;cursor:pointer}
.nav-toggle:hover,.nav-toggle[aria-expanded=true]{background:#fff;color:#1b1b1b;border-color:#fff}
@media(max-width:800px){
.site-header{flex-wrap:wrap;gap:12px 14px;height:auto;min-height:80px;padding-block:16px}
/* The toggle precedes the nav in the DOM so Tab reaches the open menu; order puts it after Contact visually. */
.site-header .nav-contact{order:1;margin-left:auto;min-height:44px}
.nav-toggle{order:2}
.has-js .nav-toggle{display:inline-flex}
.site-header nav{order:3;flex-basis:100%;flex-direction:column;gap:0;font-size:16px}
.has-js .site-header nav{display:none}
.has-js .site-header nav.is-open{display:flex}
.site-header nav a{display:flex;align-items:center;min-height:44px;padding:10px 0;border-top:1px solid #333}
.site-header nav a:after{bottom:8px}
}

/* Footer page links (TCPV-27): under the tagline, beside the wordmark. */
.footer-about{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}
.footer-about p{margin:0}
.footer-nav{display:flex;flex-wrap:wrap;gap:8px 20px;font-size:13px}
.footer-nav a{color:#fff;text-decoration:none}
.footer-nav a:hover,.footer-nav a[aria-current]{text-decoration:underline;text-underline-offset:4px}
.footer-nav a:focus-visible{outline:2px solid #fff;outline-offset:4px}

/* Technical details (TCPV-16): status markers. */
.state-dot{display:inline-block;width:7px;height:7px;margin-right:8px;border:1px solid currentColor;border-radius:50%;vertical-align:1px}
.is-completed .state-dot{background:currentColor}

/* Motion (TCPV-17). All of it is switched off by the global prefers-reduced-motion rule;
   scroll reveal and terminal typing are only added by site.js when motion is allowed. */
@keyframes ndipowa-type{from{opacity:0;clip-path:inset(0 100% 0 0)}to{opacity:1;clip-path:inset(0 0 0 0)}}
.has-js .hero-lead{animation:ndipowa-rise .8s ease-out both}
.has-js .hero-bottom{animation:ndipowa-rise .8s ease-out .15s both}
.terminal .type-in{animation:ndipowa-type .45s steps(24,end) both}
.reveal{opacity:0;transform:translateY(14px);transition:opacity .6s ease,transform .6s ease}
.reveal.is-visible{opacity:1;transform:none}
@media print{.reveal{opacity:1;transform:none;transition:none}}
@media(prefers-reduced-motion:no-preference){
@view-transition{navigation:auto}
::view-transition-old(root),::view-transition-new(root){animation-duration:.25s}
}

/* Touch targets (TCPV-18): on small screens, inline text links get an invisible 44px-tall
   hit area without changing how they look. */
@media(max-width:800px){
.text-link,.project-title h3 a,.hero-foot a{position:relative}
.text-link::before,.project-title h3 a::before,.hero-foot a::before{content:"";position:absolute;inset:-11px -6px}
/* Wrapped project links: keep rows far enough apart that the 11px hit areas do not overlap the link above. */
.project-links{row-gap:22px}
/* Footer page links (TCPV-27): 13px text needs 12px above and below to reach 44px. */
.footer-nav a{position:relative}
.footer-nav a::before{content:"";position:absolute;inset:-12px -6px}
.footer-nav{row-gap:24px}
}

/* Accessibility (TCPV-19): small grey labels from the original stylesheet on light
   backgrounds darkened from #747474-#888 to #6b6b6b to reach 4.5:1. */
.hero-foot,.project-title .mono,.post-index,.post-time,.post-row .eyebrow,.detail dt,.article-body .article-disclosure,.learning-strip .eyebrow{color:#6b6b6b}

/* Performance (TCPV-20): portraits ship as WebP (~30-80 KB) instead of 1.3 MB PNGs. The
   blurred shadow layers from the original stylesheet use the small WebP too. */
.hero-portrait picture,.about-portrait picture{display:block}
.hero-portrait::before{background-image:url('../images/ndipowa-selected-cutout-560.webp')}
.about-portrait::before{background-image:url('../images/about-black-blazer-520.webp')}
