:root {
  color-scheme: light;
  --ink: #191b18;
  --paper: #f2efe8;
  --white: #f8f5ed;
  --muted: #59594e;
  --rule: #c7c2b5;
  --dark-rule: #53574b;
  --accent: #e3f67b;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Arial", Helvetica, sans-serif;
  --ease: cubic-bezier(.2,.75,.25,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); }
body:has(dialog[open]) { overflow: hidden; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
::selection { background: var(--accent); color: var(--ink); }
.wrap { width: min(90%, 1392px); margin-inline: auto; }
.eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow span { margin-inline: .32em; opacity: .7; }
.section-pad { padding-block: clamp(52px, 7vw, 108px); }
.skip { position: fixed; left: 20px; top: 12px; z-index: 12; padding: .6rem 1rem; background: var(--accent); transform: translateY(-160%); }
.skip:focus { transform: none; }

.reading-progress {
  position: fixed;
  z-index: 9;
  inset: 0 0 auto;
  height: 2px;
  background: var(--accent);
  mix-blend-mode: difference;
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}
.site-header { position: sticky; top: 0; z-index: 8; background: var(--ink); color: var(--white); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 10px; border-bottom: 1px solid var(--dark-rule); }
.wordmark { font-size: clamp(1.02rem, 2vw, 1.5rem); font-weight: 700; letter-spacing: -.04em; text-decoration: none; white-space: nowrap; }
.wordmark span { color: var(--accent); }
.site-header nav { display: flex; align-items: center; gap: clamp(7px, 2.8vw, 44px); }
.site-header nav a { display: inline-flex; align-items: center; min-height: 44px; gap: .35rem; font-size: clamp(.78rem, 1.4vw, 1rem); text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.nav-contact { color: var(--accent); }

.hero { background: var(--ink); color: var(--white); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding-block: clamp(34px, 3.1vw, 54px) clamp(52px, 4.8vw, 78px); }
.hero-copy { position: relative; z-index: 1; }
.hero .eyebrow { color: var(--accent); margin-bottom: clamp(13px, 2vw, 32px); }
.hero h1 { font-size: clamp(5.75rem, 11.55vw, 11.1rem); font-weight: 800; letter-spacing: -.073em; line-height: .79; }
.hero h1 > span, .hero h1 em { display: block; }
.hero h1 em { color: var(--accent); font: italic 400 .93em/.92 var(--serif); letter-spacing: -.073em; margin-top: .09em; margin-left: -.05em; }
.hero-sub { margin-block: clamp(24px, 3vw, 43px) 23px; font-size: clamp(1.05rem, 1.85vw, 1.58rem); line-height: 1.36; }
.pill { display: inline-flex; min-height: 50px; align-items: center; gap: .8rem; padding: .62rem 1.12rem; border-radius: 100vw; color: var(--ink); background: var(--accent); font-weight: 700; text-decoration: none; transition: background .2s, transform .25s var(--ease); }
.pill:hover { background: var(--white); transform: translateY(-3px); }
.pill:focus-visible { outline-color: var(--white); }

.portrait-frame { position: relative; border: 1px solid var(--dark-rule); aspect-ratio: 1.23; background: #050505; }
.portrait-window { position: absolute; inset: 0; overflow: hidden; }
.portrait-window img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; transform: translate(var(--look-x, 0), var(--look-y, 0)) scale(1.015); transition: transform .4s var(--ease); }
.corner { position: absolute; z-index: 1; width: 15px; height: 15px; background: linear-gradient(var(--accent),var(--accent)) center/100% 1px no-repeat, linear-gradient(var(--accent),var(--accent)) center/1px 100% no-repeat; }
.corner:nth-of-type(1) { top: -8px; left: -8px; }
.corner:nth-of-type(2) { top: -8px; right: -8px; }
.corner:nth-of-type(3) { bottom: -8px; left: -8px; }
.corner:nth-of-type(4) { bottom: -8px; right: -8px; }
.hero-portrait figcaption { margin-top: 14px; text-align: right; color: #ceccc3; font-size: .84rem; }

.section-heading .eyebrow { margin-bottom: 13px; }
.section-heading h2, .contact h2 { font: 400 clamp(2.7rem, 5.4vw, 5.8rem)/1.02 var(--serif); letter-spacing: -.052em; }
.section-heading h2 em, .contact h2 em { font-weight: 400; }
.work { padding-top: clamp(46px, 4.35vw, 70px); }
.work-toolbar { margin-block: 29px 23px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 19px; border-bottom: 1px solid var(--rule); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button { background: transparent; border: 1px solid #a39e92; border-radius: 100vw; padding: 6px 15px; min-width: 48px; min-height: 44px; font-size: .875rem; transition: background .2s, color .2s; }
.filters button:hover { background: #e3dfd3; }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
#work-count { color: var(--muted); letter-spacing: .08em; }

.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(15px, 2.2vw, 32px); row-gap: clamp(25px, 4vw, 54px); }
.project-open { display: block; width: 100%; background: none; border: 0; padding: 0 0 .72rem; border-bottom: 1px solid var(--rule); text-align: left; }
.project-cover { display: block; aspect-ratio: 1.75; overflow: hidden; background: #e4e0d6; }
.project-cover img { width: 100%; height: 100%; object-fit: cover; object-position: var(--cover-position, 50% 50%); transition: transform .65s var(--ease); }
.project-card[data-cover="nacht"] .project-cover img { object-position: 50% 53%; }
.project-card[data-cover="nacht"] .project-cover { background: #4c405f; }
.project-card[data-cover="panda"] .project-cover img,
.project-card[data-cover="fuchs"] .project-cover img { object-fit: contain; }
.project-card[data-cover="panda"] .project-cover { background: #c9bcbd; }
.project-card[data-cover="fuchs"] .project-cover { background: #555; }
.project-open:hover .project-cover img, .project-open:focus-visible .project-cover img { transform: scale(1.04); }
.project-meta, .project-heading { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.project-meta { margin-top: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .105em; font-size: .7rem; font-weight: 700; }
.project-heading { margin-top: 2px; font: 400 clamp(1.45rem, 2.7vw, 2.65rem)/1.06 var(--serif); letter-spacing: -.04em; }
.project-arrow { display: grid; flex: 0 0 44px; place-items: center; height: 44px; border: 1px solid var(--rule); border-radius: 50%; font: 1.23rem/1 var(--sans); transition: color .25s, background .25s, transform .25s; }
.project-open:hover .project-arrow, .project-open:focus-visible .project-arrow { background: var(--ink); color: var(--accent); transform: rotate(8deg); }

.profile { background: #e7e4d9; }
.profile-intro, .profile-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 7vw, 108px); }
.profile-intro { padding-bottom: clamp(32px, 4vw, 58px); align-items: end; }
.profile-intro p:not(.eyebrow) { max-width: 61ch; font-size: clamp(1.02rem, 1.45vw, 1.22rem); }
.text-link { display: inline-flex; align-items: center; min-height: 44px; gap: .55rem; font-weight: 700; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-thickness: 2px; }
.profile-intro .text-link { margin-top: 12px; }
.profile-grid { border-top: 1px solid var(--rule); padding-top: 26px; }
.profile h3 { font: 400 clamp(1.45rem, 2.6vw, 2.1rem)/1.12 var(--serif); letter-spacing: -.04em; margin-bottom: 12px; }
.timeline details, .personal { border-bottom: 1px solid var(--rule); }
summary { position: relative; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; inset: 16px 4px auto auto; font-size: 1.25rem; line-height: 1; }
details[open] > summary::after { content: "−"; }
.timeline summary { display: grid; padding: 16px 32px 14px 0; gap: 3px; }
.timeline summary strong { font-size: 1.08rem; line-height: 1.25; }
.timeline-date { color: var(--muted); font-size: .75rem; letter-spacing: .07em; text-transform: uppercase; }
.timeline-org { font-size: .89rem; color: var(--muted); }
.timeline-body { padding: 0 20px 15px 0; }
.timeline-body ul { margin: .4rem 0 0; padding-left: 1.25rem; }
details[open] .timeline-body, details[open] > dl { animation: enter .33s var(--ease) both; }
.skills > div { margin: 0 0 15px; }
.skills dt { font-weight: 700; margin-bottom: 5px; }
.skills dd { display: flex; flex-wrap: wrap; gap: 6px; }
.skills dd span { font-size: .81rem; border: 1px solid #aaa497; border-radius: 100vw; padding: .23rem .64rem; }
.skill-panel h3:not(:first-child) { margin-top: 26px; }
.languages > div { display: flex; justify-content: space-between; gap: 15px; padding: .45rem 0; border-bottom: 1px solid var(--rule); }
.languages dd { color: var(--muted); }
.personal { border-top: 1px solid var(--rule); margin-top: 37px; }
.personal summary { font-weight: 700; min-height: 48px; padding: 12px 28px 12px 0; }
.personal dl { padding: 0 0 18px; }
.personal dl div { display: grid; grid-template-columns: minmax(88px, 8em) 1fr; gap: 8px; margin-top: 5px; }
.personal dt { color: var(--muted); }

.contact { background: var(--ink); color: var(--white); padding-bottom: 22px; }
.contact .eyebrow, .contact h2 em { color: var(--accent); }
.contact h2 { font-size: clamp(3.25rem, 8.5vw, 9rem); margin-top: 10px; }
.contact-links { display: flex; flex-wrap: wrap; align-items: center; gap: 15px 30px; margin-top: 24px; }
.footer-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--dark-rule); margin-top: clamp(35px, 6vw, 85px); padding-top: 10px; color: #ceccc3; font-size: .82rem; }
.footer-line a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; text-underline-offset: 3px; }

#project-dialog { --sheet-gutter: clamp(16px, 4vw, 42px); width: min(850px, 94%); max-height: min(850px, 91dvh); max-width: none; border: 1px solid var(--rule); padding: 0; color: var(--ink); background: var(--paper); }
#project-dialog[open] { animation: sheet-in .35s var(--ease) both; }
#project-dialog::backdrop { background: rgb(16 17 14 / .78); }
.sheet-inner { padding: 0 var(--sheet-gutter) var(--sheet-gutter); }
.sheet-top { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 15px; border-bottom: 1px solid var(--rule); background: var(--paper); padding: 12px var(--sheet-gutter); }
.close-dialog, .gallery-nav button { min-width: 44px; min-height: 44px; border-radius: 50%; border: 1px solid #a49e91; background: transparent; line-height: 1; }
.close-dialog { font-size: 1.85rem; }
.close-dialog:hover, .gallery-nav button:hover { color: var(--white); background: var(--ink); }
.sheet-heading { margin-block: 15px 19px; }
.sheet-heading h2 { font: 400 clamp(2rem, 6vw, 4.35rem)/1.03 var(--serif); letter-spacing: -.055em; }
.sheet-heading p { color: var(--muted); margin-top: 6px; }
.gallery-image { display: grid; place-items: center; background: #e7e3d8; aspect-ratio: 1.73; overflow: hidden; }
.gallery-image img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.gallery-caption { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding-top: 6px; gap: 12px; font-size: .86rem; color: var(--muted); }
.gallery-nav { display: flex; gap: 6px; }
.gallery-nav button { font-size: 1.2rem; }
.sheet-description { border-top: 1px solid var(--rule); margin-top: 14px; padding-top: 15px; }
.sheet-description > p { font-size: 1.05rem; }
.sheet-description ul { padding-left: 1.2em; }
.sheet-description li + li { margin-top: .4em; }

@keyframes enter {
  from { opacity: 0; transform: translateY(13px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes sheet-in {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-enter { animation: enter .65s var(--ease) both; }
  .hero h1 > span { animation-delay: 65ms; }
  .hero h1 em { animation-delay: 130ms; }
  .hero-sub { animation-delay: 175ms; }
  .hero .pill { animation-delay: 220ms; }
  .hero-portrait { animation: enter .8s .07s var(--ease) both; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 68px; }
  .header-inner { min-height: 63px; }
  .hero-grid, .profile-intro, .profile-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 29px; }
  .hero h1 { font-size: clamp(5rem, 19vw, 8.9rem); }
  .hero-sub { margin-block: 22px 15px; }
  .hero-portrait { margin-inline: 4px; }
  .portrait-frame { aspect-ratio: 1.38; }
  .hero-portrait figcaption { margin-top: 11px; }
  .profile-grid { gap: 33px; }
}
@media (max-width: 520px) {
  .work-grid { grid-template-columns: 1fr; }
  .work-toolbar { margin-bottom: 16px; padding-bottom: 13px; }
  .project-heading { font-size: clamp(1.6rem, 6.8vw, 2.15rem); }
  .gallery-image { aspect-ratio: 1.35; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reading-progress { display: none; }
  .portrait-window img { transform: none; }
}
