/*
Theme Name: Thornton Strolia
Description: Portfolio and blog theme. Visual and motion contract: docs/front-end-behavior.md.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: thornton-strolia
*/

:root {
  --paper: #fdfcfb;
  --ink: #292b28;
  --muted: #777a73;
  --line: #d5d7d0;
  --highlight-red: #c93f36;
  --highlight-dark-red: #842b2a;
  --highlight-orange: #dc6b28;
  --highlight-dark-orange: #a9471c;
  --highlight-amber: #df9c2d;
  --highlight-brown: #805440;
  --highlight-yellow: #e4c94c;
  --highlight-dark-yellow: #978122;
  --highlight-green: #34774d;
  --highlight-forest-green: #245d42;
  --highlight-cyan: #58c9ce;
  --highlight-teal: #1f7488;
  --highlight-blue: #2866a7;
  --highlight-dark-blue: #24446b;
  --highlight-purple: #7753a6;
  --highlight-dark-purple: #4b326b;
  --highlight-magenta: #b74783;
  --highlight-dark-plum: #5a2f4f;
  --highlight-white: #ffffff;
  --highlight-grey: #d5d7d0;
  --highlight-charcoal: #424640;
  --highlight-black: #1b1d1b;
  --pad: clamp(24px, 5vw, 80px);
  --header-height: 88px;
  --title-size: 30px;
  font-size: 17px;
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--paper);
}
body { --admin-offset: 0px; --screen: calc(100dvh - var(--admin-offset)); margin: 0; overflow-x: clip; background: var(--paper); }
body.admin-bar { --admin-offset: 32px; }
* { box-sizing: border-box; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { border: 0; background: none; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; height: auto; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 1px solid var(--ink); outline-offset: 6px; }
main:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: -100px; left: 24px; z-index: 40; padding: 12px; background: var(--paper); }
.skip:focus { top: 20px; }
.ui-arrow { display: inline-block; width: 1em; height: 1em; vertical-align: -.125em; flex-shrink: 0; }


