:root {
  --ink: #f3f0e7;
  --muted: #a7a49c;
  --faint: #78766e;
  --paper: #11110f;
  --surface: #1a1a17;
  --line: rgba(243, 240, 231, 0.15);
  --lime: #d9f56a;
  --violet: #9d8df2;
  --orange: #f1a46d;
  --mono: "DM Mono", monospace;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Space Grotesk", var(--sans);
  --title-size: clamp(46px, 4.8vw, 68px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.site-shell { overflow: hidden; }
.section-wrap { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }

.site-header { width: min(1180px, calc(100% - 64px)); margin: 0 auto; height: 92px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); position: relative; z-index: 10; }
.wordmark { width: 150px; height: 54px; display: block; overflow: hidden; }
.wordmark img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; mix-blend-mode: screen; }
.wordmark-dot, .ui-logo span, .mark-dot { color: var(--lime); }
.site-nav { display: flex; align-items: center; gap: 36px; font-size: 13px; color: var(--muted); }
.site-nav a, .text-link, .footer a { transition: color 180ms ease; }
.site-nav a:hover, .text-link:hover, .site-footer a:hover { color: var(--lime); }
.nav-contact { color: var(--ink) !important; border-bottom: 1px solid var(--lime); padding-bottom: 4px; }
.nav-contact span, .text-link span { color: var(--lime); margin-left: 8px; }
.menu-toggle { display: none; background: none; color: var(--ink); border: 0; padding: 10px 0; cursor: pointer; }

