@layer reset, base, components, responsive;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
  button, input { font: inherit; }
  button, a { -webkit-tap-highlight-color: transparent; }
  img, svg { display: block; max-width: 100%; }
  [hidden] { display: none !important; }
}

@layer base {
  :root {
    --paper: #f4f3ef;
    --surface: #fff;
    --ink: #171b20;
    --muted: #535b66;
    --blue: #2455d6;
    --line: #d9dcd9;
    --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 16px;
    color: var(--ink);
    background: var(--paper);
    scroll-behavior: smooth;
  }
  body { line-height: 1.6; }
  ::selection { color: #fff; background: var(--blue); }
  a { color: inherit; text-decoration: none; }
  button { color: inherit; cursor: pointer; }
  :root.disclosure-animating { overflow-anchor: none; }
  a, button, summary { touch-action: manipulation; }
  a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; border-radius: 2px; }
  section[id], main[id], h3[id] { scroll-margin-top: 105px; }
  h1, h2, h3, h4 { font-weight: 600; line-height: 1.15; }
  p { text-wrap: pretty; }
  .container { width: min(1120px, calc(100% - 96px)); margin-inline: auto; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .eyebrow { font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .075em; text-transform: uppercase; color: var(--muted); }
  .text-link { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: .9rem; font-weight: 600; }
  .text-link:hover { color: var(--blue); }
  .text-link span { font-size: 1.1rem; }
}

@layer components {
  .skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 12px 20px; background: var(--ink); color: white; transform: translateY(-180%); }
  .skip-link:focus { transform: translateY(0); }
  .site-header { position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line); }
  .header-inner { display: flex; justify-content: space-between; align-items: center; min-height: 86px; gap: 24px; }
  .brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; font-size: .86rem; white-space: nowrap; }
  .monogram { font-size: 1.25rem; letter-spacing: -.08em; width: 35px; height: 35px; display: grid; place-content: center; border: 1px solid var(--ink); border-radius: 4px; }
  nav { display: flex; align-items: center; gap: 27px; font-size: .82rem; font-weight: 500; }
  .nav-panel, .nav-clip { display: contents; }
  nav a { padding-block: 12px; transition: color .15s; }
  nav a:hover { color: var(--blue); }
  .nav-cv { display: flex; gap: 18px; align-items: center; padding: 8px 16px; margin-left: 10px; border: 1px solid var(--line); border-radius: 3px; }
  .menu-toggle { display: none; }
  .hero { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; column-gap: 86px; padding-block: 88px 92px; }
  .hero h1 { font-size: clamp(4.4rem, 7.8vw, 6.7rem); line-height: .99; letter-spacing: -.075em; font-weight: 550; margin-block: 28px 33px; }
  .hero h1 span { color: var(--blue); }
  .hero-stack { display: flex; flex-wrap: wrap; gap: 10px 0; font-family: var(--mono); font-size: .72rem; color: var(--muted); }
  .hero-stack span + span::before { content: "/"; display: inline-block; color: #8b9095; margin-inline: 11px; }
  .hero-copy { padding-top: 8px; }
  .corner-mark { display: block; color: var(--blue); font-size: 2.75rem; line-height: 1; margin-bottom: 23px; }
  .hero-lead { font-size: clamp(1.4rem, 2vw, 1.7rem); font-weight: 500; letter-spacing: -.025em; line-height: 1.4; }
  .hero-description { color: var(--muted); font-size: 1rem; line-height: 1.75; margin-top: 21px; }
  .hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 25px; margin-top: 28px; }
  .button { display: inline-flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 28px; padding: 12px 19px; font-size: .87rem; border-radius: 4px; font-weight: 600; transition: background .15s; }
  .button.primary { color: #fff; background: var(--blue); }
  .button.primary:hover { background: #183da0; }
  .button.primary:focus-visible { outline-offset: 5px; }
  .hero-note { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .71rem; margin-top: 32px; }
  .note-line { flex-shrink: 0; width: 23px; height: 1px; background: var(--muted); }
  .section { padding-bottom: 85px; }
  .section-label { display: flex; justify-content: space-between; gap: 16px; padding-top: 19px; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: .7rem; }
  .section-label span:first-child { color: var(--ink); }
  .section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 50px; margin-block: 37px 35px; }
  h2 { font-size: clamp(2rem, 3.4vw, 2.8rem); letter-spacing: -.05em; }
  .section-heading > p { max-width: 390px; color: var(--muted); font-size: .95rem; line-height: 1.7; }
  .project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
  .project-card { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
  .project-sap-warehouse { grid-column: 1 / -1; display: grid; grid-template-columns: .92fr 1.08fr; }
  .project-visual { display: flex; flex-direction: column; justify-content: space-between; min-height: 240px; padding: 23px 26px 18px; border-bottom: 1px solid var(--line); }
  .visual-topline { display: flex; justify-content: space-between; gap: 10px; font-family: var(--mono); font-size: .62rem; letter-spacing: .025em; }
  .visual-topline span:last-child { opacity: .65; }
  .visual-caption { font-family: var(--mono); font-size: .61rem; letter-spacing: .015em; }
  .project-content { padding: 30px; }
  .project-sap-warehouse .project-content { align-self: center; padding: 40px; }
  .project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-family: var(--mono); color: var(--muted); font-size: .62rem; margin-bottom: 17px; }
  .status { display: inline-block; border: 1px solid var(--line); border-radius: 3px; padding: 3px 7px; font-size: .61rem; font-family: var(--mono); color: var(--muted); }
  .status.production { color: #245740; background: #eef5ef; border-color: #c9ddce; }
  .project-content h3 { font-size: 1.6rem; letter-spacing: -.035em; max-width: 440px; }
  .project-sap-warehouse h3 { font-size: 2.15rem; }
  .project-description { margin-top: 16px; color: var(--muted); font-size: .93rem; line-height: 1.75; }
  .project-outcome { margin-top: 19px; font-weight: 600; font-size: .85rem; border-left: 2px solid var(--blue); padding-left: 12px; }
  .tech-list { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; padding: 0; margin-top: 24px; color: var(--muted); font-family: var(--mono); font-size: .75rem; }
  .case-details { margin-top: 24px; border-top: 1px solid var(--line); }
  .case-details summary { display: flex; justify-content: space-between; align-items: center; gap: 15px; min-height: 51px; padding-top: 7px; font-size: .83rem; font-weight: 600; cursor: pointer; list-style: none; }
  .case-details summary::-webkit-details-marker { display: none; }
  .case-details summary:hover { color: var(--blue); }
  .disclosure-mark { color: var(--blue); font-size: 1.4rem; font-weight: 400; transition: transform .22s cubic-bezier(.2, .7, .2, 1); }
  details[open]:not(.is-closing) .disclosure-mark { transform: rotate(45deg); }
  .case-body { padding-top: 14px; font-size: .88rem; color: var(--muted); }
  .case-role { font-size: .75rem; border-bottom: 1px solid var(--line); padding-bottom: 17px; margin-bottom: 17px; }
  .case-body dt { color: var(--ink); font-weight: 600; margin-top: 17px; }
  .case-body dd { margin-top: 5px; }
  .project-beverage-route-research { grid-column: 1 / -1; display: grid; grid-template-columns: .92fr 1.08fr; }
  .project-beverage-route-research .project-content { padding: 36px 40px; }
  .experience-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 105px; margin-top: 43px; }
  .section-heading.vertical { display: block; margin: 0; }
  .vertical h2 { max-width: 280px; }
  .vertical p { margin-block: 22px 22px; }
  .timeline { list-style: none; padding-left: 24px; border-left: 1px solid var(--line); }
  .timeline-item { position: relative; padding-bottom: 34px; }
  .timeline-item:last-child { padding-bottom: 0; }
  .timeline-item::before { position: absolute; content: ""; width: 9px; height: 9px; border: 2px solid var(--blue); background: var(--paper); border-radius: 50%; left: -29px; top: 7px; }
  .timeline-date { font-family: var(--mono); font-size: .64rem; color: var(--muted); margin-bottom: 11px; }
  .timeline-item h3 { font-size: 1.15rem; letter-spacing: -.02em; }
  .role-title { font-size: .85rem; font-weight: 500; margin-top: 7px; }
  .role-location { font-size: .74rem; color: var(--muted); margin-top: 2px; }
  .timeline-item p:last-child { font-size: .89rem; color: var(--muted); margin-top: 12px; }
  .about-layout { display: grid; grid-template-columns: 1.35fr .8fr; gap: 100px; margin-top: 43px; }
  .about-copy h2 { max-width: 400px; margin-bottom: 27px; }
  .about-copy p { color: var(--muted); margin-top: 17px; font-size: .96rem; line-height: 1.8; }
  .about-facts { align-self: start; padding-top: 5px; }
  .fact-group + .fact-group { border-top: 1px solid var(--line); margin-top: 29px; padding-top: 25px; }
  .fact-group h3 { font-size: 1.02rem; margin-top: 16px; }
  .fact-group > p:not(.eyebrow) { font-size: .85rem; color: var(--muted); margin-top: 9px; }
  .fact-group .fact-date { font-family: var(--mono); font-size: .68rem !important; }
  .language-list { margin-top: 17px; }
  .language-list > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 13px; }
  .language-list dt { font-size: .85rem; }
  .language-list dd { font-size: .72rem; color: var(--muted); text-align: right; }
  .skills-heading { display: flex; gap: 16px; align-items: baseline; margin-top: 51px; padding-top: 28px; border-top: 1px solid var(--line); }
  .skills-heading h3 { font-size: 1.2rem; letter-spacing: -.02em; }
  .skills-heading p { font-size: .8rem; color: var(--muted); }
  .skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 27px; margin-top: 25px; }
  .skill-group h4 { font-size: .76rem; font-weight: 600; margin-bottom: 14px; line-height: 1.5; }
  .skill-group ul { list-style: none; padding: 0; color: var(--muted); display: flex; flex-wrap: wrap; gap: 7px 13px; font-family: var(--mono); font-size: .75rem; line-height: 1.8; }
  .contact-section { background: #e9e8e2; padding-bottom: 64px; }
  .contact-section .section-label { border-top-color: #d1d2cb; }
  .contact-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 100px; margin-top: 40px; }
  .contact-layout h2 { max-width: 500px; }
  .contact-layout p { margin-top: 22px; max-width: 450px; color: var(--muted); font-size: .94rem; }
  .contact-links { align-self: center; }
  .email-link { display: flex; gap: 15px; justify-content: space-between; padding-bottom: 20px; font-size: clamp(.95rem, 1.6vw, 1.2rem); letter-spacing: -.015em; color: var(--blue); overflow-wrap: anywhere; }
  .email-link:hover { text-decoration: underline; text-underline-offset: 5px; }
  .email-link > span { flex-shrink: 0; }
  button.nav-cv, button.text-link, button.email-link, button.contact-link { font: inherit; background: none; cursor: pointer; text-align: left; color: inherit; }
  button.text-link, button.email-link, button.contact-link { border: 0; }
  button.email-link { width: 100%; font-size: clamp(.95rem, 1.6vw, 1.2rem); color: var(--blue); padding-left: 0; padding-right: 0; }
  button.contact-link { width: 100%; padding-left: 0; padding-right: 0; }
  .contact-dialog { position: fixed; inset: 0; margin: auto; width: min(540px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); overflow-y: auto; }
  body:has(.contact-dialog[open]) { overflow: hidden; }
  .contact-dialog[open] { animation: contact-enter 160ms ease-out; }
  .contact-dialog::backdrop { background: rgb(20 25 30 / .38); }
  .contact-dialog h2 { margin: 0 32px 16px 0; font-size: 1.6rem; letter-spacing: -.035em; }
  .contact-dialog > p { font-size: .9rem; color: var(--muted); }
  .contact-close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 36px; height: 36px; font: inherit; font-size: 1.5rem; border: 0; border-radius: 3px; background: none; color: var(--ink); cursor: pointer; }
  .contact-close:hover { background: var(--line); }
  .contact-challenge { margin: 24px 0 16px; }
  .contact-status { min-height: 1.5em; margin: 0 0 16px; }
  .contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }
  .contact-actions .button { border: 1px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; font-size: .85rem; }
  .contact-actions .button.primary { background: var(--blue); border-color: var(--blue); }
  .contact-actions .button:disabled { opacity: .45; cursor: not-allowed; }
  .contact-retry { margin: 18px 0 0; padding: 0; }
  .contact-fallback { display: block; width: fit-content; margin: 24px 0 0; font-size: .85rem; }
  @keyframes contact-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
  @media (max-width: 480px) { .contact-dialog { padding: 28px 20px; } .contact-actions .button { width: 100%; justify-content: space-between; } }
  @media (prefers-reduced-motion: reduce) { .contact-dialog[open] { animation: none; } }
  .contact-link { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 57px; border-top: 1px solid #c9cbc5; font-size: .89rem; }
  .contact-link:hover { color: var(--blue); }
  .link-detail { display: flex; gap: 21px; color: var(--muted); font-size: .75rem; }
  .site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; min-height: 94px; color: var(--muted); font-family: var(--mono); font-size: .65rem; }
  .footer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
  .site-footer a { padding-block: 12px; }
  .site-footer a:hover { color: var(--blue); }
}

