/* Patrick Becker portfolio: warm paper, five retro bands from the reference image. */
:root {
  color-scheme: light;
  --bg: #f6e8c9;
  --panel: #eddbb7;
  --tint: #f4ebd8;
  --text: #302b22;
  --muted: #635a48;
  --line: #cbb993;
  --teal-text: #286559;
  --inverse: #fff9e9;
  --green: #536534;
  --teal: #37776b;
  --ochre: #bd8b26;
  --orange: #c1642d;
  --rust: #903c27;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; scrollbar-color: var(--rust) var(--panel); }
body { margin: 0; background: var(--bg); }
a { color: inherit; text-decoration: none; text-underline-offset: .25em; -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 2px solid var(--rust); outline-offset: 7px; }
::selection { background: var(--ochre); color: var(--text); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.serif { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-style: italic; }
h1 { margin: 0; font-weight: 500; letter-spacing: -.035em; line-height: 1.06; }

/* Layout shell */
.site { max-width: 1536px; margin-inline: 0 auto; padding: 0 64px; }
.skip { position: fixed; top: -60px; left: 20px; z-index: 10; padding: 12px; background: var(--rust); color: var(--inverse); }
.skip:focus { top: 10px; }
header { height: 115px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 18px; font-weight: 550; font-size: 15px; }
.brand-mark { color: var(--green); font-size: 42px; letter-spacing: -5px; font-weight: 700; line-height: 1; }
.brand small { display: block; margin-top: 7px; font-size: 12px; color: var(--muted); }
header nav { display: flex; gap: 7px; }
header nav a { padding: 11px 23px; border-radius: 3px; font-size: 14px; color: var(--muted); }
header nav a[aria-current] { background: var(--green); color: var(--inverse); }
header nav a:hover { background: #3f5127; color: var(--inverse); }
footer { display: flex; justify-content: space-between; align-items: center; padding: 27px 0 35px; border-top: 1px solid var(--line); font-size: 12px; }
footer a span { display: block; margin-top: 5px; color: var(--muted); }
footer > a:last-child { color: var(--muted); }

/* Controls */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 13px 21px; border-radius: 3px; background: var(--rust); color: var(--inverse); font-size: 15px; font-weight: 550; }
.button:hover { background: var(--text); }
.button span[aria-hidden="true"], .secondary-link span[aria-hidden="true"] { margin-left: .35em; }
.secondary-link { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 0; color: var(--teal-text); font-size: 15px; text-decoration: underline; text-underline-offset: 5px; }
/* A missing URL renders as quiet pending text that keeps the link's footprint, never as a dead link. */
.link-pending { display: inline-flex; align-items: center; min-height: 46px; color: var(--muted); font-size: 15px; font-style: italic; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags span { padding: 5px 9px; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; color: var(--muted); }
.placeholder { font-size: 15px; line-height: 1.6; color: var(--muted); }

/* Each project owns one band colour: a swatch leads its category, and its band leads its own page. */
[data-band="green"] { --band: var(--green); }
[data-band="teal"] { --band: var(--teal); }
[data-band="ochre"] { --band: var(--ochre); }
[data-band="orange"] { --band: var(--orange); }
[data-band="rust"] { --band: var(--rust); }

/* Home */
.portfolio-intro { padding: 36px 0 30px; }
.portfolio-intro h1, .about-heading h1 { font-size: clamp(36px, 4.2vw, 60px); }
.portfolio-intro .serif, .about-heading .serif { color: var(--rust); }
.portfolio-intro p { max-width: 650px; margin: 16px 0 0; font-size: 16px; line-height: 1.55; }
.work { min-width: 0; }
.work-image { position: relative; display: block; overflow: hidden; border-radius: 12px; background: var(--panel); }
.work-image img, .project-visual img { display: block; width: 100%; height: auto; }
.work-info { padding-top: 20px; }
.work-info h2, .work-info h3 { margin: 0 0 12px; font-size: 28px; font-weight: 600; letter-spacing: -.03em; }
.work-info h2 a:hover, .work-info h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--band); }
.work-info > p { margin: 0 0 16px; font-size: 16px; line-height: 1.6; color: var(--muted); }
.work-category { margin: 0 0 8px; font-size: 13px; color: var(--teal-text); }
.work-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 20px; }
.work:not(.featured-work) .button { background: transparent; color: var(--rust); box-shadow: inset 0 0 0 1px var(--rust); }
.work:not(.featured-work) .button:hover { background: var(--rust); color: var(--inverse); }
.featured-work { display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; align-items: center; padding-block: 22px 30px; border-block: 1px solid var(--line); }
.featured-work .work-info { padding: 0; }
.featured-work .work-info h2 { font-size: 36px; }
.works { padding: 40px 0 50px; }
.section-title { margin: 0 0 28px; font-size: 32px; font-weight: 550; letter-spacing: -.025em; }
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px 30px; }
.work-close { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: clamp(28px, 4vw, 56px); border-radius: 12px; background: var(--panel); }
.work-close h3 { margin: 0 0 14px; font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; font-style: italic; font-size: clamp(30px, 3vw, 42px); line-height: 1.1; color: var(--rust); }
.work-close p { max-width: 36ch; margin: 0 0 12px; font-size: 16px; line-height: 1.6; color: var(--muted); }