.hero { min-height: 660px; margin-bottom: 45px; display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(360px, .97fr); align-items: center; gap: 8%; }
.eyebrow { color: var(--faint); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 26px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); margin-right: 10px; box-shadow: 0 0 0 4px rgba(217,245,106,.08); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--display); }
h1, h2 { font-weight: 700; letter-spacing: -.065em; line-height: .98; }
h1 { max-width: 700px; font-size: var(--title-size); margin-bottom: 28px; }
h1 em, h2 em { color: var(--lime); font-style: normal; }
.hero-copy h1 em { color: var(--lime); }
.hero-lede { max-width: 455px; color: var(--muted); font-size: 17px; line-height: 1.65; margin-bottom: 40px; }
.button { display: inline-flex; align-items: center; gap: 21px; padding: 15px 19px; font-size: 12px; font-weight: 700; transition: transform 180ms ease, background 180ms ease; }
.button:hover { transform: translateY(-3px); }
.button-primary { background: var(--lime); color: #171711; }
.button-primary span { font-size: 17px; line-height: 0; }
.hero-graphic { height: 420px; position: relative; display: grid; place-items: center; isolation: isolate; }
.hero-frame { width: min(100%, 465px); height: 362px; padding: 0 20px 18px; display: flex; flex-direction: column; justify-content: flex-start; overflow: hidden; position: relative; border: 1px solid rgba(243,240,231,.22); border-radius: 24px; background: linear-gradient(145deg, #1c1e1d, #131413 72%); box-shadow: 18px 20px 0 rgba(157,141,242,.18); }
.frame-chrome { height: 49px; flex: 0 0 49px; margin: 0 -20px 18px; padding: 0 20px; display: flex; align-items: center; gap: 7px; border-bottom: 1px solid rgba(243,240,231,.12); background: rgba(8,9,9,.14); }
.frame-chrome > span { width: 8px; height: 8px; border-radius: 50%; background: #ff625c; }
.frame-chrome > span:nth-child(2) { background: #ffbd44; }
.frame-chrome > span:nth-child(3) { background: #35c759; }
.frame-core { position: relative; z-index: 1; flex: 1; width: 100%; display: flex; flex-direction: column; justify-content: center; padding: 28px 20px; overflow: hidden; }
.code-snippet { display: grid; grid-template-columns: 1fr; gap: 7px; color: var(--ink); font: 500 clamp(13px, 1.5vw, 17px)/1.45 var(--mono); letter-spacing: -.04em; white-space: nowrap; }
.code-snippet i { color: var(--violet); font-style: normal; }
.code-snippet b { color: var(--orange); font-weight: 500; }
.code-snippet em { color: var(--lime); font-style: normal; }
.core-line { width: 90%; height: 1px; margin-top: 31px; background: linear-gradient(90deg, var(--lime), transparent); }

.ticker { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 17px 0; overflow: hidden; color: var(--muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; }
.ticker-track { display: flex; width: max-content; align-items: stretch; animation: drift 28s linear infinite; }
.ticker-group { width: max(100vw, 900px); display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px minmax(0, 1fr) 34px minmax(0, 1fr); align-items: center; }
.ticker-dot { color: var(--lime); font-size: 16px; font-weight: 400; line-height: 1; text-align: center; }
.ticker-group > span:not(.ticker-dot) { min-width: 0; text-align: center; }
@keyframes drift { to { transform: translateX(-50%); } }
.work, .about, .contact { padding-top: 165px; }
.section-heading h2, .contact h2 { font-size: var(--title-size); margin-bottom: 62px; }
#arbeid, #om, #kontakt { scroll-margin-top: 80px; }
.project-card { display: grid; grid-template-columns: 1.1fr .9fr; background: var(--surface); border: 1px solid var(--line); }
.project-visual { min-height: 515px; position: relative; overflow: hidden; background: #26272a; background-image: radial-gradient(circle at 35% 35%, rgba(157,141,242,.26), transparent 31%), radial-gradient(circle at 80% 80%, rgba(217,245,106,.12), transparent 28%); }
.project-chrome { height: 44px; border-bottom: 1px solid rgba(243,240,231,.13); display: flex; gap: 6px; align-items: center; padding: 0 18px; color: var(--faint); }
.project-chrome > span { width: 6px; height: 6px; border-radius: 50%; background: #6f716e; }
.medicine-ui { position: absolute; width: 58%; min-width: 265px; aspect-ratio: .8; top: 78px; left: 20%; padding: 25px 23px; background: #fbfaf7; color: #292823; box-shadow: 22px 26px 0 rgba(11,11,10,.28); transform: rotate(-4deg); }
.ui-topline { display: flex; justify-content: space-between; align-items: center; }
.ui-logo { font-size: 18px; font-weight: 800; letter-spacing: -.08em; }
.ui-avatar { width: 17px; height: 17px; border-radius: 50%; background: #dad7cc; }
.ui-greeting { margin-top: 40px; font-size: 18px; font-weight: 700; letter-spacing: -.05em; }
.ui-caption { font: 9px var(--mono); color: #959187; margin-top: 6px; }
.ui-cards { display: grid; grid-template-columns: 1.2fr 1fr; gap: 9px; margin-top: 25px; }
.ui-card { padding: 13px 11px; background: #ebe9e2; }
.ui-card-primary { background: #dff377; }
.ui-card span { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.06em; }
.ui-card small { color: #77746b; font: 7px var(--mono); }
.ui-list { margin-top: 26px; display: grid; gap: 12px; }
.ui-list i { display: block; height: 17px; background: linear-gradient(90deg, #d5d2ca 65%, transparent 65%); }
.visual-note { position: absolute; font: 10px var(--mono); color: var(--ink); background: var(--violet); padding: 7px 10px; }
.note-one { top: 113px; right: 10%; transform: rotate(4deg); }
.note-two { right: 12%; bottom: 87px; background: var(--lime); color: #1d1d17; transform: rotate(-4deg); }
.project-info { min-height: 515px; padding: 52px 47px 42px; display: flex; flex-direction: column; justify-content: center; }
.project-kicker { color: var(--faint); font: 10px var(--mono); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 22px; }
.project-info h3 { color: var(--lime); font-size: 45px; letter-spacing: -.07em; margin-bottom: 18px; }
.project-info h3.project-brand { width: min(100%, 240px); aspect-ratio: 1813 / 548; margin-bottom: 18px; line-height: 0; overflow: hidden; }
.project-info h3.project-brand img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.project-info p:not(.project-kicker) { max-width: 390px; color: var(--muted); line-height: 1.65; }
.text-link { width: max-content; border-bottom: 1px solid var(--line); padding-bottom: 8px; font-size: 12px; font-weight: 700; }
.project-link { display: inline-block; margin-top: 26px; color: var(--ink); }

.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: 0; align-items: start; clear: both; }
.about-mark { min-height: 280px; display: flex; align-items: flex-start; }
.about-mark h2 { max-width: 535px; font-size: var(--title-size); margin-bottom: 0; }
.about-copy { max-width: 535px; padding-top: 0; }
.about-copy p + p { margin-top: 26px; }
.about-copy > p:not(.eyebrow) { color: var(--muted); max-width: none; line-height: 1.7; }
.about-copy .text-link { margin-top: 18px; }

.contact { margin-top: 165px; border-top: 1px solid var(--line); padding-block: 120px 140px; display: flex; align-items: center; justify-content: center; }
.contact-link { display: inline-block; color: var(--lime); font-size: clamp(19px, 2.5vw, 30px); font-weight: 700; letter-spacing: -.06em; border-bottom: 1px solid var(--lime); padding-bottom: 8px; }
.site-footer { min-height: 90px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--faint); font: 10px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.site-footer a:hover { color: var(--lime); }

@media (max-width: 800px) {
  .section-wrap, .site-header { width: min(100% - 40px, 620px); }
  .site-header { height: 76px; }
  .menu-toggle { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 12px; }
  .menu-icon { display: grid; gap: 4px; }
  .menu-icon i { display: block; width: 16px; height: 1px; background: var(--lime); }
  .site-nav { position: absolute; left: 0; right: 0; top: 75px; padding: 0; max-height: 0; overflow: hidden; display: grid; gap: 0; background: var(--paper); transition: max-height 220ms ease, padding 220ms ease; }
  .site-nav.is-open { max-height: 210px; padding: 10px 0 20px; border-bottom: 1px solid var(--line); }
  .site-nav a { padding: 12px 0; }
  .hero { min-height: 0; margin-bottom: 0; display: block; padding-top: 105px; }
  h1 { font-size: clamp(48px, 13vw, 76px); }
  .hero-graphic { height: 320px; margin: 70px 0 95px; }
  .hero-frame { height: 315px; }
  .work, .about { padding-top: 110px; }
  .section-heading h2, .about-mark h2, .contact h2 { font-size: clamp(42px, 11vw, 68px); margin-bottom: 42px; }
  .project-card { grid-template-columns: 1fr; }
  .project-visual, .project-info { min-height: 430px; }
  .project-info { padding: 35px 28px 32px; }
  .medicine-ui { top: 67px; left: 17%; }
  .about { grid-template-columns: 1fr; gap: 75px; }
  .about-mark { min-height: 0; margin-bottom: 10px; }
  .about-copy { padding-top: 0; }
  .contact { margin-top: 110px; padding-block: 90px 100px; }
  .site-footer { min-height: 115px; flex-wrap: wrap; gap: 14px; padding: 24px 0; }
}

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