:root {
  --ink: #0b1020;
  --paper: #f4f5ef;
  --lime: #c8ff2e;
  --coral: #ff5e55;
  --blue: #4357ff;
  --muted: #aeb5c8;
  --display: "Syne", sans-serif;
  --body: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: var(--body); font-size: 1rem; line-height: 1.65; overflow-x: hidden; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--lime); outline-offset: 5px; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: -6rem; left: 1rem; z-index: 100; padding: 1rem; background: var(--lime); color: var(--ink); }
.skip-link:focus { top: 1rem; }
a { color: inherit; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
::selection { background: var(--lime); color: var(--ink); }

.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 99; }
.progress span { display: block; width: 100%; height: 100%; background: var(--lime); transform-origin: left; transform: scaleX(0); }
.site-header { position: absolute; inset: 0 0 auto; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding: 1.5rem max(1.25rem,4vw,calc((100vw - 1320px)/2)); font-size: .88rem; }
.wordmark { font-family: var(--display); font-size: 1.3rem; font-weight: 800; text-decoration: none; }
.wordmark span { color: var(--lime); }
nav { display: flex; gap: 2rem; }
nav a, .availability { text-decoration: none; }
nav a { position: relative; }
nav a::after { content: ""; position: absolute; height: 1px; inset: auto 0 -.3rem; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .35s ease; }
nav a:hover::after, nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.availability { justify-self: end; display: flex; align-items: center; gap: .6rem; }
.availability span { width: .55rem; height: .55rem; background: var(--lime); border-radius: 50%; box-shadow: 0 0 0 .35rem rgb(200 255 46 / .12); }

.hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; padding: clamp(7.5rem,12svh,10rem) max(1.25rem,4vw,calc((100vw - 1320px)/2)) 0; overflow: hidden; }
.hero-intro-layout { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: clamp(2rem,5svh,4rem); padding-bottom: clamp(1.5rem,3svh,2.5rem); }
.hero-intro-layout > * { min-width: 0; }
.hero-top { flex: 1; display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,.7fr); align-items: center; gap: clamp(1.5rem,4vw,4rem); }
.hero-name { min-width: 0; container-type: inline-size; }
.hero-portrait { display: flex; align-items: center; justify-content: center; justify-self: end; width: 100%; max-width: 22rem; min-width: 0; margin: 0; }
.hero-portrait img { width: auto; height: auto; max-width: 100%; max-height: min(48svh,30rem); object-fit: contain; }
.eyebrow { margin: 0 0 1.4rem; text-transform: uppercase; letter-spacing: .12em; font-size: .875rem; font-weight: 600; }
.hero h1, .section-head h2, .about h2, .contact h2 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -.065em; line-height: .86; text-transform: uppercase; }
.hero h1 { max-width: 100%; font-size: clamp(2rem, 9.75vw, 9rem); line-height: .94; overflow-wrap: normal; }
.hero-name-line { display: block; width: max-content; white-space: nowrap; }
.hero-name-line:last-child { margin-left: 0; }
@supports (font-size: 1cqi) { .hero h1 { font-size: min(9rem, 17cqi, 15svh); } }
.outline { color: transparent; -webkit-text-stroke: max(1px, .012em) var(--paper); }
.hero-bottom { display: flex; justify-content: space-between; align-items: center; gap: 2rem; margin: 0; padding-top: clamp(1.25rem,2.5svh,2rem); border-top: 1px solid rgb(244 245 239 / .2); }
.hero-bottom p { margin: 0; max-width: 33rem; color: var(--muted); font-size: clamp(1rem, 1.35vw, 1.2rem); }
.hero-project-link { flex-shrink: 0; display: flex; align-items: center; gap: 1.25rem; text-decoration: none; font-size: .9rem; }
.circle-link { width: 4.8rem; height: 4.8rem; display: grid; place-items: center; border: 1px solid rgb(244 245 239 / .35); border-radius: 50%; transition: background .35s, color .35s, transform .35s; }
.hero-project-link:hover .circle-link, .hero-project-link:focus-visible .circle-link { background: var(--lime); color: var(--ink); transform: rotate(-8deg); }
.circle-link svg { width: 1.75rem; fill: none; stroke: currentColor; stroke-width: 1.6; }
.ticker { width: calc(100vw + 8rem); margin-left: calc((100% - 100vw) / 2 - 4rem); display: flex; overflow: hidden; background: var(--lime); color: var(--ink); transform: rotate(-1.2deg); }
.ticker div { flex: none; display: flex; align-items: center; gap: 2rem; padding: .8rem 1rem; font-family: var(--display); font-weight: 700; text-transform: uppercase; animation: marquee 22s linear infinite; }
.ticker span { font-size: 1rem; white-space: nowrap; }
.ticker i { font-style: normal; font-size: .7rem; }
.ticker.is-paused div { animation-play-state: paused; }
@media (hover: hover) and (pointer: fine) { .ticker:hover div { animation-play-state: paused; } }
.ticker-toggle { align-self: flex-end; margin: 0 0 .75rem; padding: .4rem .2rem; min-height: 44px; background: transparent; color: var(--muted); border: 0; font: inherit; font-size: .875rem; cursor: pointer; text-decoration: underline; text-underline-offset: .25em; }