/* About */
.about-heading { padding: 38px 0 40px; }
.role { margin: 12px 0 0; font-size: 16px; color: var(--muted); }
.profile-layout { padding: 30px 0 45px; border-top: 1px solid var(--line); }
.profile-intro { max-width: 68ch; }
.profile-layout h2, .contact-section h2, .project-story h2 { margin: 0 0 18px; font-size: 25px; font-weight: 550; letter-spacing: -.02em; }
.profile-intro > p, .project-story p, .project-story li { margin-top: 0; font-size: 17px; line-height: 1.75; color: var(--muted); }
.profile-intro > .secondary-link { margin-top: 20px; }
.contact-section { padding: 30px 0 55px; border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 22px; }
.contact-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.pending > span:last-child { font-size: 13px; color: var(--muted); }

/* Project pages */
.back { display: inline-block; margin: 20px 0 18px; font-size: 14px; color: var(--muted); }
.work-category::before { content: ""; display: inline-block; width: 28px; height: 6px; margin-right: 10px; vertical-align: middle; background: var(--band); }
.project-heading h1 { font-size: clamp(34px, 4.5vw, 64px); }
.project-heading > p:not(.work-category):not(.project-actions) { margin: 14px 0 18px; font-size: 17px; color: var(--muted); }
.project-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin: 0 0 28px; }
.project-visual { margin: 0; border-radius: 12px; overflow: hidden; background: var(--panel); }
.project-story { max-width: 68ch; padding: 44px 0 50px; scroll-margin-top: 24px; }
.project-story h2 { margin-top: 40px; }
.project-story h2:first-child { margin-top: 0; }
.project-story ul { margin: 0; padding-left: 1.2em; }
.project-story li { margin-bottom: 10px; }
.project-story li::marker { color: var(--band); }
.project-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 30px 0 40px; border-top: 1px solid var(--line); }
.project-pager a { font-size: 24px; font-weight: 500; letter-spacing: -.02em; }
.project-pager a:last-child { text-align: right; }
.project-pager span { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--muted); }

/* Retro bands. Five straight bands run down the left edge, hugging the content column on wide screens,
   then bend once at the page bottom into a fan (inline SVG from build.mjs). --u scales the figure. */
@property --b1 { syntax: "<length-percentage>"; inherits: false; initial-value: 100%; }
@property --b2 { syntax: "<length-percentage>"; inherits: false; initial-value: 100%; }
@property --b3 { syntax: "<length-percentage>"; inherits: false; initial-value: 100%; }
@property --b4 { syntax: "<length-percentage>"; inherits: false; initial-value: 100%; }
@property --b5 { syntax: "<length-percentage>"; inherits: false; initial-value: 100%; }
@keyframes b1 { from { --b1: 0px } to { --b1: 100vh } } @keyframes b2 { from { --b2: 0px } to { --b2: 100vh } }
@keyframes b3 { from { --b3: 0px } to { --b3: 100vh } } @keyframes b4 { from { --b4: 0px } to { --b4: 100vh } }
@keyframes b5 { from { --b5: 0px } to { --b5: 100vh } }
@keyframes fan-in { from { opacity: 0 } }
body {
  --u: 1; --rw: calc(40px * var(--u)); --fan: calc(240px * var(--u));
  --edge: max(0px, (100% - 1536px - var(--rw)) / 2);
  --b-green: var(--green); --b-teal: var(--teal); --b-ochre: var(--ochre); --b-orange: var(--orange); --b-rust: var(--rust);
  position: relative; min-height: 100vh; padding-left: calc(var(--edge) + var(--rw)); padding-bottom: var(--fan);
}
/* On a project page its own band stays at full strength; the other four recede. */
body[data-band] {
  --b-green: color-mix(in srgb, var(--green) 30%, var(--bg)); --b-teal: color-mix(in srgb, var(--teal) 30%, var(--bg));
  --b-ochre: color-mix(in srgb, var(--ochre) 30%, var(--bg)); --b-orange: color-mix(in srgb, var(--orange) 30%, var(--bg));
  --b-rust: color-mix(in srgb, var(--rust) 30%, var(--bg));
}
body[data-band="green"] { --b-green: var(--green); }
body[data-band="teal"] { --b-teal: var(--teal); }
body[data-band="ochre"] { --b-ochre: var(--ochre); }
body[data-band="orange"] { --b-orange: var(--orange); }
body[data-band="rust"] { --b-rust: var(--rust); }
body::after {
  --ease: cubic-bezier(.16, 1, .3, 1);
  content: ""; position: absolute; top: 0; left: var(--edge); bottom: var(--fan); width: var(--rw); pointer-events: none; view-transition-name: bands;
  background:
    linear-gradient(var(--b-green), var(--b-green)) 0 0 / 16% var(--b1) no-repeat,
    linear-gradient(var(--b-teal), var(--b-teal)) 25% 0 / 16% var(--b2) no-repeat,
    linear-gradient(var(--b-ochre), var(--b-ochre)) 50% 0 / 16% var(--b3) no-repeat,
    linear-gradient(var(--b-orange), var(--b-orange)) 75% 0 / 16% var(--b4) no-repeat,
    linear-gradient(var(--b-rust), var(--b-rust)) 100% 0 / 16% var(--b5) no-repeat;
  /* Draws one viewport height, then settles on the full page (fill: backwards). */
  animation: b1 1.2s var(--ease) backwards, b2 1.2s .08s var(--ease) backwards, b3 1.2s .16s var(--ease) backwards,
    b4 1.2s .24s var(--ease) backwards, b5 1.2s .32s var(--ease) backwards;
}
.bands-corner, .bands-fan { position: absolute; bottom: 0; pointer-events: none; animation: fan-in .4s 1.3s both; }
.bands-corner { left: var(--edge); width: calc(68px * var(--u)); height: calc(241px * var(--u)); fill: none; stroke: currentColor; stroke-width: 6.4; }
.bands-fan { left: calc(var(--edge) + 66.8px * var(--u)); width: calc(100% - var(--edge) - 66.8px * var(--u)); height: var(--fan); fill: currentColor; }
.band-green { color: var(--b-green); }
.band-teal { color: var(--b-teal); }
.band-ochre { color: var(--b-ochre); }
.band-orange { color: var(--b-orange); }
.band-rust { color: var(--b-rust); }
.bands-seen body::after, .bands-seen .bands-corner, .bands-seen .bands-fan { animation: none; }

