/* Shared visual system. Page modules own their specialized layouts. */
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { color: var(--fg); font-family: var(--font-family); line-height: 1.65; --section-space-y: 4rem; --section-space-y-mobile: 2.5rem; --hover-lift-card: -3px; }
h1,h2,h3,h4 { font-family: var(--title-font-family); line-height: 1.12; letter-spacing: -.045em; }
a { color: inherit; }
button,input,textarea { font: inherit; }
button,a,input,textarea,summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 5px; }
::selection { background: var(--accent-fill); color: var(--on-accent); }
img { max-width: 100%; }
.shell { width: min(1200px, calc(100% - 96px)); margin-inline: auto; }
.mono,.eyebrow { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .7rem; letter-spacing: .09em; }
.eyebrow { text-transform: uppercase; color: var(--acc); font-weight: 600; }
.accent { color: var(--acc); }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 200; padding: 12px 20px; background: var(--fg); color: var(--bg); }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 100; width: 100%; background: var(--topnav); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); }
.site-header.scrolled { box-shadow: 0 6px 20px #00000008; }
.nav-inner { max-width: 1320px; margin: auto; padding: 0 48px; height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.wordmark { font: 700 2.5rem var(--title-font-family); letter-spacing: -.1em; text-decoration: none; line-height: 1; }
.wordmark span { color: var(--acc); }
.desktop-links { display: flex; gap: 30px; }
.desktop-links a,.mobile-links a { text-decoration: none; font-size: .82rem; position: relative; }
.desktop-links a[aria-current]::after { content: ''; position: absolute; bottom: -10px; left: 0; right: 0; height: 2px; background: var(--acc); }
.desktop-links a:hover,.site-footer a:hover,.text-link:hover { color: var(--acc); }
.nav-actions { display: flex; gap: 20px; align-items: center; }
.theme-toggle { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--fg); cursor: pointer; }
.mobile-menu { display: none; }
.scroll-progress { height: 2px; background: var(--acc); transform: scaleX(0); transform-origin: left; position: absolute; bottom: -1px; width: 100%; }
.home-hero { padding-block: 35px 25px; }
.hero-topline { display: flex; justify-content: space-between; align-items: center; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 45px; align-items: center; min-height: 610px; padding: 35px 0; }
.hero-intro { font-size: .95rem; margin: 0 0 22px; }
.hero-copy h1 { font-size: clamp(3.4rem, 6.5vw, 6rem); font-weight: 500; margin: 0 0 28px; line-height: 1; letter-spacing: -.075em; }
.hero-description { max-width: 410px; color: var(--muted); font-size: 1.05rem; }
.button-row { display: flex; flex-wrap: wrap; gap: 25px; align-items: center; margin: 30px 0; }
.button,.default-button,.redirect-button,.btn-submit { display: inline-flex; align-items: center; justify-content: center; gap: 24px; background: var(--accent-fill); color: var(--on-accent); border: 1px solid transparent; border-radius: 4px; padding: 14px 22px; font-size: .85rem; font-weight: 600; text-decoration: none; transition: transform .2s; }
.button:hover { transform: translateY(-3px); }
.text-link { font-size: .85rem; font-weight: 600; text-decoration: none; }
.hero-credentials { display: flex; gap: 28px; margin-top: 40px; }
.hero-credentials span { font-size: .7rem; color: var(--muted); border-left: 1px solid var(--line); padding-left: 15px; }
.hero-credentials strong { display: block; font: 600 .9rem var(--title-font-family); color: var(--fg); margin-top: 5px; }
.hero-art { position: relative; height: 500px; background: linear-gradient(var(--line) 1px, transparent 1px),linear-gradient(90deg,var(--line) 1px,transparent 1px); background-size: 36px 36px; }
.portrait-frame { position: absolute; inset: 42px 45px 40px; transform: rotate(-4deg); background: var(--card); padding: 10px 10px 35px; box-shadow: 0 15px 30px #0002; z-index: 2; }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; filter: saturate(.75); }
.portrait-caption { display: block; text-align: center; font-size: .55rem; padding-top: 7px; }
.art-coordinate { position: absolute; top: 10px; left: 12px; font-size: .6rem; background: var(--bg); }
.hero-scroll { text-decoration: none; color: var(--muted); }
.home-section { padding-block: 90px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 25px; margin-bottom: 36px; }
.section-heading h2,.home-about h2 { font-size: clamp(2rem,3.2vw,3rem); font-weight: 500; margin: 12px 0 0; }
.featured-work { display: grid; grid-template-columns: 1.2fr 1fr; color: var(--fg); text-decoration: none; border: 1px solid var(--line); background: var(--card); }
.work-image { position: relative; min-height: 430px; overflow: hidden; background: var(--bg2); }
.work-image img { width: 100%; height: 100%; position: absolute; object-fit: cover; transition: transform .5s; }
.featured-work:hover img { transform: scale(1.035); }
.image-label { position: absolute; left: 18px; bottom: 18px; background: var(--bg); padding: 9px 13px; }
.work-copy { padding: 45px; }
.work-copy h3 { font-size: 2.8rem; font-weight: 500; margin: 25px 0; }
.work-copy h4 { font-size: 1.1rem; letter-spacing: -.02em; margin: 0; }
.work-copy p,.project-preview p,.interest-tile p { font-size: .9rem; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 24px 0; }
.tags span { border: 1px solid var(--line); padding: 4px 10px; font: .65rem ui-monospace, monospace; border-radius: 3px; }
.project-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 28px; }
.project-preview { padding: 25px 0; text-decoration: none; border-bottom: 1px solid var(--line); }
.project-preview h3,.interest-tile h3 { font-size: 1.4rem; font-weight: 500; display: flex; justify-content: space-between; gap: 15px; }
.project-preview:hover h3,.interest-tile:hover h3 { color: var(--acc); }
.home-about { background: var(--bg2); border-block: 1px solid var(--line); width: 100%; padding: 80px 0; }
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 70px; }
.about-grid p:not(.eyebrow) { color: var(--muted); }
.home-photos { padding-bottom: 0; }
.home-slideshow { width: 100%; border: 1px solid var(--line); background: var(--card); padding: clamp(8px, 1.5vw, 18px); }
.home-slideshow__stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg2); }
.home-slideshow__photo { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s; }
.home-slideshow__photo.is-active { opacity: 1; visibility: visible; }
.home-slideshow__footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; min-height: 54px; }
.home-slideshow__count { color: var(--muted); }
.home-slideshow__controls { display: flex; gap: 8px; }
.home-slideshow__controls button { min-width: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--bg); color: var(--fg); cursor: pointer; font-size: .8rem; }
.home-slideshow__controls button:hover { border-color: var(--acc); color: var(--acc); }
.interest-grid { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); }
.interest-tile { padding: 32px; text-decoration: none; }
.interest-tile + .interest-tile { border-left: 1px solid var(--line); }
.tile-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.tile-top i { color: var(--acc); font-size: 1.5rem; }
.connect-section { border-top: 1px solid var(--line); padding-block: 70px 90px; }
.connect-section h2 { font-size: clamp(2rem,3.2vw,3rem); font-weight: 500; margin: 20px 0 30px; }
.connect-section em { font-style: normal; color: var(--acc); }
.site-footer { width: 100%; border-top: 1px solid var(--line); background: var(--bg2); padding: 45px max(48px, calc((100% - 1200px)/2)) 22px; }
.footer-top,.footer-bottom { display: flex; justify-content: space-between; gap: 24px; }
.footer-top p { color: var(--muted); font-size: .8rem; }
.footer-top nav { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; }
.site-footer a { text-decoration: none; }
.footer-top nav a,.footer-bottom { font-size: .7rem; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 28px; color: var(--muted); }
/* Bring all existing content pages into the same system. */
.pattern-banner { height: auto !important; min-height: 290px; border-bottom: 1px solid var(--line); background: var(--pattern-background); background-size: var(--pattern-size); padding: 35px 0; }
.pattern-banner .banner-text { max-width: 1200px; text-align: left; text-shadow: none; justify-content: flex-start; }
.pattern-banner .banner-box { max-width: 100%; width: 100%; text-align: left; margin: 0; background: none; backdrop-filter: none; padding: 10px 0; }
.pattern-banner h1 { font-size: clamp(2.4rem,5vw,4.4rem); font-weight: 500; max-width: 1000px; }
.pattern-banner .markdown-hero { max-width: 760px; color: var(--muted); }
.section-header__title { font-family: var(--title-font-family); font-weight: 500; font-size: 2rem; letter-spacing: -.045em; }
.section-header__eyebrow { color: var(--acc); font-family: ui-monospace,monospace; }
.card,.acc-card,.project-card,.contact-form,.resume-viewer { border: 1px solid var(--line); box-shadow: none; border-radius: 6px; }
.card:hover,.acc-card:hover { transform: none; filter: none; }
.card p,.card li,.section-body { line-height: 1.8; }
.skill-icon i { font-size: 2rem; color: var(--acc); }
.project-card__content { padding: 28px; }
.project-card__title { font-family: var(--title-font-family); font-size: 1.65rem; letter-spacing: -.04em; }
.project-card__text { color: var(--muted); }
.project-cards .project-card { height: 100%; }
.project-card__content { flex: 1; }
.project-card__title { text-transform: none; }
.project-card--collab .redirect-button { color: var(--on-accent); }
.section-meta__item { border-radius: 3px; background: var(--card); }
.page-section-pattern { background: var(--bg2); }
.section-kicker { font-family: var(--title-font-family); color: var(--acc); }
.magazine { max-width: 1000px; }
.contact-section { width: min(760px,100%); }
.contact-form { background: var(--card); padding: clamp(22px,4vw,45px); }
.contact-form input,.contact-form textarea { color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 13px; }
.contact-form label { color: var(--fg); }
.filter-btn { border: 1px solid var(--line); color: var(--fg); background: var(--card); }
.filter-btn.active { background: var(--accent-fill); color: var(--on-accent); }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .65s ease, transform .65s ease; }
.reveal.revealed { opacity: 1; transform: none; }
[hidden] { display: none !important; }
.carousel { width: min(1100px,100%); box-shadow: none; border: 1px solid var(--line); }
.empty-state { color: var(--muted); text-align: center; padding: 20px; }
.gallery-cols { display: block; columns: 3; column-gap: 20px; }
.gallery-photo { display: block; width: 100%; padding: 0; margin: 0 0 20px; background: var(--bg2); border: none; cursor: zoom-in; break-inside: avoid; }
.gallery-photo img { display: block; width: 100%; height: auto; }
.photo-dialog { max-width: 95vw; max-height: 95vh; padding: 16px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); }
.photo-dialog::backdrop { background: #000c; }
.photo-dialog img { display: block; max-width: 85vw; max-height: 78vh; object-fit: contain; margin-top: 12px; }
@media (max-width: 1000px) {
  .gallery-cols { columns: 2; }
  .shell { width: calc(100% - 48px); }
  .nav-inner { padding-inline: 24px; }
  .desktop-links { gap: 20px; }
  .hero-grid { gap: 20px; min-height: 540px; }
  .hero-art { height: 420px; }
  .portrait-frame { inset: 45px 28px; }
  .work-copy { padding: 28px; }
  .work-copy h3 { font-size: 2.3rem; }
  .about-grid { gap: 35px; }
  .interest-tile { padding: 24px; }
}
@media (max-width: 700px) {
  .gallery-cols { columns: 1; }
  .nav-inner { height: 70px; }
  .desktop-links { display: none; }
  .mobile-menu { display: block; }
  .mobile-menu summary { cursor: pointer; font-size: .85rem; }
  .mobile-links { position: absolute; top: 70px; left: 0; right: 0; background: var(--bg); padding: 20px 24px; border-bottom: 1px solid var(--line); display: grid; gap: 18px; }
  .mobile-links [aria-current] { color: var(--acc); }
  .hero-topline > .mono { display: none; }
  .hero-grid { grid-template-columns: 1fr; padding-top: 35px; gap: 35px; }
  .hero-copy h1 { font-size: clamp(3.2rem,11vw,5rem); }
  .hero-credentials { margin-top: 28px; }
  .hero-art { height: 400px; max-width: 440px; width: 100%; margin: auto; }
  .portrait-frame { inset: 30px 55px; }
  .home-section { padding-block: 55px; }
  .home-photos { padding-bottom: 0; }
  .home-slideshow__stage { aspect-ratio: 4 / 3; }
  .section-heading { align-items: start; flex-direction: column; gap: 18px; }
  .featured-work,.project-pair,.about-grid,.interest-grid { grid-template-columns: 1fr; }
  .work-image { min-height: 320px; }
  .project-pair { gap: 0; }
  .home-about { padding: 50px 0; }
  .interest-tile + .interest-tile { border-left: 0; border-top: 1px solid var(--line); }
  .tile-top { margin-bottom: 25px; }
  .connect-section { padding-block: 50px; }
  .site-footer { padding: 35px 24px 22px; }
  .footer-top,.footer-bottom { flex-wrap: wrap; }
  .footer-top nav { gap: 15px; }
  .footer-bottom span:nth-child(2) { display: none; }
  .pattern-banner { min-height: 230px; }
  .pattern-banner .banner-text { padding-inline: 24px; max-width: 100%; }
  .project-detail-container { min-width: 0; }
  .project-detail-container > [style*="grid"] { grid-template-columns: minmax(0,1fr) !important; }
  .card-container { padding-inline: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
@media print { .site-header,.site-footer,.hero-scroll,.skip-link { display: none; } .reveal { opacity: 1; transform: none; } }