/* ----- SHARED FRAME ----- */
.site-header { position: fixed; top: var(--admin-offset); left: 0; right: 0; z-index: 20; height: var(--header-height); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--pad); background: var(--paper); }
.identity { font-family: "Lexend Deca", sans-serif; font-weight: 300; font-style: normal; font-size: 32px; line-height: 1; letter-spacing: .125em; white-space: nowrap; transform: translateY(5px); }
.identity-group { display: grid; grid-template-columns: max-content; gap: 7px; }
.identity-caption { display: flex; align-items: baseline; justify-content: space-between; width: 0; min-width: calc(100% + var(--caption-width-adjustment, 0px)); transform: translateX(var(--caption-left-adjustment, 0px)); gap: 0; font-size: 12px; line-height: 1.2; letter-spacing: .015em; color: var(--muted); white-space: nowrap; }
.header-links { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.header-social { display: flex; justify-content: flex-end; gap: 16px; color: var(--muted); }
.header-social > span, .header-social > a { display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center; }
.header-social svg { width: 14px; height: 14px; fill: currentColor; }
.header-social a:hover { color: var(--ink); }
nav { display: flex; gap: 29px; font-size: 12px; color: var(--muted); }
/* wp_nav_menu emits ul > li > a; let the links lay out as the mockup's direct nav children. */
nav ul, nav li { display: contents; }
nav a { padding: 4px 0; }
nav a[aria-current="page"], nav a:hover { color: var(--ink); }
main { padding-top: var(--header-height); }
.eyebrow { font-size: 11px; color: var(--muted); line-height: 1.8; letter-spacing: .4px; }
.text-link { display: inline-block; padding-bottom: 4px; border-bottom: 1px solid var(--line); font-size: 13px; }
.text-link span { margin-left: 15px; }
.menu-toggle { display: none; }


/* ----- WORK CANVAS ----- */
/* D7: Home never scrolls the window; the track moves between the stage and the end screen. */
.work-viewport { position: fixed; top: var(--admin-offset); left: 0; right: 0; height: var(--screen); overflow: clip; }
.work-track { transition: transform 720ms cubic-bezier(.65, 0, .35, 1); }
.work-track.is-next { transform: translateY(calc(-1 * var(--screen))); }
.work-stage { position: relative; height: var(--screen); }
.work-scene { position: relative; width: 100%; height: var(--screen); overflow: clip; background: var(--paper); }
.work-canvas { position: absolute; inset: 100px 0 88px; overflow: clip; }
.projects { position: absolute; left: 50%; top: 50%; width: min(820px, calc(100% - 2 * var(--pad)), calc((100svh - 240px) * 2.15)); transform: translate(-50%, -50%); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 32px; }
.project { position: relative; min-width: 0; transform-origin: top left; z-index: 1; order: var(--order, 99); }
.project[hidden] { display: none !important; }
.project-link { display: block; }
.project-float { transform-origin: top left; }
.project-react { transform-origin: center; transition: scale 1000ms cubic-bezier(.33, 1, .68, 1); }
.project-link:focus-visible .project-react { scale: 1.05; transition-duration: 400ms; }
@media (hover: hover) {
  .project-link:hover .project-react { scale: 1.05; transition-duration: 400ms; }
  .project:has(.project-link:hover) { z-index: 3; }
}
.project:has(.project-link:focus-visible) { z-index: 3; }
.art { position: relative; aspect-ratio: 7 / 5; overflow: hidden; isolation: isolate; background: var(--line); }
.art > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.project-info { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 9px; height: 14px; white-space: nowrap; font-size: 11px; color: var(--muted); }
.project-info h3 { font-size: inherit; font-weight: 400; color: #555951; flex-shrink: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.project-info > span { font-size: 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .2s; }
.project-link:hover .project-info > span, .project-link:focus-visible .project-info > span { opacity: 1; }
.project-year { display: none; }
.timeline-axis { position: absolute; top: 50%; left: 0; width: 100%; height: 1px; background: var(--line); opacity: 0; pointer-events: none; }
.scene-bottom { position: absolute; bottom: 31px; left: var(--pad); right: var(--pad); display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--muted); }
.selection-label, .scroll-hint { width: 150px; }
.scroll-hint { text-align: right; }
.view-toggle { font-size: 14px; padding: 12px 16px; color: var(--ink); }
.view-toggle > span { margin-left: 12px; display: inline-block; width: 10px; }
.end-panel { position: relative; height: var(--screen); width: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 18px; background: var(--paper); }
.end-panel a { font-size: calc(clamp(30px, 4vw, 52px) + 1px); font-weight: 400; letter-spacing: -1.5px; }
.end-panel a span { font-size: .65em; margin-left: 14px; }
.work-copyright { position: absolute; bottom: 0; left: 0; right: 0; padding: 10px var(--pad); color: #74736f; font-size: 11px; line-height: 1.4; letter-spacing: .02em; text-align: center; }


/* ----- FITTED GRID ----- */
.category-menu { position: absolute; z-index: 5; }
.category-menu button { position: relative; padding: 0; font-size: 17px; line-height: 21px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.category-menu button:hover, .category-menu button:focus-visible, .category-menu button[aria-pressed="true"] { color: var(--ink); }
.category-menu--grid { left: var(--menu-left, -12px); top: var(--menu-top, 170px); width: 200px; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.category-menu--grid button { display: flex; align-items: center; justify-content: flex-end; gap: 10px; font-weight: 500; -webkit-text-stroke: .15px currentColor; letter-spacing: .01em; text-align: right; }
.category-menu--grid button::after { content: ''; width: 2em; height: 2px; background: currentColor; transform: scaleX(.5); transform-origin: left; transition: transform 400ms cubic-bezier(.16,1,.3,1); }
.category-menu--grid button:hover::after, .category-menu--grid button:focus-visible::after { transform: scaleX(1); }
.category-menu--timeline { left: var(--pad); right: var(--pad); bottom: 87px; display: flex; flex-wrap: wrap; justify-content: center; column-gap: 28px; row-gap: 14px; opacity: 0; pointer-events: none; }
.category-menu--timeline button { padding-bottom: 7px; }
.category-menu--timeline button::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px; background: currentColor; transition: width 550ms cubic-bezier(.16,1,.3,1); }
.category-menu--timeline button:hover::after, .category-menu--timeline button:focus-visible::after { width: 1em; }
.category-menu--timeline button[aria-pressed="true"]::after { width: 100%; }
.is-expanded .category-menu--grid { opacity: 0; pointer-events: none; }
.is-expanded .category-menu--timeline { opacity: 1; pointer-events: auto; }
.is-expanded .work-canvas { bottom: 132px; }
@media (min-width: 651px) {
  .work-stage:not(.is-expanded) .projects {
    left: calc(50% + var(--grid-shift, 0px));
    width: var(--grid-width);
    height: var(--grid-height);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: var(--grid-gap-y) var(--grid-gap-x);
    align-items: center;
  }
  .work-stage:not(.is-expanded) .project {
    width: var(--grid-card-width);
    max-width: 100%;
    justify-self: center;
  }
}


/* ----- EXPANDED TIMELINE ----- */
.is-expanded .projects { display: block; top: 0; left: 0; width: var(--track-width); height: 100%; transform: translate3d(calc(-1 * var(--travel, 0px)), 0, 0); will-change: transform; }
.is-expanded .timeline-axis { opacity: 1; left: var(--axis-start); width: calc(100% - var(--axis-start)); }
.is-expanded .timeline-axis::before { content: ''; position: absolute; left: -2px; top: -2px; width: 5px; height: 5px; border-radius: 50%; background: #83877d; }
.is-expanded .project { position: absolute; left: var(--x); width: var(--thumb-width); }
.is-expanded .project[data-row="top"] { bottom: calc(50% + 40px); }
.is-expanded .project[data-row="bottom"] { top: calc(50% + 40px); }
.is-expanded .project[data-row="top"] .project-react { transform-origin: bottom left; }
.is-expanded .project[data-row="bottom"] .project-react { transform-origin: top left; }
.is-expanded .project::after { content: ''; position: absolute; left: 0; width: 1px; height: 40px; background: var(--line); }
.is-expanded .project::before { content: ''; position: absolute; left: -2px; width: 5px; height: 5px; border-radius: 50%; background: #83877d; }
.is-expanded .project[data-row="top"]::after { bottom: -40px; }
.is-expanded .project[data-row="bottom"]::after { top: -40px; height: 34px; }
.is-expanded .project[data-row="top"]::before { bottom: -42px; }
.is-expanded .project[data-row="bottom"]::before { top: -42px; }
.is-expanded .project-year { position: absolute; display: block; left: 0; font-size: 11px; color: var(--muted); }
.is-expanded .project[data-row="top"] .project-year { top: calc(100% + 51px); }
.is-expanded .project[data-row="bottom"] .project-year { bottom: calc(100% + 51px); }


/* ----- INNER PAGES ----- */
.page-intro { max-width: 1100px; margin: auto; padding: 55px var(--pad) 60px; }
h1 { font-size: var(--title-size); font-weight: 400; line-height: 1.05; letter-spacing: -.035em; margin-top: 18px; }
h1 em { font-style: normal; }
.page-intro p { margin-top: 24px; font-size: 14px; color: var(--muted); line-height: 1.8; max-width: 390px; }
.blog-list { max-width: 1100px; margin: 0 auto 70px; padding: 0 var(--pad); }
.blog-entry { display: grid; grid-template-columns: 100px 1fr 25px; gap: 30px; border-top: 1px solid var(--line); padding: 26px 0; }
.blog-entry h2 { font-size: 21px; font-weight: 400; letter-spacing: -.5px; margin-top: 7px; }
.blog-entry p { font-size: 13px; line-height: 1.8; color: var(--muted); margin-top: 12px; max-width: 550px; }
.project-arrow { font-size: 20px; }
.blog-list .navigation { padding-top: 26px; border-top: 1px solid var(--line); font-size: 13px; }
.blog-list .nav-links { display: flex; gap: 20px; }
.contact-layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: 80px; max-width: 1100px; margin: 0 auto 65px; padding: 0 var(--pad); }
.contact-description { font-size: 15px; line-height: 1.5; max-width: 340px; }
.contact-description a { overflow-wrap: anywhere; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.contact-form label { font-size: 12px; display: grid; gap: 10px; }
.contact-form input, .contact-form select, .contact-form textarea { border: 1px solid var(--line); background: transparent; padding: 12px; width: 100%; border-radius: 0; font-size: 13px; color: var(--ink); }
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form .contact-trap { position: absolute; left: -9999px; }
.wide { grid-column: 1 / -1; }
.solid-button { background: var(--ink); color: white; padding: 15px 20px; display: flex; justify-content: space-between; gap: 20px; font-size: 13px; }
.form-note { font-size: 11px; line-height: 1.8; color: var(--muted); }
.form-note:empty { display: none; }
.article { max-width: 690px; margin: 45px auto 80px; padding: 0 25px; }
.article h1 { margin-bottom: 25px; }
.article p, .article li { font-size: 15px; line-height: 1.9; color: var(--muted); }
.article p { margin: 25px 0; }
.article h2 { font-size: 23px; font-weight: 400; margin-top: 35px; }
.article figure { margin: 25px 0; }
.article a:not(.text-link) { text-decoration: underline; text-underline-offset: 3px; }
.work-bottom { margin-top: 30px; padding: 18px 0; display: flex; justify-content: space-between; gap: 25px; color: var(--muted); font-size: 11px; }


/* ----- ABOUT PAGE ----- */
.about-page { max-width: 1100px; margin: 0 auto; padding: 0 var(--pad) 60px; }
.about-profile { display: grid; grid-template-columns: .85fr 1.35fr; gap: clamp(35px, 5vw, 80px); align-items: start; }
.about-portrait { margin: 0; }
.about-portrait img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }
.about-copy h2 { font-size: 22px; line-height: 1.3; font-weight: 400; letter-spacing: -.025em; margin-bottom: 20px; }
.about-copy h3 { font-size: 12px; font-weight: 400; margin: 28px 0 10px; }
.about-copy p { font-size: 14px; line-height: 1.8; color: var(--muted); }
.about-copy p + p { margin-top: 18px; }
.about-knowledge { display: grid; grid-template-columns: .8fr 1.4fr; gap: clamp(35px, 5vw, 80px); margin: 45px 0 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.about-knowledge h2 { font-size: 22px; line-height: 1.3; font-weight: 400; letter-spacing: -.025em; margin-bottom: 20px; }
.about-experience ul, .about-software-list { list-style: none; padding: 0; margin: 0; }
.about-experience li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--muted); }
.about-experience li:first-child { padding-top: 0; }
.about-software-list { column-count: 2; column-gap: 28px; }
.about-software-list li { break-inside: avoid; padding-bottom: 12px; }
.about-software-label { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 13px; line-height: 1.5; }
.about-software-track { position: relative; height: 3px; margin-top: 5px; background: var(--line); }
.about-software-track > span { display: block; height: 100%; background: var(--skill-color); }
.about-summary-group { margin-top: 20px; }
.about-summary-group h3 { margin-bottom: 6px; font-size: 12px; font-weight: 400; }
.about-summary-group p { font-size: 13px; line-height: 1.6; color: var(--muted); }
.about-intro { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px 24px; }
.about-intro > .about-resume { margin-top: 0; }
.about-resume[aria-disabled="true"] { cursor: default; }
.about-contact { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.about-resume-bottom h2 { font-size: 22px; font-weight: 400; letter-spacing: -.025em; margin-bottom: 14px; }
.about-social { justify-content: flex-start; gap: 20px; margin-top: 22px; }
.about-social > a, .about-social > span { width: 24px; height: 24px; }
.about-social svg { width: 22px; height: 22px; }


/* ----- SHORT SCREENS ----- */
@media (max-height: 500px) {
  :root { --header-height: 64px; }
  .work-canvas { inset: 78px 0 58px; }
  .is-expanded .project[data-row="top"] { bottom: calc(50% + 24px); }
  .is-expanded .project[data-row="bottom"] { top: calc(50% + 24px); }
  .is-expanded .project::after { height: 24px; }
  .is-expanded .project[data-row="top"]::after { bottom: -24px; }
  .is-expanded .project[data-row="bottom"]::after { top: -24px; height: 18px; }
  .is-expanded .project[data-row="top"]::before { bottom: -26px; }
  .is-expanded .project[data-row="bottom"]::before { top: -26px; }
  .is-expanded .project[data-row="top"] .project-year { top: calc(100% + 35px); }
  .is-expanded .project[data-row="bottom"] .project-year { bottom: calc(100% + 35px); }
}


/* ----- PHONES ----- */
/* The mockup stacked four patches here; these are their final computed values. D8: no category menu. */
@media (max-width: 782px) {
  body.admin-bar { --admin-offset: 46px; }
}
@media (max-width: 650px) {
  :root { --header-height: 88px; }
  .site-header { gap: 12px; }
  .site-header .identity { font-size: clamp(22px, 7.1vw, 28px); }
  .site-header .identity-caption { font-size: 10px; }
  .menu-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 36px; height: 44px; flex-shrink: 0; padding: 7px; }
  .menu-toggle span { display: block; height: 1.5px; width: 22px; background: currentColor; transition: transform 180ms ease, opacity 180ms ease; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(6.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-6.5px) rotate(-45deg); }
  .site-header .header-links { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 20px var(--pad) 26px; background: var(--paper); border-bottom: 1px solid var(--line); gap: 20px; align-items: flex-end; }
  .site-header.is-menu-open .header-links { display: flex; }
  .site-header .header-links nav { flex-direction: column; align-items: flex-end; gap: 12px; font-size: 17px; }
  .site-header .header-links nav a { padding: 5px 0; }
  .category-menu { display: none; }
  .work-canvas { inset: 104px 0 85px; }
  .is-expanded .work-canvas { top: 102px; bottom: 178px; }
  .projects { width: min(calc(100% - 48px), calc((100svh - 426px) * .84 + 20px)); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px 20px; }
  .work-stage:not(.is-expanded) .projects { top: calc(50% - 12px); }
  .project-info { font-size: 10px; margin-top: 7px; }
  .project-info > span { display: none; }
  .scene-bottom { bottom: 26px; font-size: 10px; }
  .selection-label, .scroll-hint { width: 92px; }
  .view-toggle { font-size: 13px; padding: 12px 6px; }
  .view-toggle > span { margin-left: 5px; }
  .is-expanded .project[data-row="top"] { bottom: calc(50% + 34px); }
  .is-expanded .project[data-row="bottom"] { top: calc(50% + 34px); }
  .is-expanded .project::after { height: 34px; }
  .is-expanded .project[data-row="top"]::after { bottom: -34px; }
  .is-expanded .project[data-row="bottom"]::after { top: -34px; height: 28px; }
  .is-expanded .project[data-row="top"]::before { bottom: -36px; }
  .is-expanded .project[data-row="bottom"]::before { top: -36px; }
  .is-expanded .project[data-row="top"] .project-year { top: calc(100% + 45px); }
  .is-expanded .project[data-row="bottom"] .project-year { bottom: calc(100% + 45px); }
  .blog-entry { grid-template-columns: 1fr 20px; gap: 12px; }
  .blog-entry > .eyebrow { grid-column: 1 / -1; }
  .page-intro { padding-top: 35px; }
  .contact-layout { grid-template-columns: 1fr; gap: 28px; }
  .contact-form { grid-template-columns: 1fr; }
  .about-profile { grid-template-columns: 1fr; gap: 32px; }
  .about-knowledge { grid-template-columns: 1fr; gap: 36px; }
  .about-portrait { max-width: 340px; }
}
@media (max-width: 650px) and (max-height: 500px) {
  .work-canvas { bottom: 58px; }
  .is-expanded .work-canvas { bottom: 122px; }
  .projects { width: min(calc(100% - 48px), calc((100svh - 345px) * .84 + 20px)); }
  .is-expanded .project[data-row="top"] { bottom: calc(50% + 24px); }
  .is-expanded .project[data-row="bottom"] { top: calc(50% + 24px); }
  .is-expanded .project::after { height: 24px; }
  .is-expanded .project[data-row="top"]::after { bottom: -24px; }
  .is-expanded .project[data-row="bottom"]::after { top: -24px; height: 18px; }
  .is-expanded .project[data-row="top"]::before { bottom: -26px; }
  .is-expanded .project[data-row="bottom"]::before { top: -26px; }
  .is-expanded .project[data-row="top"] .project-year { top: calc(100% + 35px); }
  .is-expanded .project[data-row="bottom"] .project-year { bottom: calc(100% + 35px); }
}
@media (max-width: 420px) {
  .about-software-list { column-count: 1; }
}
@media (max-width: 374px) and (min-height: 501px) {
  .projects { width: min(calc(100% - 48px), calc((100svh - 462px) * .84 + 20px)); }
}
@media (prefers-reduced-motion: reduce) {
  .project-react { transform: none !important; scale: none !important; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@view-transition { navigation: auto; }