/* Motion: page crossfade, control feedback, image lift on linked project shots. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
::view-transition-old(bands) { display: none; }
::view-transition-new(bands) { animation: none; }
.button, .secondary-link, header nav a { transition: background-color .15s, color .15s, box-shadow .15s; }
.work-image img { transition: transform .7s cubic-bezier(.16, 1, .3, 1); }
.work:has(a:hover) .work-image img, .work:has(a:focus-visible) .work-image img { transform: scale(1.03); }

/* Responsive */
@media (min-width: 1600px) { .site { padding: 0 80px; } }
@media (max-width: 900px) {
  .site { padding: 0 30px; }
  .featured-work { grid-template-columns: 1.15fr 1fr; gap: 24px; }
  .featured-work .work-info h2 { font-size: 30px; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  body { --u: .7; }
  .site { padding-inline: max(20px, env(safe-area-inset-left)); }
  header { height: 76px; gap: 8px; }
  .brand { min-height: 44px; gap: 10px; font-size: 14px; }
  .brand small { display: none; }
  .brand-mark { font-size: 32px; }
  header nav { gap: 4px; flex-shrink: 0; }
  header nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 13px; }
  .portfolio-intro { padding: 22px 0; }
  .portfolio-intro h1 { font-size: 32px; }
  .portfolio-intro p { margin-top: 12px; font-size: 15px; line-height: 1.5; }
  .featured-work { display: flex; flex-direction: column; align-items: stretch; gap: 18px; padding-top: 18px; }
  .featured-work .work-info h2 { font-size: 28px; }
  .featured-work .work-info > p:not(.work-category) { font-size: 15px; line-height: 1.5; }
  .work-info { padding-top: 16px; }
  .work-info h3 { font-size: 25px; }
  .work-actions { gap: 10px 18px; margin-top: 16px; }
  .works { padding-top: 26px; }
  .section-title { margin-bottom: 20px; font-size: 26px; }
  .work-grid { grid-template-columns: 1fr; gap: 35px; }
  .tags span { font-size: 13px; }
  .about-heading { padding: 26px 0 30px; }
  .about-heading h1 { font-size: 38px; }
  .role { font-size: 15px; }
  .contact-section { padding-top: 20px; }
  .contact-grid { grid-template-columns: 1fr; }
  .back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 16px; }
  .project-heading h1 { font-size: 36px; overflow-wrap: anywhere; }
  .project-story { padding-block: 30px; }
  .project-pager { grid-template-columns: 1fr; gap: 18px; }
  .project-pager a { font-size: 20px; }
  .project-pager a:last-child { text-align: left; }
  footer { flex-wrap: wrap; column-gap: 18px; row-gap: 12px; }
  footer a { display: inline-flex; flex-direction: column; justify-content: center; min-height: 44px; }
  footer > a:last-child { flex-basis: 100%; align-items: flex-start; font-size: 14px; color: var(--teal-text); }
}
@media (max-width: 350px) {
  .site { padding-inline: 16px; }
  .brand { gap: 7px; font-size: 12px; }
  .brand-mark { font-size: 28px; }
  header nav a { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  body::after, .bands-corner, .bands-fan { animation: none; }
  .work:has(a:hover) .work-image img, .work:has(a:focus-visible) .work-image img { transform: none; }
  @view-transition { navigation: none; }
}
