/* attashah.dev v6: the page that holds the modules. Colours, faces and the type scale come from tokens.css.
   The sheet is quiet: lettering and hairlines, one accent, and no boxes where a rule will do. */
body{overflow-x:hidden;overflow-x:clip}
/* one left edge for the whole sheet: every section starts at the gutter and runs to the gutter, like the first screen, so a wide screen
   is filled from edge to edge and balanced against the nav. Only past 2000 px is the column held and centred. */
.wrap{padding-inline:var(--gutter);max-width:2000px;margin-inline:auto}
main>section.wrap{padding-top:clamp(56px,9vw,120px)}
main>section:focus{outline:none} /* a section that takes the focus after a jump link */
.sec-h{font-size:clamp(36px,4.6vw,64px);font-weight:900;letter-spacing:.002em;margin-bottom:.32em;text-wrap:balance} /* same size as the built module's own title */
.sub{color:var(--dim);margin:0 0 26px;max-width:62ch;text-wrap:pretty}
.sub a{text-underline-offset:4px;text-decoration-color:var(--tan)}
.noscript{color:var(--dim);max-width:80ch;box-sizing:content-box;padding-top:40px}
.noscript,.ph{font-size:var(--fs-small,.875rem)}
.ph{margin:0;padding:28px var(--gutter);color:var(--dim)} /* where a module did not load */

/* ---- actions */
.btn{display:inline-flex;align-items:center;min-height:46px;padding:0 22px;border-radius:999px;border:var(--pen-2,1.4px) solid var(--tan);
  background:color-mix(in srgb,var(--sheet) 70%,transparent);color:var(--line);font:600 .95rem/1.1 var(--body);text-decoration:none;white-space:nowrap;transition:background .18s,color .18s}
.btn:hover{background:color-mix(in srgb,var(--tan) 16%,var(--sheet))}
.btn.main{background:var(--tan);color:var(--sheet)}
.btn.main:hover{background:color-mix(in srgb,var(--tan) 82%,var(--line))}

/* ---- nav: appears once the first screen is behind you */
.nav{position:fixed;top:12px;right:var(--gutter);z-index:20;display:flex;align-items:center;gap:2px;padding:5px;border-radius:999px;
  background:color-mix(in srgb,var(--sheet-2) 84%,transparent);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid var(--rule);font-size:.9rem;
  transition:opacity .3s,translate .3s,visibility 0s}
.nav.off{opacity:0;visibility:hidden;translate:0 -18px;transition:opacity .3s,translate .3s,visibility 0s .3s} /* hidden, so it is not a tab stop on the first screen */
.nav a{display:inline-flex;align-items:center;min-height:44px;padding:0 13px;border-radius:999px;text-decoration:none;color:var(--dim);font-weight:500}
.nav a:hover{color:var(--line)}
.nav a.nav-me{color:var(--line);font:600 1.02rem/1 var(--display);letter-spacing:.01em;padding-inline:14px 10px}
.nav a.cta{background:var(--tan);color:var(--sheet);font-weight:600}
@media (max-width:820px){.nav a:not(.cta,.nav-me){display:none}}
@media (max-height:520px) and (min-width:821px){.nav a:not(.cta,.nav-me){display:none}}
@media (pointer:coarse){.nav{gap:8px}} /* touch: the two pills of a phone's nav are separate targets */

/* ---- how I work: six lines. Wide screens show them all, ruled like the notes on a sheet; phones get a sideways scroller that snaps one card at a time. */
#about{padding-bottom:clamp(28px,4vw,64px)}
@media (min-height:900px) and (min-width:1000px){#about{min-height:min(70svh,820px);display:flex;flex-direction:column;justify-content:center}} /* only a tall screen gives it a sheet of its own; a laptop keeps it as tall as its six lines */
.traits{list-style:none;margin:clamp(14px,2vw,26px) 0 0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);gap:0 clamp(24px,3.4vw,56px)}
.traits li{padding:18px 0 30px;border-top:1px solid var(--rule)}
.traits li:nth-child(-n+3){border-top:var(--pen-2,1.4px) solid color-mix(in srgb,var(--line) 70%,transparent)}
.traits strong{display:block;font:600 clamp(1.3rem,1.9vw,2.2rem)/1.16 var(--display);letter-spacing:.004em;text-wrap:balance}
.traits span{display:block;color:var(--dim);font-size:clamp(.95rem,1.02vw,1.2rem);line-height:1.5;margin-top:8px;max-width:36ch}
.tr-nav{display:none}
@media (max-width:820px){
  /* the scroller bleeds to the screen edges; 9vw of padding lets the first and last card reach the centre. Cards are 82vw so the next one peeks. */
  .traits{display:flex;gap:12px;margin-inline:calc(var(--gutter) * -1);padding:2px 9vw 6px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;scrollbar-width:none}
  .traits::-webkit-scrollbar{display:none}
  .traits li,.traits li:nth-child(-n+3){flex:0 0 82vw;scroll-snap-align:center;scroll-snap-stop:always;min-height:168px;padding:18px 18px 22px;background:var(--sheet-2);border:1px solid var(--rule);border-top:var(--pen-3,2px) solid var(--line);border-radius:0 0 10px 10px}
  .traits strong{font-size:1.5rem}
  .traits span{font-size:.95rem}
  .tr-nav{display:flex;align-items:center;justify-content:space-between;margin-top:6px}
  .tr-dots{display:flex;margin-left:-16px}
  .tr-dots button{width:44px;height:44px;padding:0;border:0;background:none;cursor:pointer;display:grid;place-items:center}
  .tr-dots button::before{content:"";width:9px;height:9px;border-radius:50%;background:color-mix(in srgb,var(--dim) 45%,transparent);transition:background .2s,transform .2s}
  .tr-dots button[aria-current=true]::before{background:var(--tan);transform:scale(1.35)}
  .tr-count{color:var(--dim);font-size:.9rem;font-variant-numeric:tabular-nums}
}

