/* Shared styles. System fonts, no external dependencies. */
:root{--paper:#f7f6f3;--ink:#292c29;--muted:#62675f;--line:#eaeaea;--accent:#45604c}
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:2rem}body{margin:0;background:var(--paper);color:var(--ink);font-family:"Helvetica Neue",Arial,sans-serif;font-size:18px;line-height:1.65}a{color:inherit}a:focus-visible{outline:3px solid var(--accent);outline-offset:6px}.site-header,main,footer{width:min(1100px,calc(100% - 64px));margin-inline:auto}.site-header{display:flex;justify-content:space-between;align-items:center;padding:30px 0;border-bottom:1px solid var(--line);gap:24px}.wordmark{text-decoration:none;font-size:20px;font-weight:600;letter-spacing:-.03em}.wordmark span{display:block;font-size:12px;font-weight:400;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}nav{display:flex;gap:28px}nav a{font-size:16px;text-decoration:none;padding:5px 0}.site-header nav a:hover,.site-header nav a[aria-current]{box-shadow:0 1px var(--ink)}.hero{padding:80px 0 90px}.eyebrow{font-family:monospace;font-size:13px;text-transform:uppercase;letter-spacing:.12em;color:var(--muted)}h1,h2,h3,p{margin-top:0}h1{font-family:Georgia,serif;font-weight:400;font-size:clamp(36px,5vw,60px);line-height:1.05;letter-spacing:-.045em;margin:24px 0 56px}h2{font-size:24px;font-weight:500;letter-spacing:-.03em}.intro{display:grid;grid-template-columns:1fr 2fr;gap:48px}.bio{max-width:660px}.bio p:last-child{margin-bottom:0}.projects{padding:40px 0 100px;border-top:1px solid var(--line)}.section-heading{display:flex;justify-content:space-between;align-items:baseline;gap:20px;margin-bottom:28px}.section-heading h2{margin:0}.project-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.project-card{background:#fff;border:1px solid #eaeaea;border-radius:8px;overflow:hidden;text-decoration:none}.project-card:hover{border-color:#a7b2a7}.preview{height:210px;position:relative;display:grid;place-items:center;background-color:#edf0e9;background-image:linear-gradient(#dfe4dc 1px,transparent 1px),linear-gradient(90deg,#dfe4dc 1px,transparent 1px);background-size:24px 24px}.project-card:nth-child(2) .preview{background-color:#f0ece4}.project-card:nth-child(3) .preview{background-color:#e8edef}.drawing{width:94px;height:94px;border:2px solid #697967;transform:rotate(-30deg);position:relative}.drawing:after{content:"";position:absolute;inset:19px;border:2px solid #697967;border-radius:50%}.drawing-2{width:120px;height:62px;transform:rotate(-35deg);border-radius:32px}.drawing-3{transform:rotate(30deg);border-radius:50%;border-width:10px}.figure-number{position:absolute;bottom:12px;left:16px;font:10px monospace;color:var(--muted)}.card-copy{padding:24px}.card-copy h3{font-size:20px;font-weight:500;letter-spacing:-.025em;margin:12px 0}.card-copy h3 span{float:right}.card-copy p{font-size:14px;color:var(--muted);margin:0}.subpage{padding:80px 0 120px;max-width:780px;min-height:70vh}.subpage h1{margin-bottom:24px}.back{display:inline-block;margin-bottom:32px;font-size:14px;text-underline-offset:5px}.lead{font-size:20px;color:var(--muted)}.placeholder{padding:32px;margin:40px 0;background:#fff;border:1px solid var(--line);border-radius:8px}.placeholder p{margin-bottom:0;color:var(--muted)}footer{padding:24px 0 36px;border-top:1px solid var(--line);display:flex;justify-content:space-between;font-size:12px;color:var(--muted)}.skip-link{position:absolute;top:-100px;left:16px;background:#fff;padding:12px;z-index:1}.skip-link:focus{top:10px}@media(max-width:700px){.site-header,main,footer{width:calc(100% - 40px)}.site-header{align-items:flex-start;flex-direction:column;gap:16px}nav{gap:24px}.hero{padding:48px 0 60px}h1{margin-bottom:40px}.intro{grid-template-columns:1fr;gap:8px}.project-grid{grid-template-columns:1fr}.section-heading{align-items:flex-start;flex-direction:column;gap:8px}.preview{height:220px}.projects{padding-bottom:60px}.subpage{padding:48px 0 70px}footer{gap:16px;flex-wrap:wrap}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* Imported project articles retain the shared portfolio typography. */
.project-content{max-width:800px;margin:0 auto;padding:64px 0 96px}.project-content h1{font-size:clamp(32px,4.5vw,48px);margin-bottom:32px}.project-content h2{margin-top:56px}.project-content p,.project-content li{max-width:72ch}.project-content figure{margin:32px 0}.project-content img{display:block;width:100%;height:auto;background:#fff;border:1px solid var(--line);border-radius:8px}.project-content h3{margin-top:32px}
.project-content figcaption{font-size:14px;color:var(--muted);padding:10px 0 0}.project-content li{margin-left:24px}

.project-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.project-thumbnail{display:block;width:100%;height:260px;object-fit:contain;background:#fff;padding:16px}@media(max-width:700px){.project-grid{grid-template-columns:1fr}}

/* Compact previews on the projects index. */
.project-list{max-width:1100px}
.project-row{display:grid;grid-template-columns:minmax(0,360px) minmax(0,1fr);align-items:center;gap:40px;padding:32px 0;border-bottom:1px solid var(--line)}
.project-row figure{margin:0;max-width:360px}
.project-row img{width:100%;height:auto;max-height:360px;object-fit:contain}
.project-description{min-width:0}
.project-description h2{margin:0 0 16px;font-size:30px}
.project-description p:last-child{margin-bottom:0;color:var(--muted);font-size:14px}
@media(max-width:700px){.project-row{grid-template-columns:1fr;gap:24px}.project-row figure{width:100%;margin-inline:auto}.project-row img{max-height:360px}}

.card-copy .eyebrow{font-size:13px}

.intro-title{font-family:inherit;font-size:20px;font-weight:500;line-height:1.3;letter-spacing:-.03em;margin:0}

/* Project detail pages scale with the viewport rather than a fixed column. */
.project-page .site-header,.project-page main,.project-page footer{width:80%;max-width:none}
.project-page .project-content{width:100%;max-width:none}
.project-page .project-content p,.project-page .project-content li{max-width:none;overflow-wrap:break-word}
.project-page .project-content h1{overflow-wrap:break-word}
.project-page .project-content img{width:auto;max-width:min(100%,512px);height:auto;max-height:512px;object-fit:contain}
@media(max-width:700px){.project-page .site-header,.project-page main,.project-page footer{width:calc(100% - 40px)}}

.project-page .project-content figure{max-width:512px}
.project-content .glossary{padding-left:24px}
.project-content .glossary li{margin-left:0;margin-bottom:8px}

.project-index{border-top:0;padding-top:64px}
.project-index .section-heading h1{font-size:clamp(32px,4.5vw,48px);margin:0}

.project-category{margin-top:40px}.project-category + .project-category{margin-top:64px}.project-category > h2{margin:0 0 24px}

.resume-content ul{padding-left:24px;margin:16px 0 24px}
.resume-content li{margin-left:0;margin-bottom:8px}
.resume-content h3{font-size:20px;line-height:1.4}
.resume-content a{text-underline-offset:4px}

/* Home: introduction and CAD hero, followed by a compact case study. */
.home-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:48px;padding:64px 0}
.home-introduction h1{font-family:inherit;font-size:clamp(24px,2.5vw,32px);font-weight:600;line-height:1.2;letter-spacing:-.035em;margin:20px 0 24px}
.home-introduction p{margin-bottom:20px}
.home-hero-image{margin:0;background:#fff;border:1px solid var(--line);border-radius:8px;overflow:hidden}
.home-hero-image img{display:block;width:100%;height:auto;max-height:480px;object-fit:contain}
.home-project-link{display:inline-block;font-size:16px;font-weight:500;text-underline-offset:5px;margin-top:8px}
.home-project-link span{margin-left:8px}
.home-featured{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:40px;border-top:1px solid var(--line);padding:40px 0 64px}
.featured-copy h2{font-size:26px;line-height:1.25;margin:12px 0 20px;font-weight:600}
.featured-copy > p:not(.eyebrow){font-size:18px}
.featured-image-link{display:block;width:70%;justify-self:center;border-radius:8px;overflow:hidden}
.featured-image-link img{display:block;width:100%;height:auto;max-height:238px;object-fit:contain}
@media(max-width:800px){.home-hero{grid-template-columns:1fr;gap:32px;padding:40px 0}.home-hero-image img{max-height:360px}.home-featured{grid-template-columns:1fr;gap:28px}.featured-image-link img{max-height:252px}}

/* Home copy hierarchy and a smaller CAD illustration. */
.home-introduction .eyebrow{font-size:13px;color:var(--muted)}
.home-introduction .home-lead{font-size:clamp(19px,1.8vw,23px);line-height:1.5;color:var(--ink)}
.home-introduction > p:not(.eyebrow):not(.home-lead){font-size:16px;line-height:1.65;color:var(--muted)}
.home-hero-image{width:63.75%;justify-self:center;align-self:center}
.home-hero-image img{max-height:306px}
@media(max-width:800px){.home-hero-image img{max-height:229.5px}}

/* Readable project prose with extra room for technical figures. */
.project-page main:has(.project-article){max-width:1100px}
.project-page .project-article > :is(h1,h2,h3,p,ul,ol,.project-back,.project-pagination){max-width:840px}
.project-page .project-article :is(p,li){max-width:840px;overflow-wrap:anywhere}
.project-page .project-article > p{margin-bottom:24px}
.project-page .project-article h2{margin:64px 0 24px;line-height:1.3}
.project-page .project-article h3{margin:36px 0 18px;line-height:1.4}
.project-page .project-article figure{width:100%;max-width:640px;margin:36px 0 44px}
.project-page .project-article figure.figure-wide{max-width:1100px}
.project-page .project-article figure img{width:auto;max-width:100%;height:auto;max-height:640px;object-fit:contain}
.project-page .project-article .figure-wide img{max-height:none}
.project-article figcaption{line-height:1.5;padding-top:12px;overflow-wrap:anywhere}
.project-article table{display:block;max-width:1100px;overflow-x:auto;border-collapse:collapse}
.project-article :is(th,td){padding:12px;border:1px solid var(--line);text-align:left}
.project-back{margin-bottom:24px}
.project-pagination{display:flex;justify-content:space-between;flex-wrap:wrap;gap:24px;border-top:1px solid var(--line);padding-top:24px;margin-top:64px}
.project-pagination a{font-size:16px;text-underline-offset:5px}
.home-current{border-top:1px solid var(--line);padding:40px 0 64px}
.home-current h2{font-size:26px;line-height:1.25;margin-bottom:24px;font-weight:600}
.home-current h3{font-size:20px;line-height:1.4;font-weight:500;margin-bottom:16px}
.home-current p{max-width:840px;margin-bottom:16px}
.resume-content{max-width:840px!important;margin-left:0;margin-right:0}
.resume-content h2{margin:48px 0 20px;line-height:1.3}
.resume-content h3{margin:28px 0 16px}
.resume-content p{margin-bottom:20px}
.resume-content li{line-height:1.65;margin-bottom:10px}
#cad-education{scroll-margin-top:24px}
@media(max-width:700px){
 .project-page .project-article{padding:40px 0 64px}
 .project-page .project-article h2{margin-top:44px}
 .project-page .project-article figure{margin:28px 0 36px}
 .project-pagination{flex-direction:column;align-items:flex-start}
 .home-current{padding:32px 0 48px}
}
@media print{
 @page{size:auto;margin:16mm}
 .resume-page{background:#fff;color:#111;font-size:11pt;line-height:1.4}
 .resume-page .site-header,.resume-page .skip-link{display:none!important}
 .resume-page main{width:100%;max-width:none;margin:0}
 .resume-page .resume-content{width:100%;max-width:none!important;padding:0}
 .resume-page h1{font-size:24pt;margin:0 0 12pt}
 .resume-page h2{font-size:15pt;margin:20pt 0 10pt;break-after:avoid}
 .resume-page h3{font-size:12pt;margin:14pt 0 8pt;break-after:avoid}
 .resume-page p,.resume-page ul{margin-top:0;margin-bottom:10pt}
 .resume-page li{line-height:1.4;margin-bottom:5pt}
 .resume-page a{color:inherit;text-decoration:none}
 .resume-page li{break-inside:avoid}
}

/* TOC is progressively enhanced: without JS the article remains unchanged. */
.project-toc-mobile{max-width:840px;margin:0 0 32px;border-block:1px solid var(--line);padding:14px 0;font-size:16px}
.project-toc-mobile summary{cursor:pointer;font-weight:500;padding:4px 0}
.project-toc-mobile summary:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
.project-toc-sidebar{display:none}
.project-toc-mobile ol,.project-toc-sidebar ol{list-style:none;padding:0;margin:16px 0 0}
.project-toc-mobile li,.project-toc-sidebar li{margin:0 0 6px}
.project-toc-mobile a,.project-toc-sidebar a{font-size:inherit;display:block;padding:6px 12px;border-left:2px solid transparent;text-decoration:none;line-height:1.45;color:var(--muted);overflow-wrap:anywhere}
.project-toc-mobile a:hover,.project-toc-sidebar a:hover{color:var(--ink);text-decoration:underline;text-underline-offset:4px}
.project-toc-mobile a[aria-current="location"],.project-toc-sidebar a[aria-current="location"]{border-left-color:var(--accent);color:var(--ink);font-weight:500}
.project-article h2,.resume-content h2{scroll-margin-top:var(--project-anchor-offset,24px)}
@media(min-width:1201px){
 .project-page:has(main.project-layout) .site-header,.project-page main.project-layout{width:90%;max-width:1440px}
 .project-page main.project-layout{display:grid;grid-template-columns:minmax(0,1100px) 200px;gap:40px;align-items:start}
 .project-layout .project-article,.project-layout .resume-content{min-width:0}
 .project-toc-mobile{display:none}
 .project-toc-sidebar{display:block;position:sticky;top:var(--project-anchor-offset,24px);max-height:calc(100dvh - var(--project-anchor-offset,24px) - 24px);overflow-y:auto;padding:64px 0 16px;font-size:14px}
 .project-toc-sidebar .eyebrow{margin-bottom:16px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
@media print{.project-toc-sidebar,.project-toc-mobile{display:none!important}.project-page main.project-layout{display:block;width:100%;max-width:none}}

/* Halve the space between site navigation and page content. */
@media screen{
 .home-hero{padding-top:32px}
 .project-index{padding-top:32px}
 .project-content{padding-top:32px}
 .project-content > h1:first-child{margin-top:12px}
 .project-toc-sidebar{padding-top:32px}
}
@media screen and (max-width:800px){.home-hero{padding-top:20px}}
@media screen and (max-width:700px){.project-page .project-article{padding-top:20px}}

/* Contents links use one quiet state, independent of the site navigation. */
.project-toc-mobile a,.project-toc-sidebar a{border-left:0;box-shadow:none;border-radius:3px;padding:7px 10px}
.project-toc-mobile a:hover,.project-toc-sidebar a:hover{background:#edf0e9;text-decoration:none}
.project-toc-mobile a[aria-current="location"],.project-toc-sidebar a[aria-current="location"]{background:#edf0e9;border:0;box-shadow:none;text-decoration:none;color:var(--ink)}

/* Shared sidebar heading with a compact, keyboard-accessible return to top. */
.toc-heading-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.project-toc-sidebar .toc-heading-row .eyebrow{margin:0}
.project-toc-sidebar .toc-top{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:36px;min-height:44px;margin-left:auto;padding:4px;color:var(--muted);text-decoration:none;font:10px monospace;letter-spacing:.08em;line-height:1.1}
.project-toc-sidebar .toc-top span:first-child{font-family:Arial,sans-serif;font-size:20px;line-height:1}
.project-toc-sidebar .toc-top:hover{color:var(--ink);text-decoration:none}

/* Coursework follows the student's school-year progression. */
.coursework{margin:16px 0 20px}
.coursework-year{padding:12px 0}
.coursework-year + .coursework-year{border-top:1px solid var(--line)}
.coursework-year-heading{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:8px}
.coursework-year-heading h4{margin:0;font-size:18px;font-weight:600}
.coursework-year-heading span{font-size:16px;color:var(--muted)}
.resume-content .coursework-year p{margin:0}
@media(max-width:500px){.coursework-year-heading{flex-wrap:wrap;gap:6px}}
@media print{.coursework-year{padding:10pt 0;break-inside:avoid}.coursework-year-heading h4{font-size:11pt}.coursework-year-heading span{font-size:10pt}}

.resume-content .coursework > h3{margin:0 0 8px}
.coursework-year:first-of-type{padding-top:4px}
.coursework-year:last-child{padding-bottom:0}
.resume-content .coursework + h2{margin-top:28px}

.coursework-year{margin-left:16px}
.resume-content .coursework-year p{padding-left:16px}
@media(max-width:500px){.coursework-year{margin-left:12px}.resume-content .coursework-year p{padding-left:12px}}

/* Keep Home and Projects aligned with the detail-page containers. */
@media screen and (min-width:701px){
 body:not(.project-page) > .site-header,body:not(.project-page) > main{width:80%;max-width:none}
}
@media screen and (min-width:1201px){
 body:not(.project-page) > .site-header,body:not(.project-page) > main{width:90%;max-width:1440px}
}

/* Tighter spacing between homepage sections. */
.home-hero{padding-bottom:32px}
.home-featured{padding-top:20px;padding-bottom:32px}
.home-current{padding-top:20px}
@media(max-width:800px){.home-hero{padding-bottom:20px}}
@media(max-width:700px){.home-current{padding-top:16px}}
