/* ==================================================
   Portfolio fonts
   ================================================== */
@font-face{font-family:Atkinson;src:url('./atkinson-hyperlegible-next.woff2');font-weight:200 800}
@font-face{font-family:Literata;src:url('./literata.woff2');font-weight:200 900}
@font-face{font-family:Inconsolata;src:url('./inconsolata.woff2');font-weight:200 900}
/* ==================================================
   Theme variables
   Light theme is the default; dark theme is enabled by appearance.js.
   ================================================== */
:root{--bg:#FCFBF4;--ink:#131311;--muted:#62605a;--rule:#dedcd4;--link-rule:#8d8a80;--mark:#ffe14d}
:root[data-portfolio-theme="dark"]{--bg:#302F2C;--ink:#f4f1e6;--muted:#b5b2a6;--rule:#4b4a45;--link-rule:#94918a;--mark:#e8cf5e}
/* ==================================================
   Streamlit page shell
   ================================================== */
.static-page{margin:0;background:var(--bg)}
.static-page #portfolio{box-sizing:border-box;margin:0 auto;padding:0 clamp(1.1rem,4vw,3rem) 2rem;max-width:72rem}
.stApp:has(#portfolio){background:var(--bg)}
.stApp:has(#portfolio) [data-testid="stHeader"]{display:none}
.stMainBlockContainer:has(#portfolio){padding:0 clamp(1.1rem,4vw,3rem) 2rem;max-width:72rem}
/* ==================================================
   Portfolio-wide base styles
   ================================================== */
#portfolio{color:var(--ink);font:18px/1.55 Atkinson,Arial,sans-serif}
#portfolio *{box-sizing:border-box}
/* ==================================================
   Navigation and footer
   Used by navbar() and footer() in views.py.
   ================================================== */
#portfolio nav,#portfolio footer,#portfolio .actions,#portfolio .navlinks{display:flex;align-items:center;flex-wrap:wrap;gap:1.15rem}
#portfolio nav{min-height:76px;border-bottom:1px solid var(--rule);font-size:16px}
#portfolio .brand{font:650 19px Literata,Georgia,serif;margin-right:auto}
#portfolio .actions{margin-left:auto}
#portfolio button{font:inherit;color:inherit;background:transparent;border:1px solid var(--rule);border-radius:5px;padding:3px 9px;cursor:pointer}
/* ==================================================
   Links and keyboard focus
   ================================================== */
#portfolio a{color:inherit;text-decoration:underline;text-decoration-color:var(--link-rule);text-underline-offset:4px}
#portfolio nav a,#portfolio .tile{text-decoration:none}
#portfolio a:hover{text-decoration:underline;text-decoration-thickness:2px}
#portfolio :focus-visible{outline:3px solid var(--ink);outline-offset:4px}
/* ==================================================
   Typography
   ================================================== */
#portfolio h1,#portfolio h2,#portfolio h3{font-family:Literata,Georgia,serif;color:inherit;letter-spacing:-.04em;padding:0;line-height:1.22}
#portfolio h1{font-size:clamp(2.45rem,5.3vw,4.6rem);margin:0 0 1.2rem;font-weight:640}
/* ==================================================
   Hero section
   Rendered by hero() in views.py.
   ================================================== */
#portfolio .hero{padding:clamp(2.8rem,6vw,5rem) 0 3rem;text-align:center}
#portfolio p{font:inherit;color:inherit;max-width:46rem;margin:.5rem 0 1rem}
#portfolio .hero p{font-size:clamp(1.15rem,2vw,1.5rem);max-width:50rem;margin-inline:auto}
/* ==================================================
   Portfolio content sections
   Covers Latest, Code, Experience, Teaching, and About.
   ================================================== */
#portfolio section{border-top:1px solid var(--rule);padding:2rem 0 2.4rem}
#portfolio h2{font-size:2rem;margin:0 0 1.2rem}
#portfolio h3{font-size:1.45rem;margin:.25rem 0 .5rem}
/* ==================================================
   Latest news section
   Rendered by latest() in views.py.
   ================================================== */
#portfolio .news{display:grid;grid-template-columns:8rem 1fr;gap:1rem}
#portfolio small,#portfolio time,#portfolio figcaption{font: .91rem/1.5 Inconsolata,monospace;color:var(--muted)}
#portfolio .news a{font-weight:650}
/* ==================================================
   Code projects grid
   Rendered by code() in views.py.
   ================================================== */
#portfolio .grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:2rem 1.4rem}
#portfolio .tile{display:block}
/* ==================================================
   Images and figures
   Applies to project thumbnails, teaching figures,
   and case-study diagrams.
   ================================================== */
#portfolio img{width:100%;height:auto;display:block}
#portfolio .experience-entry{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:1rem}
#portfolio .role-links{display:flex;gap:.45rem}
#portfolio .role-links img{width:56px;height:56px;object-fit:contain}
#portfolio #teaching h3{display:grid;grid-template-columns:22px 1fr;align-items:start;gap:.5rem}
#portfolio .club-logo{width:22px;height:22px;margin-top:calc((1.22em - 22px)/2)}
#portfolio .tile img{margin-bottom:.8rem}
#portfolio .grid p,#portfolio .news p{color:var(--muted);margin:.35rem 0 0}
#portfolio figure{max-width:44rem;margin:1.4rem 0}
#portfolio figcaption{margin-top:.4rem}
/* ==================================================
   Project case-study pages
   Rendered by render_case_study() in views.py.
   ================================================== */
#portfolio .study{max-width:46rem;margin:3rem auto}
#portfolio .study small{display:block;margin:2rem 0 .4rem}
#portfolio .study-links{display:flex;flex-wrap:wrap;align-items:baseline;gap:.5rem 1rem}
#portfolio .study h1{margin:0}
#portfolio .study-link{margin-left:auto;font-size:.95rem}
#portfolio .study h2{margin-top:2rem}
/* ==================================================
   Footer
   ================================================== */
#portfolio footer{border-top:1px solid var(--rule);padding-top:1.5rem}
/* ==================================================
   Responsive layouts
   ================================================== */
@media(max-width:900px){#portfolio .grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){#portfolio .grid,#portfolio .news{grid-template-columns:1fr}#portfolio .news{gap:.35rem}#portfolio nav{padding:1rem 0;gap:.5rem}#portfolio .navlinks{order:3;width:100%;gap:.9rem}#portfolio .hero{padding:2.75rem 0 2rem}}
@media(max-width:640px){#portfolio .role-links{flex-direction:column}}