/* ---- the modules' rooms: held open while they load, so the page below does not jump */
#walk,#teaching{min-height:max(100svh,560px)}
#built{min-height:70svh}
#sk-root{min-height:min(88svh,920px)}
#walk.gone,#teaching.gone,#built.gone,#sk-root.gone{min-height:0}

/* ---- interview my AI twin */
#ama{min-height:70svh}
@media (max-width:820px){#ama{min-height:0}} /* a phone has no panel to make room for: the twin opens as a sheet */
.tries{display:flex;gap:10px;flex-wrap:wrap;max-width:62ch}
.tries button{padding:10px 16px;min-height:44px;border-radius:999px;border:1px solid var(--rule);background:var(--sheet-2);color:var(--line);font:500 .95rem var(--body);cursor:pointer;transition:border-color .18s,color .18s}
.tries button:hover{border-color:var(--tan);color:var(--tan)}
/* wide screens: the twin's panel opens in the corner beside this section, so the words stop where it begins, and the four questions are
   set as ruled lines across the rest (the same lettering as "How I work"), each one a button that asks it */
@media (min-width:1000px){
  #ama{padding-right:max(var(--gutter),436px)}
  #ama .sub{font-size:clamp(1.0625rem,1.2vw,1.35rem);max-width:60ch}
  .tries{max-width:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 clamp(24px,3.4vw,56px);margin-top:clamp(20px,3vw,40px)}
  .tries button{position:relative;min-height:0;padding:18px 3.6em 26px 0;border:0;border-top:1px solid var(--rule);border-radius:0;background:none;text-align:left;font:600 clamp(1.3rem,1.9vw,2.2rem)/1.16 var(--display);letter-spacing:.004em;text-wrap:balance}
  .tries button:nth-child(-n+2){border-top:var(--pen-2,1.4px) solid color-mix(in srgb,var(--line) 70%,transparent)}
  .tries button::after{content:"Ask";position:absolute;right:2px;top:24px;font:500 var(--fs-note,.75rem)/1 var(--note,var(--body));letter-spacing:.03em;color:var(--tan)}
  .tries button:last-child::after{content:"Open"}
  .tries button:focus-visible{border-radius:4px}
}

/* ---- education and certifications. Official marks sit unaltered on a light tile; issued badges are shown bare. */
.two{display:grid;gap:0 clamp(28px,4vw,64px);grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));margin-top:clamp(14px,2vw,26px)}
.two ul{list-style:none;margin:0;padding:0;border-top:var(--pen-2,1.4px) solid color-mix(in srgb,var(--line) 70%,transparent)}
.two li{position:relative;display:flex;align-items:center;gap:16px;min-height:76px;padding:12px 0;border-bottom:1px solid var(--rule)}
.two li div{min-width:0;flex:1}
.two li span{display:block;color:var(--dim);font-size:.9rem}
.two .lg{flex:none;width:64px;height:36px;padding:4px 6px;border-radius:6px;background:var(--line);object-fit:contain}
.two .lg.bd{width:64px;height:52px;padding:0;background:none}
.two .lg.dk{mix-blend-mode:lighten}
/* a row with evidence opens it: the whole row is the button (page.js adds it); no label, the pointer and the hover colour say so */
.two .ev{position:absolute;inset:0;width:100%;border:0;background:none;cursor:zoom-in;border-radius:6px;color:transparent;font:500 var(--fs-note,.75rem)/1 var(--note,var(--body));letter-spacing:.03em;text-align:right;padding:0 2px 0 0}
.two li:has(.ev:hover) div{color:var(--tan)}
.ev-pop{position:fixed;z-index:30;pointer-events:none;background:var(--line);color:var(--sheet);padding:6px;border-radius:10px;box-shadow:0 18px 50px rgb(0 0 0 / .6);font-size:.8rem;max-width:292px}
.ev-pop img{display:block;max-width:280px;max-height:280px;margin-bottom:4px;border-radius:5px}
.ev-box{border:0;border-radius:14px;padding:18px;background:var(--line);color:var(--sheet);max-width:min(560px,92vw);max-height:90svh}
.ev-box::backdrop{background:color-mix(in srgb,var(--sheet) 82%,transparent)}
.ev-box figure{margin:0 0 14px}
.ev-box img{display:block;max-width:100%;max-height:62svh;margin:0 auto 6px;border-radius:6px}
.ev-box figcaption,.ev-box p{font-size:.9rem;margin:0}
.ev-box a{color:inherit;text-underline-offset:3px}
.ev-box button{margin-top:12px;min-height:40px;padding:8px 18px;border-radius:999px;border:0;background:var(--sheet);color:var(--line);font:600 .9rem var(--body);cursor:pointer}
.ev-box :focus-visible{outline-color:var(--sheet)}