.section-pad { padding: clamp(6rem, 11vw, 11rem) clamp(1.25rem, 4vw, 4rem); }
.work { background: var(--paper); color: var(--ink); }
.section-head { display: grid; grid-template-columns: 1fr 2fr; margin-bottom: clamp(5rem, 10vw, 10rem); }
.section-head h2 { font-size: clamp(3rem, 7.2vw, 7.6rem); }
.project { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(17rem, .75fr); gap: clamp(2rem, 6vw, 7rem); align-items: end; margin-bottom: clamp(7rem, 12vw, 13rem); }
.project-b { grid-template-columns: minmax(17rem, .75fr) minmax(0, 1.55fr); }
.project-b .project-visual { order: 2; }
.project-visual { position: relative; width: 100%; aspect-ratio: 1.5; overflow: hidden; padding: 0; border: 0; background: #d8dccb; color: var(--paper); text-align: left; cursor: pointer; font: inherit; }
.project-visual img { transition: transform .8s cubic-bezier(.2,.7,.2,1), filter .8s; }
.project-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(11 16 32 / .06), transparent 50%, rgb(11 16 32 / .58)); transition: background .45s; }
.project-visual:hover img, .project-visual:focus-visible img { transform: scale(1.025); filter: saturate(1.08) contrast(1.02); }
.project-visual:focus-visible { outline: 4px solid var(--blue); outline-offset: 5px; }
.project-index, .project-status, .view-case { position: absolute; z-index: 2; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.project-index { top: 1.25rem; left: 1.25rem; border: 1px solid currentColor; border-radius: 999px; padding: .45rem .7rem; }
.project-status { top: 1.25rem; right: 1.25rem; padding: .48rem .72rem; color: var(--ink); background: var(--lime); border-radius: 999px; font-size: .68rem; }
.view-case { right: 1.25rem; bottom: 1.25rem; transform: translateY(.5rem); opacity: 0; transition: opacity .35s, transform .35s; }
.project-visual:hover .view-case, .project-visual:focus-visible .view-case { opacity: 1; transform: none; }
.project-type { color: #656c7d; text-transform: uppercase; letter-spacing: .12em; font-size: .7rem; }
.project h3 { max-width: 100%; margin: 1rem 0 1.3rem; font-family: var(--display); font-size: clamp(2.25rem, 2.8vw, 2.85rem); line-height: .93; letter-spacing: -.05em; overflow-wrap: anywhere; }
.project-title-medvirkning span { display: block; }
.project-copy > p:not(.project-type) { max-width: 34rem; font-size: clamp(1rem, 1.3vw, 1.2rem); }
.about { display: grid; grid-template-columns: minmax(17rem, .9fr) minmax(0, 2.1fr); gap: clamp(3rem, 6vw, 7rem); align-items: center; overflow: hidden; background: var(--coral); color: var(--ink); }
.about-portrait { align-self: stretch; display: flex; flex-direction: column; }
/* Keep the white backdrop on the transparent image itself: a separate light
   figure background can bleed through the rotated image's antialiased edge. */
.about-portrait figure { position: relative; width: min(100%, 25rem); aspect-ratio: 4 / 5; margin: auto 1rem 1rem 0; overflow: hidden; background: transparent; box-shadow: 1rem 1rem 0 var(--ink); transform: rotate(-1.5deg); }
.about-portrait img { position: absolute; inset: -2px; width: calc(100% + 4px); height: calc(100% + 4px); background: var(--paper); object-fit: cover; object-position: center 34%; filter: grayscale(1) contrast(1.03); }
.about h2 { font-size: clamp(3.2rem, 7.7vw, 8rem); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 7rem); margin: clamp(3rem, 7vw, 7rem) 0; }
.about-grid p { margin-top: 0; }
.about-lead { font-family: var(--display); font-size: clamp(1.4rem, 2.2vw, 2.25rem); font-weight: 600; line-height: 1.15; }
.skills { list-style: none; display: flex; flex-wrap: wrap; gap: .7rem; padding: 0; margin: 0; }
.skills li { border: 1px solid rgb(11 16 32 / .6); border-radius: 999px; padding: .7rem 1rem; font-size: .82rem; }

.contact { min-height: 0; display: flex; flex-direction: column; justify-content: flex-start; position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(4rem,7vw,7rem) 2rem; padding-inline: max(1.25rem,4vw,calc((100vw - 1320px)/2)); }
.contact h2 { font-size: clamp(2rem, 8vw, 7.5rem); line-height: 1; overflow-wrap: anywhere; }
.contact h2 span { color: var(--lime); }
.mail-link { align-self: flex-start; display: flex; flex-wrap: wrap; max-width: 100%; gap: .5rem 1.5rem; margin-top: 3rem; padding-bottom: .45rem; border-bottom: 1px solid currentColor; font-size: clamp(1rem, 2vw, 1.7rem); text-decoration: none; overflow-wrap: anywhere; }
.mail-link span { transition: transform .3s; }
.mail-link:hover span { transform: translate(.25rem, -.25rem); }
.contact-bottom { position: static; margin-top: 5rem; display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; color: var(--muted); font-size: .875rem; text-transform: uppercase; letter-spacing: .05em; }
.footer-meta { display: grid; gap: .3rem; }
.footer-meta p { margin: 0; }
.copyright { color: var(--paper); }
.footer-links { display: flex; gap: 2rem; align-items: end; }
.contact-bottom a { text-decoration: none; }
.case-toast { position: fixed; z-index: 100; left: 50%; bottom: 1.5rem; max-width: calc(100% - 2rem); transform: translate(-50%, 1rem); padding: .85rem 1.1rem; border: 1px solid rgb(244 245 239 / .16); border-radius: 999px; background: rgb(11 16 32 / .94); color: var(--paper); box-shadow: 0 1rem 3rem rgb(0 0 0 / .3); opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; font-size: .86rem; white-space: nowrap; }
.case-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.reveal { opacity: 1; transform: none; }
.motion-ready .reveal { opacity: 0; transform: translateY(1.25rem); transition: opacity .65s ease, transform .65s cubic-bezier(.22,.8,.25,1); }
.motion-ready .reveal.is-visible { opacity: 1; transform: none; }
@keyframes marquee { to { transform: translateX(-100%); } }

@media (max-width: 1100px) and (min-width: 761px) {
  .section-pad { padding-inline: clamp(2rem, 5vw, 3.5rem); }
  .section-head { grid-template-columns: .75fr 2.25fr; }
  .project, .project-b { grid-template-columns: 1fr; gap: 2.4rem; }
  .project-b .project-visual { order: 0; }
  .project-copy { max-width: 46rem; }
  .project h3 { max-width: none; font-size: clamp(2.8rem, 6vw, 4rem); }
  .about { grid-template-columns: minmax(13rem, .75fr) minmax(0, 2.25fr); gap: 2rem; }
  .about-portrait figure { margin-right: 1rem; }
  .about h2 { font-size: clamp(3.4rem, 6.7vw, 5.4rem); }
  .about-grid { grid-template-columns: 1fr; gap: 1.3rem; margin-block: 3rem; }
  .contact h2 { font-size: clamp(2rem, 8vw, 6rem); }
}

@media (max-width: 760px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header nav { position: fixed; inset: auto 1rem max(1rem,env(safe-area-inset-bottom)); z-index: 20; justify-content: center; flex-wrap: wrap; gap: .25rem clamp(.75rem,4vw,2rem); padding: .45rem 1.1rem; background: rgb(11 16 32 / .9); border: 1px solid rgb(244 245 239 / .18); border-radius: 999px; backdrop-filter: blur(16px); }
  .site-header nav a { display: flex; align-items: center; min-height: 44px; }
  .availability { display: none; }
  .hero { --hero-mobile-gutter: max(1.25rem,4vw); padding: 5.5rem var(--hero-mobile-gutter) 0; }
  .hero-intro-layout { flex: 1 0 auto; gap: 1.5rem; padding-bottom: 1rem; }
  .hero-top { grid-template-columns: minmax(0,1.6fr) minmax(0,.75fr); gap: .75rem; }
  .hero h1 { font-size: clamp(2rem,9.75vw,4.5rem); }
  .hero-portrait img { max-height: min(32svh,17rem); }
  .hero-bottom { align-items: flex-start; flex-direction: column; gap: 1rem; padding-top: 1rem; }
  .hero-project-link { width: 100%; justify-content: space-between; }
  .circle-link { width: 4rem; height: 4rem; }
  .hero .ticker { flex: 0 0 auto; width: calc(100% + 2 * var(--hero-mobile-gutter) + 2rem); margin-left: calc(-1 * var(--hero-mobile-gutter) - 1rem); transform: rotate(-1.2deg); }
  .hero .ticker div { gap: 1rem; padding: .6rem .5rem; line-height: 1.4; }
  .hero .ticker span { font-size: .8125rem; }
  .hero .ticker i { font-size: .55rem; }
  .hero .ticker-toggle { flex: 0 0 auto; margin-bottom: .35rem; font-size: .8125rem; }
  .motion-ready .hero .reveal { opacity: 1; transform: none; transition: none; }
  .section-head, .project, .project-b, .about, .about-grid { grid-template-columns: 1fr; }
  .section-head { gap: 1rem; }
  .project-b .project-visual { order: 0; }
  .project h3 { font-size: clamp(2.15rem, 9.2vw, 3rem); }
  .about-portrait { min-height: 0; }
  .about-portrait figure { width: min(82vw, 24rem); margin: 1rem auto 4rem; transform: rotate(-1deg); }
  .about-main { position: relative; z-index: 1; }
  .contact-bottom { margin-top: 4rem; flex-direction: column; gap: 1.5rem; align-items: flex-start; }
  .contact { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
  .footer-links { flex-wrap: wrap; gap: 1rem 2rem; }
  .footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .case-toast { white-space: normal; text-align: center; }
}

@media (max-width: 760px) and (prefers-reduced-motion: no-preference) {
  /* Reserve the control's space before JavaScript enables it. */
  .hero .ticker-toggle[hidden] { display: block !important; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .motion-ready .reveal { opacity: 1; transform: none; }
  .ticker-toggle { display: none; }
}