@layer responsive {
  @media (min-width: 1500px) { .hero { padding-block: 100px 110px; } }
  @media (max-width: 1050px) {
    .container { width: calc(100% - 64px); }
    .hero { gap: 45px; padding-block: 70px 80px; }
    .hero h1 { font-size: 6rem; }
    .hero-lead { font-size: 1.45rem; }
    nav { gap: 20px; }
    .experience-layout, .about-layout, .contact-layout { gap: 55px; }
    .project-sap-warehouse .project-content, .project-beverage-route-research .project-content { padding: 28px; }
    .project-sap-warehouse h3 { font-size: 1.85rem; }
  }
  @media (max-width: 760px) {
    .container { width: calc(100% - 40px); }
    .header-inner { min-height: 73px; flex-wrap: wrap; gap: 0 16px; padding-block: 17px; }
    .brand { font-size: .83rem; }
    .monogram { width: 32px; height: 32px; font-size: 1.15rem; }
    nav { width: 100%; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; padding-top: 15px; font-size: .76rem; }
    .nav-cv { margin-left: 0; }
    .nav-ready .menu-toggle { display: inline-flex; justify-content: space-between; align-items: center; gap: 15px; min-height: 40px; background: transparent; border: 1px solid var(--line); padding: 6px 12px; border-radius: 3px; font-size: .78rem; margin-left: auto; }
    .nav-ready .nav-panel { display: grid; width: 100%; grid-template-rows: 0fr; opacity: 0; visibility: hidden; pointer-events: none; transition: grid-template-rows .28s cubic-bezier(.2, .7, .2, 1), opacity .18s ease, visibility 0s linear .28s; }
    .nav-ready .nav-clip { display: block; min-height: 0; overflow: hidden; }
    .nav-ready.menu-open .nav-panel { grid-template-rows: 1fr; opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
    .hero { grid-template-columns: 1fr; gap: 40px; padding-block: 48px 59px; }
    .hero h1 { font-size: clamp(4.5rem, 14vw, 6.5rem); margin-block: 24px 26px; }
    .hero .eyebrow { font-size: .65rem; }
    .hero-stack { font-size: .63rem; }
    .hero-stack span + span::before { margin-inline: 8px; }
    .hero-copy { max-width: 520px; padding-top: 0; }
    .corner-mark { display: none; }
    .hero-lead { font-size: 1.5rem; }
    .hero-description { margin-top: 16px; font-size: .94rem; }
    .hero-actions { margin-top: 22px; }
    .hero-note { margin-top: 24px; }
    .section { padding-bottom: 59px; }
    .section-label { font-size: .61rem; padding-top: 16px; }
    .section-label span:last-child { text-align: right; max-width: 55%; }
    .section-heading { display: block; margin-block: 28px; }
    .section-heading p { margin-top: 15px; font-size: .91rem; }
    h2 { font-size: 2.15rem; }
    .project-grid { grid-template-columns: 1fr; gap: 22px; }
    .project-sap-warehouse, .project-beverage-route-research { display: block; }
    .project-content, .project-sap-warehouse .project-content, .project-beverage-route-research .project-content { padding: 25px; }
    .project-sap-warehouse h3 { font-size: 1.85rem; }
    .project-content h3 { font-size: 1.65rem; }
    .project-visual { min-height: 240px; }
    .experience-layout, .about-layout, .contact-layout { grid-template-columns: 1fr; gap: 34px; margin-top: 31px; }
    .vertical h2 { max-width: none; }
    .section-heading.vertical { margin: 0; }
    .timeline { margin-left: 5px; }
    .timeline-item { padding-bottom: 31px; }
    .about-copy h2 { max-width: 330px; margin-bottom: 22px; }
    .about-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 23px; border-top: 1px solid var(--line); padding-top: 25px; }
    .fact-group + .fact-group { margin-top: 0; border: 0; padding: 0; }
    .language-list > div { display: block; margin-top: 11px; }
    .language-list dd { text-align: left; margin-top: 2px; }
    .skills-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
    .skills-heading { flex-wrap: wrap; gap: 4px 16px; margin-top: 32px; }
    .contact-section { padding-bottom: 40px; }
    .contact-layout { gap: 30px; }
    .contact-layout h2 { max-width: 440px; font-size: 2.15rem; }
    .contact-layout p { margin-top: 18px; }
    .email-link { font-size: 1.05rem; }
    .site-footer { min-height: 80px; font-size: .58rem; }
    section[id], main[id] { scroll-margin-top: 88px; }
    h3[id] { scroll-margin-top: 120px; }
  }
  @media (max-width: 390px) {
    .hero-actions { gap: 15px 17px; }
    .button { font-size: .8rem; padding-inline: 14px; gap: 20px; }
    .hero-actions .text-link { font-size: .8rem; }
    .project-content, .project-sap-warehouse .project-content, .project-beverage-route-research .project-content { padding: 22px; }
    .about-facts { grid-template-columns: 1fr; gap: 25px; }
    .fact-group + .fact-group { border-top: 1px solid var(--line); padding-top: 23px; }
    .language-list > div { display: flex; }
    .language-list dd { text-align: right; }
    .skills-grid { gap: 24px 18px; }
  }
  @media (prefers-reduced-motion: reduce) {
    :root { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
  }
  @media (forced-colors: active) {
  }
  @media print {
    .site-header, .hero-actions, .site-footer, .contact-section, .project-visual, .hero-note { display: none; }
    :root, body, .project-card { background: #fff; color: #000; }
    .container { width: 100%; }
    .hero { padding-block: 20px; display: block; }
    .hero h1 { font-size: 3rem; }
    .hero h1 br { display: none; }
    .hero h1 span { color: #000; }
    .project-grid, .project-sap-warehouse, .project-beverage-route-research { display: block; }
    .project-card { margin-bottom: 16px; break-inside: avoid; }
    .section { padding-bottom: 30px; }
    .section-heading { margin-block: 20px; }
    .project-content { padding: 18px !important; }
  }
}

/* Project-image slots. Screenshot interactions live in work-components.css. */
.project-media-visual { margin:0;min-width:0;background:var(--surface); color:var(--ink); display:flex; flex-direction:column; justify-content:center; padding:24px; gap:16px; }
.project-media-visual > img { width:100%; height:auto; object-fit:contain; border:1px dashed var(--line); border-radius:4px; }
.project-media-visual figcaption,.project-image figcaption { font:11px/1.5 var(--mono); color:var(--muted); }
.media-status { display:inline-block; margin-right:8px; padding:2px 6px; border:1px solid currentColor; font-size:10px; text-transform:uppercase; }
.project-image { margin:24px 0 20px; border:1px solid var(--line); background:var(--surface); }
.project-image img { width:100%; height:auto; object-fit:contain; }
.project-image figcaption { padding:9px 12px; }

.project-launch { margin-top:18px;margin-bottom:8px; }.project-launch-link { display:inline-flex;align-items:center;gap:24px;min-height:44px;padding:9px 14px;border:1px solid var(--blue);border-radius:3px;color:var(--blue);font-size:13px;font-weight:600; }.project-launch-link:hover { background:var(--paper); }
.role-interest { display:grid;grid-template-columns:1fr 1.25fr;gap:70px; }.role-interest h2 { font-size:clamp(1.7rem,2.6vw,2.3rem);margin-top:12px; }.role-interest > div > p { color:var(--muted);font-size:1rem; }.role-interest ul { display:flex;flex-wrap:wrap;gap:7px 18px;list-style:none;padding:0;margin-top:20px;font:12px/1.5 var(--mono);color:var(--muted); }.alt-role-interest { display:block;border-block:1px solid var(--line);padding-block:18px;margin-block:22px; }.alt-role-interest h3 { font-size:1.15rem;margin-bottom:10px; }
@media(max-width:760px) { .role-interest { grid-template-columns:1fr;gap:20px; } }