/* ---- the closing: one question in the title lettering and the two ways to answer it, on the wall of the room where he is working.
   The whole section is the shot (img/closing-work.mp4, a seamless loop of him typing, seated at the desk on the right of a wide navy wall):
   the words sit on the wall, a soft scrim on that side keeps them at AA, and the top and bottom fade into the page. */
#contact{--ct-pos:78% 50%;position:relative;isolation:isolate;min-height:100svh;display:flex;flex-direction:column;padding-block:clamp(36px,7svh,96px);margin-top:clamp(56px,9vw,120px)}
#contact .wrap{width:100%;margin-block:auto}
#contact h2{font:400 clamp(2.7rem,min(8.4vw,15.5svh),var(--fs-00,8.5rem))/.98 var(--title,var(--display));letter-spacing:-.012em;max-width:11.5em;margin:0 0 0 -.04em;text-wrap:balance}
.ct-facts{margin:clamp(16px,2.6svh,34px) 0 0;color:var(--dim);font-size:clamp(1rem,1.25vw,1.5rem)}
.ct-acts{display:flex;flex-wrap:wrap;gap:12px;margin:clamp(16px,2.6svh,30px) 0 0}
.ct-acts .btn{min-height:clamp(50px,3.2vw,60px);padding-inline:clamp(24px,1.8vw,34px);font-size:clamp(1rem,1.1vw,1.25rem)}
/* the shot fills the section behind the words. The poster is the video's own background, so it shows until the first frame and whenever the video
   never loads (reduced motion, no JavaScript), at the same crop. Its box is fixed by CSS, so nothing moves when the video loads. */
.ct-shot{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none;background:#10131f}
.ct-shot video,.ct-shot img{display:block;width:100%;height:100%;object-fit:cover;object-position:var(--ct-pos);background:url(/img/closing-work-poster.jpg) var(--ct-pos)/cover no-repeat}
.ct-shot::after{content:"";position:absolute;inset:0;background:linear-gradient(var(--sheet),transparent 16%,transparent 84%,var(--sheet)),
  linear-gradient(90deg,color-mix(in srgb,var(--sheet) 72%,transparent),color-mix(in srgb,var(--sheet) 38%,transparent) 36%,transparent 56%)}
/* wide screens: the words keep to the wall, left of the desk */
@media (orientation:landscape){
  #contact .wrap>*{max-width:min(100%,46vw)}
  #contact h2{font-size:clamp(2.7rem,min(5.2vw,11svh),7rem)}
}
/* a phone on its side: the question, the facts and both buttons fit the one screen */
@media (max-height:520px) and (orientation:landscape){#contact h2{font-size:clamp(2rem,11svh,3rem)}}
/* portrait: the words on the wall at the top, the shot standing on the bottom of the section with him and the desk in view; its top fades into the wall */
@media (orientation:portrait){
  #contact{--ct-pos:76% 100%}
  #contact .wrap{margin-block:0 auto}
  .ct-shot video,.ct-shot img{position:absolute;inset:auto 0 0;height:min(78%,138vw);-webkit-mask-image:linear-gradient(transparent,#000 34%);mask-image:linear-gradient(transparent,#000 34%)}
  .ct-shot::after{background:linear-gradient(var(--sheet),transparent 12%,transparent 90%,var(--sheet))}
}

/* ---- footer */
.foot{border-top:1px solid var(--rule);color:var(--dim);font-size:.92rem;padding-block:34px calc(84px + env(safe-area-inset-bottom))} /* room for the chat launcher in the corner */
.foot-id{display:flex;flex-wrap:wrap;gap:4px 28px;margin:0}
.foot-id a{display:inline-block;padding-block:12px;text-underline-offset:4px}
.foot-id span{padding-block:11px;color:var(--line)}

/* ---- where the twin's launcher is the round button in the corner (under about 1000 px wide, and on touch screens; see css/chat.css), every
   section ends with room for it, so it never rests on the last line of a section */
@media (max-width:999px),(max-height:520px),(pointer:coarse){main>section.wrap{padding-top:clamp(44px,7vw,96px);scroll-margin-top:30px}main>section.wrap,main>#about{padding-bottom:76px}} /* scroll-margin: a jump link lands the heading under the nav, not behind it */
