/* Studio technique — dark surfaces, warm signal, restrained editor references. */
:root {
  color-scheme: dark;
  --bg: #101316;
  --surface: #171c21;
  --surface-raised: #20272e;
  --text: #e8ecee;
  --muted: #a6afb7;
  --line: #323a42;
  --accent: #e0b478;
  --on-accent: #15191d;
  --cool: #9bafb9;
  --display: 'Bahnschrift', 'Segoe UI Variable Display', 'Arial', sans-serif;
  --sans: 'Segoe UI', Arial, sans-serif;
  --motion-fast: 160ms;
  --motion-normal: 240ms;
  --ease-out: cubic-bezier(.2,.7,.2,1);
}

body { font-family: var(--sans); }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; }
p { text-wrap: pretty; }
.eyebrow, .project-number, .result-count { font-variant-numeric: tabular-nums; }
::selection { background: var(--accent); color: var(--on-accent); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
button, a { transition: color var(--motion-fast), background-color var(--motion-fast), border-color var(--motion-fast); }
.site-header { height: 88px; background: var(--bg); border-color: var(--line); }
.brand { font-size: 11px; letter-spacing: .09em; gap: 12px; }
.monogram { width: 42px; height: 42px; padding: 0; border: 1px solid #55616b; color: var(--text); }
.monogram svg { width: 100%; height: 100%; }
.brand-dot { color: var(--accent); }
#primary-nav { gap: 34px; }
#primary-nav a { min-height: 44px; align-items: center; font-size: 13px; }
.nav-index { color: var(--muted); font-size: 10px; }
.languages { gap: 2px; }
.languages button { min-width: 44px; min-height: 44px; }
.languages button[aria-pressed=true] { color: var(--accent); text-underline-offset: 7px; }
.menu-toggle { border-color: #55616b; }

/* Opening: the person and the work share a single viewport. */
.hero { padding-top: 25px; }
.hero-meta { color: var(--muted); }
.hero-meta .status-dot { border-radius: 1px; background: var(--accent); width: 5px; height: 5px; }
.hero-meta > span:first-child { gap: 10px; }
.hero-layout { display: grid; grid-template-columns: .83fr 1.17fr; gap: 55px; align-items: center; padding: 48px 0 40px; }
.hero-heading { display: block; padding: 0; min-width: 0; }
.hero-intro { color: var(--accent); font-size: 10px; margin-bottom: 25px; letter-spacing: .08em; }
h1 { font: 600 clamp(67px, 6.8vw, 104px)/.99 var(--display); letter-spacing: -.055em; }
h1 em { display: block; font: inherit; font-style: normal; letter-spacing: inherit; color: #9ba7b0; }
h1 em > span { color: var(--accent); }
.hero-aside { display: block; padding: 0; max-width: 380px; margin: 27px 0 0; justify-self: start; }
.hero-aside > p { color: #b7c0c7; max-width: none; font-size: 16px; line-height: 1.75; }
.text-link { display: inline-flex; width: auto; max-width: none; min-height: 48px; align-items: center; gap: 38px; margin-top: 26px; padding: 11px 18px; border: 1px solid #b78c55; color: var(--on-accent); background: var(--accent); font-size: 13px; font-weight: 600; }
.text-link:hover { background: #efc996; color: var(--on-accent); }
.text-link > span:last-child { font-size: 22px; }
.hero-specialties { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; color: var(--muted); font: 10px var(--mono); }
.hero-specialties span + span::before { content: '/'; color: #6f7d88; padding-right: 10px; }
.scene-frame { min-width: 0; border: 1px solid #3c464f; background: var(--surface); box-shadow: 0 18px 50px #0003; }
.scene-toolbar { height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 17px; color: #c0c8ce; font-size: 9px; border-bottom: 1px solid var(--line); }
.scene-toolbar > span:first-child { display: inline-flex; align-items: center; gap: 10px; }
.scene-toolbar svg { color: var(--accent); }
.scene-toolbar > span:last-child { color: var(--muted); font-size: 8px; }
.hero-project { height: clamp(310px,29vw,440px); }
.hero-project > img { object-position: 52% 50%; transition: transform var(--motion-normal) var(--ease-out); }
.hero-project::after { background: linear-gradient(180deg,#0003,transparent 35%,#000b); }
.hero-project:hover > img { transform: scale(1.015); }
.hero-image-top { top: 20px; left: 23px; right: 23px; font-size: 9px; color: #e4e8ea; }
.hero-image-bottom { left: 25px; right: 25px; bottom: 25px; }
.hero-image-bottom h2 { font-size: 48px; font-weight: 500; letter-spacing: -.025em; margin: 8px 0; }
.hero-image-bottom p { font-size: 12px; }
.circle-arrow { background: #171c21e8; border: 1px solid #7e8b95; color: var(--text); width: 44px; height: 44px; border-radius: 2px; font-size: 24px; transition: transform var(--motion-fast), background-color var(--motion-fast); }
.hero-project:hover .circle-arrow { transform: translate(2px,-2px); background: var(--accent); color: var(--on-accent); }
.viewport-corner { width: 13px; height: 13px; position: absolute; z-index: 1; opacity: .65; pointer-events: none; }
.corner-tl { top: 9px; left: 9px; border-top: 1px solid white; border-left: 1px solid white; }
.corner-br { right: 9px; bottom: 9px; border-bottom: 1px solid white; border-right: 1px solid white; }
.scene-caption { display: flex; justify-content: space-between; align-items: center; padding: 12px 17px; gap: 12px; border-top: 1px solid var(--line); }
.scene-caption .eyebrow { color: var(--muted); font-size: 8px; }
.axis-marker { position: relative; width: 32px; height: 16px; color: var(--accent); font: 8px var(--mono); padding-left: 24px; padding-top: 8px; }
.axis-marker i { position: absolute; left: 12px; top: 1px; width: 11px; height: 11px; border-left: 1px solid #9bafb9; border-bottom: 1px solid var(--accent); }
.axis-marker > span { position: absolute; left: 3px; top: 0; color: #9bafb9; }
.hero-foot { padding: 18px 0; font-size: 9px; }
.hero-foot a { color: var(--text); min-height: 26px; display: flex; align-items: center; }

/* Project selection: images carry the color, labels carry the structure. */
.work { padding-top: 80px; padding-bottom: 90px; }
.section-kicker { color: var(--accent); margin-bottom: 18px; font-size: 10px; }
.section-heading h2 { font-size: clamp(31px,3.2vw,46px); letter-spacing: -.035em; font-weight: 500; }
.section-description { font-size: 14px; max-width: 310px; }
.filter-bar { margin-top: 32px; padding-bottom: 13px; }
.project-filters { gap: 6px; }
.project-filters button { min-width: 44px; min-height: 44px; border-radius: 3px; font-size: 12px; padding: 9px 15px; color: #b8c2ca; }
.project-filters button:hover { color: var(--text); background: var(--surface); border-color: #55616b; }
.project-filters button[aria-pressed=true] { background: #30291f; border-color: #b78c55; color: #f0c890; }
.projects-grid { grid-template-columns: repeat(12,minmax(0,1fr)); gap: 56px 30px; margin-top: 27px; }
.project-card { grid-column: span 6; }
.project-wide { grid-column: span 7; }
.project-offset { grid-column: span 5; margin-top: 65px; }
.project-visual { border: 1px solid #3b454e; background: var(--surface); }
.project-visual img { outline: 1px solid #ffffff0d; outline-offset: -1px; transition: transform var(--motion-normal) var(--ease-out); }
.project-wide .project-visual { aspect-ratio: 1.58; }
.project-offset .project-visual { aspect-ratio: 1.5; }
.project-card:hover img { transform: scale(1.02); }
.project-number { background: #101316ec; border: 1px solid #64717c; color: #e3e9ed; font-size: 10px; }
.project-open { border-radius: 2px; border: 1px solid #6e7a84; width: 38px; height: 38px; background: #101316ed; }
.project-card:hover .project-open { color: var(--on-accent); transform: translate(2px,-2px); }
.project-heading { padding-top: 19px; align-items: baseline; }
.project-heading h3 { font-size: 25px; font-weight: 500; letter-spacing: -.035em; }
.project-heading .eyebrow { color: #a6afb7; font-size: 10px; }
.project-card p { font-size: 14px; color: #a6afb7; }
.project-tags { margin-top: 15px; }
.project-tags span { color: #b4bec5; font-size: 11px; border-color: #47525c; }
.project-landscape { grid-column: 1/-1; grid-template-columns: 1.3fr 1fr; gap: 40px; padding: 30px 0; }
.project-landscape h3 { font-size: 32px; }
.project-landscape .project-visual { aspect-ratio: 2.15; }
.projects-grid.is-filtered { grid-template-columns: repeat(2,minmax(0,1fr)); }
.projects-grid.is-filtered .project-card { grid-column: auto; margin-top: 0; }

/* About: a meaningful system diagram instead of a decorative emblem. */
.about { background: var(--surface); color: var(--text); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: 76px; }
.about-grid { grid-template-columns: .92fr 1.8fr; gap: 85px; }
.about-label > .eyebrow { color: var(--muted); }
.about-label > .eyebrow:first-child { color: var(--accent); }
.about-copy h2 { font-size: clamp(32px,3.5vw,49px); font-weight: 500; line-height: 1.16; }
.about-copy h2 em { font: inherit; font-style: normal; color: #a8b4bd; }
.about-copy .about-lead { color: var(--text); font-size: 18px; }
.about-copy > p { color: #b5bec6; font-size: 15px; }
.skills-table h3 { color: var(--text); }
.skills-table p, .skills-table .eyebrow { color: #b3bec7; }
.skills-table > div { padding-block: 19px; }
.button-solid { color: var(--on-accent); border-radius: 2px; min-height: 48px; background: var(--accent); }
.cv-note { color: var(--muted); }
.design-diagram { width: 100%; max-width: 275px; padding: 25px 20px; margin: 30px 0; border: 1px solid #3f4a54; background: linear-gradient(#ffffff04 1px,transparent 1px),linear-gradient(90deg,#ffffff04 1px,transparent 1px); background-size: 16px 16px; font: 12px var(--mono); }
.diagram-heading { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; margin-bottom: 25px; }
.diagram-node { display: flex; align-items: center; padding: 12px; border: 1px solid #66737e; background: var(--surface); gap: 12px; }
.diagram-node small { margin-left: auto; color: var(--muted); font-size: 9px; }
.node-port { width: 6px; height: 6px; border: 1px solid #a4b7c2; border-radius: 50%; }
.node-active { border-color: var(--accent); color: var(--accent); }
.node-active .node-port { background: var(--accent); border-color: var(--accent); }
.diagram-connector { border-left: 1px solid #72818c; height: 20px; margin-left: 16px; }
.diagram-loop { display: flex; gap: 12px; color: #b1bdc5; font-size: 9px; margin-top: 18px; }
.diagram-loop > span:first-child { color: var(--accent); }
.contact { padding-block: 63px 48px; }
.contact-meta { color: var(--muted); }
.contact-meta > span:first-child { color: var(--accent); }
.contact h2 { font-size: clamp(50px,6.7vw,96px); font-weight: 500; line-height: 1.09; letter-spacing: -.05em; }
.contact h2 em { font: inherit; color: #9ba7b0; }
.contact-arrow { background: var(--surface); border: 1px solid #788590; color: var(--accent); border-radius: 3px; width: 96px; height: 96px; font-size: 55px; }
.contact-arrow:hover { transform: translate(3px,-3px); background: #30291f; border-color: var(--accent); }
.social-links a { border-color: #56636e; min-height: 44px; }
.site-footer { color: var(--muted); font-size: 10px; }
.site-footer a { min-height: 24px; }

/* Every reading and interaction surface follows the same dark system. */
.project-modal { background: var(--bg); color: var(--text); border: 1px solid #46515b; }
.dialog-toolbar { background: var(--surface); color: #cbd3d9; }
.dialog-toolbar .close-btn:hover { background: var(--surface-raised); }
.collection-intro p, .project-details p, .sub-project-details p, .detail-section ul { color: #b5bec6; }
.project-title-large, .sub-detail-title { color: var(--text); }
.sub-project-card { padding: 20px 0; }
.sub-project-title { color: var(--text); font-family: var(--display); }
.sub-project-description { color: var(--muted); }
.sub-project-card:hover .sub-project-title { color: var(--accent); }
.view-details-btn { color: #b7c1c8; border-color: #64717b; }
.back-btn { color: var(--text); border-color: #64717b; }
.back-btn:hover { background: var(--surface-raised); }
.tool-tag { background: var(--surface-raised); color: #d3dbe1; border: 1px solid #44515c; }
.ai-label { background: #101316ed; color: #e8ecee; border: 1px solid #52616c; }
.image-label { background: #101316ed; color: #edf0f2; }
.slider-button { background: var(--surface); }
.carousel-btn { color: var(--text); background: var(--surface); border: 1px solid #778590; }
.indicator { width: 44px; height: 44px; }
.indicator:after { left: 18px; top: 18px; border-color: #a7b4be; }
.indicator.active:after { background: var(--accent); border-color: var(--accent); }
.lightbox { color: var(--text); background: #0b0e11; }
.lightbox-close { color: var(--text); }
.discord-icon-fallback { background: var(--surface-raised); }
.toast, .noscript-note, .skip-link { background: var(--accent); color: var(--on-accent); }
.toast { overflow-wrap: anywhere; }
.project-modal::backdrop, .lightbox::backdrop { background: #06090cd9; backdrop-filter: blur(4px); }

@media (max-width: 1100px) {
  .hero-layout { gap: 30px; grid-template-columns: .9fr 1.1fr; }
  h1 { font-size: clamp(61px,7.4vw,85px); }
  .hero-intro { font-size: 9px; }
  .hero-aside > p { font-size: 14px; }
  .hero-project { height: 365px; }
  .scene-toolbar > span:last-child { display: none; }
  .about-grid { gap: 45px; }
  .project-heading { display: block; }
}
@media (max-width: 760px) {
  .site-header { height: 78px; }
  .brand { font-size: 9px; }
  .monogram { width: 37px; height: 37px; }
  .header-actions { gap: 6px; }
  #primary-nav { top: 78px; background: var(--surface); box-shadow: 0 16px 30px #0005; gap: 0; }
  #primary-nav a { padding-block: 13px; font-size: 19px; }
  .hero { padding-top: 21px; }
  .hero-layout { grid-template-columns: 1fr; padding: 34px 0 24px; gap: 32px; }
  .hero-heading { padding: 0; }
  .hero-intro { margin-bottom: 20px; font-size: 9px; }
  h1 { font-size: clamp(67px,12.4vw,91px); }
  .hero-aside { display: block; max-width: 520px; margin-top: 22px; }
  .hero-aside > p { font-size: 15px; max-width: none; }
  .text-link { margin-top: 21px; min-width: 212px; width: auto; }
  .hero-specialties { margin-top: 24px; }
  .hero-project { height: 340px; }
  .hero-image-top { left: 20px; right: 20px; }
  .hero-image-top > span:last-child { display: inline; }
  .hero-image-bottom { left: 20px; right: 20px; bottom: 20px; }
  .hero-image-bottom h2 { font-size: 44px; }
  .hero-foot { font-size: 8px; gap: 15px; align-items: center; }
  .hero-foot a { max-width: 140px; text-align: right; }
  .work { padding-block: 56px; }
  .section-heading h2 { font-size: 33px; }
  .section-description { max-width: 350px; }
  .project-filters { gap: 3px; }
  .project-filters button { font-size: 11px; padding-inline: 10px; }
  .projects-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 38px 22px; }
  .project-card, .project-wide, .project-offset { grid-column: auto; margin-top: 0; }
  .project-landscape { grid-column: 1/-1; gap: 25px; }
  .project-landscape h3 { font-size: 26px; }
  .project-heading h3 { font-size: 22px; }
  .project-wide .project-visual, .project-offset .project-visual { aspect-ratio: 1.45; }
  .about { padding-block: 50px; }
  .about-grid { grid-template-columns: 1fr; gap: 27px; }
  .about-label { display: block; }
  .design-diagram { display: none; }
  .about-copy h2 { font-size: 35px; }
  .contact { padding-block: 47px 36px; }
  .contact h2 { font-size: clamp(46px,8.4vw,64px); }
  .contact-arrow { width: 68px; height: 68px; font-size: 38px; }
  .site-footer { font-size: 8px; }
}
@media (max-width: 520px) {
  .brand { gap: 8px; letter-spacing: .025em; }
  .hero-project { height: 315px; }
  .scene-toolbar { padding-inline: 12px; font-size: 8px; }
  .scene-caption { padding-inline: 12px; }
  .scene-caption .eyebrow { font-size: 7px; }
  .projects-grid, .projects-grid.is-filtered { grid-template-columns: 1fr; }
  .project-landscape { display: block; grid-column: auto; }
  .project-landscape .project-visual { aspect-ratio: 1.7; }
  .project-wide .project-visual, .project-offset .project-visual { aspect-ratio: 1.58; }
  .project-heading h3 { font-size: 25px; }
  .project-card p { font-size: 14px; }
  .about-copy h2 { font-size: 30px; }
  .about-copy .about-lead { font-size: 17px; }
  .contact h2 { font-size: clamp(40px,10.4vw,55px); }
  .contact-arrow { width: 55px; height: 55px; font-size: 34px; }
  .project-modal { border: 0; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .text-link:active, .button-solid:active { transform: translateY(1px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-project:hover > img, .project-card:hover img, .hero-project:hover .circle-arrow,
  .project-card:hover .project-open, .contact-arrow:hover { transform: none !important; }
}

/* Project display modes: one common card structure, two consistent layouts. */
.filter-bar { flex-wrap: wrap; }
.view-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid #55616b; border-radius: 3px; margin-left: auto; }
.view-switch button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 8px 13px; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 12px; }
.view-switch button:hover { color: var(--text); background: var(--surface-raised); }
.view-switch button[aria-pressed="true"] { color: #f0c890; background: #30291f; border-color: #b78c55; border-radius: 2px; }
.view-switch svg { flex-shrink: 0; }
.projects-grid[data-view] { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: stretch; gap: 48px 30px; }
.projects-grid[data-view] > .project-card { grid-column: auto; margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; }
.projects-grid[data-view] .project-visual { width: 100%; aspect-ratio: 1.57; flex-shrink: 0; }
.projects-grid[data-view] .project-summary { padding-top: 0; min-width: 0; }
.projects-grid[data-view] .project-heading { display: flex; flex-wrap: wrap; align-items: baseline; padding-top: 19px; gap: 8px 15px; }
.projects-grid[data-view] .project-heading h3 { font-size: 25px; }
.projects-grid[data-view] .project-heading .eyebrow { margin-top: 0; }
.projects-grid[data-view] p { font-size: 14px; margin-top: 8px; max-width: 100%; }
.projects-grid[data-view="list"] { grid-template-columns: minmax(0,1fr); gap: 0; }
.projects-grid[data-view="list"] > .project-card { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 40px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.projects-grid[data-view="list"] > .project-card:first-child { padding-top: 0; }
.projects-grid[data-view="list"] .project-visual { aspect-ratio: 2.15; }
.projects-grid[data-view="list"] .project-heading { display: block; padding-top: 0; }
.projects-grid[data-view="list"] .project-heading h3 { font-size: clamp(25px,2.4vw,34px); }
.projects-grid[data-view="list"] .project-heading .eyebrow { display: block; margin-top: 12px; text-align: left; }
.projects-grid[data-view="list"] p { margin-top: 18px; max-width: 420px; font-size: 15px; }
@media(max-width: 900px) {
  .filter-bar .result-count { display: none; }
  .projects-grid[data-view="list"] > .project-card { grid-template-columns: 1.1fr 1fr; gap: 24px; }
  .projects-grid[data-view="list"] .project-visual { aspect-ratio: 1.6; }
}
@media(max-width: 600px) {
  .filter-bar { gap: 14px; align-items: center; }
  .project-filters { width: 100%; }
  .view-switch { margin-left: 0; }
  .projects-grid[data-view] { gap: 32px 20px; }
  .projects-grid[data-view="list"] { gap: 0; }
  .projects-grid[data-view="list"] > .project-card { grid-template-columns: minmax(0,1fr); gap: 18px; padding-block: 24px; }
  .projects-grid[data-view="list"] .project-visual { aspect-ratio: 2.15; }
  .projects-grid[data-view="list"] .project-heading h3 { font-size: 25px; }
  .projects-grid[data-view="list"] p { margin-top: 8px; font-size: 14px; }
}
@media(max-width: 520px) {
  .projects-grid[data-view="grid"] { grid-template-columns: minmax(0,1fr); }
}
