/* ============================================================
   Karoline Nilsen — portfolio
   Shared stylesheet. Direction C (sidebar shell) + components.
   ============================================================ */

@import url('assets/fonts/fonts.css');

:root {
	--cream: #F6F1EA;
	--cream-deep: #EFE7DD;
	--bone: #F1EAE1;
	--ink: #2B2724;
	--muted: #564D46;
	--rose: #D6ABA2;
	--rose-deep: #BE8A82;
	--rose-ink: #A15E54;
	--blush: #E7CFC8;
	--taupe: #CDBDB1;
	--sage: #C7C4AF;
	--charcoal: #413B37;
	--green: #6E8A5E;
	--line: rgba(43, 39, 36, .12);
	--line-soft: rgba(43, 39, 36, .07);

	--serif: 'Cormorant Garamond', Georgia, serif;
	--sans: 'Mulish', system-ui, -apple-system, sans-serif;
	--mono: ui-monospace, 'SF Mono', Menlo, monospace;

	--sidebar-w: 304px;
	--pad: clamp(28px, 4.5vw, 104px);
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--cream);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img {
	display: block;
	max-width: 100%;
}

a {
	color: inherit;
	text-decoration: none;
}

::selection {
	background: var(--rose);
	color: var(--ink);
}

/* ---------- Typography helpers ---------- */
.eyebrow {
	font-family: var(--mono);
	font-size: 11.5px;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--rose-ink);
	font-weight: 500;
}

h1,
h2,
h3 {
	font-family: var(--serif);
	font-weight: 500;
	color: var(--ink);
	margin: 0;
	line-height: 1.04;
}

.display {
	font-size: clamp(46px, 6vw, 82px);
	line-height: .98;
	letter-spacing: -.01em;
	font-weight: 500;
}

.h-lg {
	font-size: clamp(32px, 4vw, 48px);
}

.h-md {
	font-size: clamp(24px, 3vw, 34px);
}

.lead {
	font-size: clamp(16.5px, 1.4vw, 19px);
	line-height: 1.7;
	color: var(--muted);
}

.muted {
	color: var(--muted);
}

p {
	text-wrap: pretty;
}

/* ---------- App shell (sidebar + main) ---------- */
.app {
	display: flex;
	min-height: 100vh;
}

.sidebar {
	width: var(--sidebar-w);
	flex: 0 0 var(--sidebar-w);
	background: var(--cream-deep);
	border-right: 1px solid var(--line);
	padding: 38px 34px 30px;
	display: flex;
	flex-direction: column;
	position: sticky;
	top: 0;
	height: 100vh;
}

.brand {
	display: block;
}

.brand .name {
	font-family: var(--serif);
	font-size: 31px;
	font-weight: 600;
	line-height: 1.02;
	color: var(--ink);
}

.brand .role {
	font-size: 11.5px;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--rose-ink);
	font-weight: 700;
	margin-top: 11px;
}

.nav {
	display: flex;
	flex-direction: column;
	margin-top: 42px;
}

.nav a {
	font-size: 14.5px;
	font-weight: 500;
	color: var(--muted);
	padding: 11px 0;
	border-bottom: 1px solid var(--line-soft);
	display: flex;
	align-items: center;
	justify-content: space-between;
	transition: color .18s, padding-left .18s;
}

.nav a:hover {
	color: var(--ink);
	padding-left: 6px;
}

.nav a .dot {
	color: var(--rose-deep);
	opacity: 0;
	transition: opacity .18s;
	font-size: 9px;
}

.nav a:hover .dot {
	opacity: 1;
}

.nav a.active {
	color: var(--ink);
	font-weight: 700;
}

.nav a.active .dot {
	opacity: 1;
}

.sidebar-foot {
	margin-top: auto;
	padding-top: 26px;
}

.sidebar-foot .bio {
	font-size: 13px;
	line-height: 1.6;
	color: var(--muted);
	margin: 0 0 18px;
}

.status {
	display: flex;
	align-items: center;
	gap: 9px;
}

.status .pulse {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--green);
	position: relative;
	flex: 0 0 8px;
}

.status .pulse::after {
	content: '';
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	border: 1px solid var(--green);
	opacity: .5;
	animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
	0% {
		transform: scale(.6);
		opacity: .6;
	}

	100% {
		transform: scale(1.6);
		opacity: 0;
	}
}

.status .label {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--ink);
}

.contacts {
	margin-top: 18px;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.contacts a,
.contacts span {
	font-size: 12.5px;
	color: var(--muted);
	transition: color .18s;
}

.contacts a:hover {
	color: var(--rose-deep);
}

.main {
	flex: 1 1 auto;
	min-width: 0;
}

.page {
	padding: clamp(48px, 6vw, 92px) var(--pad);
	max-width: 1480px;
}

/* mobile top bar (hidden on desktop) */
.topbar {
	display: none;
}

/* ---------- Placeholder image blocks ---------- */
.ph {
	position: relative;
	overflow: hidden;
	background: var(--blush);
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
}

.ph::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .16) 0 1px, transparent 1px 10px);
}

.ph>span {
	position: relative;
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: rgba(43, 39, 36, .42);
	text-align: center;
	padding: 0 12px;
}

.t-blush {
	background: var(--blush);
}

.t-rose {
	background: var(--rose);
}

.t-rosedeep {
	background: var(--rose-deep);
}

.t-taupe {
	background: var(--taupe);
}

.t-sage {
	background: var(--sage);
}

.t-cream {
	background: var(--cream-deep);
}

.t-charcoal {
	background: var(--charcoal);
}

.t-charcoal>span {
	color: rgba(246, 241, 234, .6);
}

/* ============================================================
   REAL IMAGES & VIDEO
   To swap a placeholder for real media, just drop an <img> or
   <video> INSIDE the existing .ph block — keep the .ph + tone class:

     <div class="ph t-taupe feature">
       <img src="bilder/bryggen.jpg" alt="Morgenlys over Bryggen"
            loading="lazy" decoding="async" />
     </div>

     <div class="ph t-charcoal thumb">
       <span class="badge">Video</span>
       <video src="film/uvaeret.mp4" muted loop playsinline
              poster="bilder/uvaeret.jpg"></video>
     </div>

   The media fills the slot, inherits the rounded corners, and the
   stripe + label hide automatically. All existing sizing (gallery
   --ar, .feature, .thumb, .portrait heights) keeps working.
   ============================================================ */
.ph>img,
.ph>video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	/* fills the frame, crops as needed */
	object-position: center;
	display: block;
	z-index: 1;
	/* above the placeholder stripe + label */
	border-radius: inherit;
}

.ph>video {
	object-fit: cover;
}

.ph>video:fullscreen {
	object-fit: contain;
	background: black;
}

.ph>img {
	transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}

.cta {
	display: inline-block;
	margin-top: 12px;
	font-weight: 500;
	text-decoration: none;
	color: inherit;
}

.cta:hover {
	text-decoration: underline;
}

/* hide the placeholder dressing once real media is in the slot */
.ph:has(> img)::before,
.ph:has(> video)::before {
	display: none;
}

.ph:has(> img)>span:not(.play):not(.yt-label):not(.yt-overlay),
.ph:has(> video)>span:not(.play):not(.yt-label):not(.yt-overlay) {
	display: none;
}

/* keep the badge above the media */
.feed-card .badge {
	z-index: 2;
}

/* ---------- Play button (video / youtube thumbs) ---------- */
.ph[data-lb-item] {
	cursor: pointer;
}

.play {
	position: absolute;
	z-index: 2;
	inset: 0;
	margin: auto;
	width: 58px;
	height: 58px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(231, 207, 200, .94);
	color: var(--rose-ink);
	box-shadow: 0 6px 20px rgba(33, 29, 27, .28);
	transition: transform .2s ease, background .2s ease;
}

.play svg {
	width: 22px;
	height: 22px;
	margin-left: 3px;
	fill: currentColor;
}

/* Red YouTube-style badge for the YouTube thumbs */
.play--yt {
	width: 64px;
	height: 45px;
	border-radius: 13px;
	background: #FF0000;
	color: #fff;
}

.play--yt svg {
	margin-left: 2px;
}

/* Centred stack: red badge with the caption directly beneath it */
.yt-overlay {
	position: absolute;
	z-index: 2;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

/* inside the overlay the badge flows in the stack, not pinned to the frame */
.yt-overlay .play--yt {
	position: static;
	inset: auto;
	margin: 0;
}

.ph[data-lb-item]:hover .play,
.ph[data-lb-item]:focus-visible .play,
.thumb-yt:hover .play--yt,
.thumb-yt:focus-visible .play--yt {
	transform: scale(1.08);
}

.ph[data-lb-item]:hover .play,
.ph[data-lb-item]:focus-visible .play {
	background: var(--blush);
}

/* "Se på YouTube" caption */
.yt-label {
	padding: 5px 10px;
	border-radius: 999px;
	background: #FF0000;
	color: #fff;
	font-family: var(--sans);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .02em;
	line-height: 1;
	box-shadow: 0 4px 14px rgba(33, 29, 27, .28);
}

.ph[data-lb-item]:focus-visible {
	outline: 2px solid var(--rose-deep);
	outline-offset: 3px;
}

/* gentle zoom on the photos that live in interactive cards */
.gal-flex .ph:hover>img,
.work-card:hover .ph>img,
.feed-card:hover .ph>img {
	transform: scale(1.05);
}

/* Standalone option: a bare <img>/<video class="kn-img ratio-*"> with no .ph
   wrapper. Use a ratio class so layout reserves space before the media loads. */
.kn-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 6px;
	background: var(--cream-deep);
}

.kn-img.ratio-landscape {
	aspect-ratio: 4 / 3;
	height: auto;
}

.kn-img.ratio-portrait {
	aspect-ratio: 3 / 4;
	height: auto;
}

.kn-img.ratio-square {
	aspect-ratio: 1 / 1;
	height: auto;
}

.kn-img.ratio-wide {
	aspect-ratio: 16 / 9;
	height: auto;
}

/* ---------- Buttons / links ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-family: var(--sans);
	font-size: 13.5px;
	font-weight: 600;
	letter-spacing: .03em;
	padding: 13px 26px;
	border-radius: 999px;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform .18s, background .18s, color .18s, border-color .18s;
}

.btn-solid {
	background: var(--ink);
	color: var(--cream);
}

.btn-solid:hover {
	transform: translateY(-2px);
	background: #1d1a18;
}

.btn-ghost {
	background: transparent;
	color: var(--ink);
	border-color: var(--line);
}

.btn-ghost:hover {
	border-color: var(--rose-deep);
	color: var(--rose-deep);
}

.link-underline {
	font-size: 13.5px;
	font-weight: 600;
	letter-spacing: .03em;
	color: var(--ink);
	border-bottom: 1px solid var(--rose-deep);
	padding-bottom: 2px;
	transition: color .18s;
}

.link-underline:hover {
	color: var(--rose-deep);
}

/* ---------- Tag / chip ---------- */
.tag {
	font-size: 10px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--rose-ink);
	font-weight: 700;
}

.chip {
	font-size: 12.5px;
	letter-spacing: .03em;
	font-weight: 600;
	cursor: pointer;
	padding: 8px 17px;
	border-radius: 999px;
	background: transparent;
	color: var(--muted);
	border: 1px solid var(--line);
	font-family: var(--sans);
	transition: all .18s;
}

.chip:hover {
	border-color: var(--rose-deep);
	color: var(--ink);
}

.chip.active {
	background: var(--ink);
	color: var(--cream);
	border-color: var(--ink);
}

/* ---------- Section header ---------- */
.sec-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 36px;
}

.divider {
	height: 1px;
	background: var(--line);
	border: 0;
	margin: clamp(52px, 6.5vw, 88px) 0;
}

/* ============================================================
   HOME (direction C)
   ============================================================ */
.home-hero {
	display: grid;
	grid-template-columns: 1.05fr .95fr;
	gap: clamp(40px, 6vw, 92px);
	align-items: center;
	min-height: min(64vh, 600px);
}

.home-hero .feature {
	height: clamp(380px, 46vw, 540px);
}

.home-hero h1 {
	margin-top: 26px;
}

.home-hero .lead {
	margin: 26px 0 0;
	max-width: 460px;
}

.home-cta {
	display: flex;
	align-items: center;
	gap: 26px;
	margin-top: 38px;
	flex-wrap: wrap;
}

.work-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(26px, 3vw, 40px);
}

.work-card {
	display: flex;
	flex-direction: column;
}

.work-card .thumb {
	aspect-ratio: 16 / 9;
	transition: transform .35s ease;
}

.work-card:hover .thumb {
	transform: translateY(-4px);
}

.work-card-body {
	display: block;
	color: inherit;
}

.work-card-body:hover h3 {
	color: var(--rose-deep);
}

.work-card .meta-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 14px;
}

.work-card h3 {
	font-size: 22px;
	line-height: 1.12;
	margin-top: 6px;
}

.work-card .meta {
	font-size: 12.5px;
	color: var(--muted);
	margin-top: 6px;
}

.work-card p {
	font-size: 14px;
	color: var(--muted);
	margin: 9px 0 0;
}

.outlets {
	display: flex;
	align-items: center;
	gap: 26px;
	flex-wrap: wrap;
}

.outlets .lbl {
	font-size: 11px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--muted);
	font-weight: 700;
}

.outlets .o {
	font-family: var(--serif);
	font-size: 21px;
	color: var(--ink);
	opacity: .5;
}

/* ============================================================
   GALLERY (justified rows) + lightbox
   ============================================================ */
.gal-rows {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.gal-row {
	display: flex;
	gap: 14px;
	height: clamp(180px, 22vw, 250px);
}

.gal-row .ph {
	cursor: zoom-in;
	transition: filter .25s, transform .25s;
}

.gal-row .ph:hover {
	filter: brightness(.94);
}

.gal-row .ph.hide {
	display: none;
}

/* Justified flex gallery (reflows on filter) */
.gal-flex {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.gal-flex .ph {
	height: clamp(170px, 21vw, 240px);
	flex-grow: var(--ar, 1);
	flex-basis: calc(clamp(170px, 21vw, 240px) * var(--ar, 1));
	cursor: zoom-in;
	transition: filter .25s, transform .25s;
}

.gal-flex .ph:hover {
	filter: brightness(.93);
	transform: translateY(-2px);
}

.gal-flex .ph.hide {
	display: none;
}

.lightbox {
	position: fixed;
	inset: 0;
	background: rgba(33, 29, 27, .86);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 200;
	backdrop-filter: blur(3px);
}

.lightbox.open {
	display: flex;
}

.lightbox .frame {
	width: min(82vw, 1000px);
	height: min(80vh, 680px);
	position: relative;
}

.lightbox .lb-stage {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Media is contained, never cropped — vertical films letterbox cleanly. */
.lightbox .lb-img,
.lightbox .lb-vid {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 8px;
	background: #211d1b;
}

.lightbox .lb-yt {
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: 8px;
	background: #211d1b;
}

.lightbox .ph {
	width: 100%;
	height: 100%;
	border-radius: 8px;
}

.lightbox .cap {
	position: absolute;
	left: 0;
	bottom: -38px;
	color: var(--cream);
	font-size: 13.5px;
}

.lightbox .count {
	position: absolute;
	right: 0;
	bottom: -38px;
	color: rgba(246, 241, 234, .6);
	font-family: var(--mono);
	font-size: 12.5px;
	letter-spacing: .1em;
}

.lb-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1px solid rgba(246, 241, 234, .4);
	background: rgba(33, 29, 27, .4);
	color: var(--cream);
	font-size: 22px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .18s;
}

.lb-btn:hover {
	background: rgba(246, 241, 234, .18);
}

.lb-prev {
	left: -68px;
}

.lb-next {
	right: -68px;
}

.lb-close {
	position: fixed;
	top: 26px;
	right: 30px;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: none;
	background: var(--cream);
	color: var(--ink);
	font-size: 20px;
	cursor: pointer;
	transition: transform .25s;
}

.lb-close:hover {
	transform: rotate(90deg);
}

/* ============================================================
   WORK feed (arbeid)
   ============================================================ */
.feed {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: clamp(22px, 2.6vw, 34px);
}

.feed-card {
	display: flex;
	flex-direction: column;
	cursor: pointer;
}

.feed-card .thumb {
	aspect-ratio: 16 / 9;
	position: relative;
}

.feed-card .badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background: rgba(246, 241, 234, .92);
	color: var(--ink);
	font-size: 10px;
	letter-spacing: .14em;
	text-transform: uppercase;
	font-weight: 700;
	padding: 5px 11px;
	border-radius: 999px;
}

.feed-card .meta-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 15px;
}

.feed-card h3 {
	font-size: clamp(22px, 2vw, 27px);
	line-height: 1.1;
	margin-top: 7px;
}

.feed-card p {
	font-size: 14.5px;
	color: var(--muted);
	margin: 10px 0 0;
}

.feed-card .src {
	font-size: 12.5px;
	color: var(--muted);
	margin-top: 12px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.feed-card.hide {
	display: none;
}

.filters {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

/* ============================================================
   ABOUT (om meg)
   ============================================================ */
.about-hero {
	display: grid;
	grid-template-columns: .85fr 1.15fr;
	gap: clamp(30px, 4vw, 60px);
	align-items: start;
}

.about-hero .portrait {
	height: clamp(380px, 46vw, 540px);
	position: sticky;
	top: 40px;
}

.about-body p {
	font-size: clamp(16px, 1.4vw, 18px);
	line-height: 1.75;
	color: var(--ink);
	margin: 0 0 20px;
}

.about-body p.muted {
	color: var(--muted);
}

.pull {
	font-family: var(--serif);
	font-size: clamp(26px, 3vw, 36px);
	line-height: 1.2;
	color: var(--ink);
	margin: 32px 0;
	font-style: italic;
}

.skills {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1px;
	background: var(--line);
	border: 1px solid var(--line);
	border-radius: 8px;
	overflow: hidden;
	margin-top: 14px;
}

.skills .s {
	background: var(--cream);
	padding: 22px 24px;
}

.skills .s .k {
	font-family: var(--serif);
	font-size: 22px;
}

.skills .s .v {
	font-size: 13px;
	color: var(--muted);
	margin-top: 5px;
}

.facts {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin-top: 26px;
}

.facts .f {
	display: flex;
	justify-content: space-between;
	padding: 13px 0;
	border-bottom: 1px solid var(--line-soft);
	font-size: 14px;
}

.facts .f .fk {
	color: var(--muted);
}

.facts .f .fv {
	font-weight: 600;
}

/* ============================================================
   CONTACT (kontakt)
   ============================================================ */
.contact-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(36px, 5vw, 76px);
	align-items: start;
}

.contact-methods {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 30px;
}

.cm {
	display: flex;
	flex-direction: column;
	padding: 18px 0;
	border-top: 1px solid var(--line);
}

.cm .ck {
	font-size: 11px;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--rose-ink);
	font-weight: 700;
}

.cm .cv {
	font-family: var(--serif);
	font-size: 25px;
	margin-top: 5px;
	transition: color .18s;
}

a.cm:hover .cv {
	color: var(--rose-deep);
}

.form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.field {
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.field label {
	font-size: 12px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--muted);
	font-weight: 700;
}

.field input,
.field textarea {
	font-family: var(--sans);
	font-size: 15px;
	color: var(--ink);
	background: var(--bone);
	border: 1px solid var(--line);
	border-radius: 7px;
	padding: 13px 15px;
	transition: border-color .18s, background .18s;
	resize: vertical;
}

.field input:focus,
.field textarea:focus {
	outline: none;
	border-color: var(--rose-deep);
	background: #fff;
}

.field.err input,
.field.err textarea {
	border-color: #b66;
	background: #fbeeee;
}

.field .msg {
	font-size: 12px;
	color: #b66;
	display: none;
}

.field.err .msg {
	display: block;
}

.form-note {
	font-size: 13px;
	color: var(--green);
	font-weight: 600;
	display: none;
}

.form-note.show {
	display: block;
}

/* ============================================================
   VARIANT A — masthead landing (top nav, swap-in for home)
   ============================================================ */
.mast-nav {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(246, 241, 234, .88);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}

.mast-nav .inner {
	max-width: 1480px;
	margin: 0 auto;
	padding: 19px var(--pad);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.mast-nav .wm {
	font-family: var(--serif);
	font-size: 24px;
	font-weight: 600;
	color: var(--ink);
}

.mast-nav nav {
	display: flex;
	gap: 30px;
	align-items: center;
}

.mast-nav nav a {
	font-size: 12.5px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--muted);
	font-weight: 600;
	transition: color .18s;
}

.mast-nav nav a:hover,
.mast-nav nav a.active {
	color: var(--ink);
}

.mast-nav .navstatus {
	display: flex;
	align-items: center;
	gap: 8px;
	padding-left: 8px;
}

.mast-nav .navstatus .label {
	font-size: 11.5px;
	letter-spacing: .04em;
	font-weight: 600;
	color: var(--ink);
}

.mast-nav .burger {
	display: none;
	background: none;
	border: none;
	font-size: 22px;
	cursor: pointer;
	color: var(--ink);
}

.mast-wrap {
	max-width: 1480px;
	margin: 0 auto;
	padding: clamp(44px, 6vw, 88px) var(--pad);
}

.mast-hero {
	display: grid;
	grid-template-columns: 1.05fr .95fr;
	gap: clamp(40px, 6vw, 92px);
	align-items: center;
	min-height: 64vh;
}

.mast-hero .portrait {
	height: clamp(380px, 44vw, 540px);
}

.mast-hero h1 {
	margin-top: 22px;
}

.mast-hero .lead {
	margin: 24px 0 0;
	max-width: 440px;
}

@media (max-width: 900px) {

	.mast-nav nav,
	.mast-nav .navstatus {
		display: none;
	}

	.mast-nav .burger {
		display: block;
	}

	.mast-hero {
		grid-template-columns: 1fr;
		min-height: 0;
	}
}

/* ============================================================
   FOOTER (inside main)
   ============================================================ */
.site-foot {
	border-top: 1px solid var(--line);
	padding: 30px var(--pad);
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px;
	color: var(--muted);
	font-size: 12.5px;
}

.site-foot .social {
	display: flex;
	gap: 18px;
}

.site-foot a:hover {
	color: var(--rose-deep);
}

/* Kontakt is a short page — make its column fill the viewport so the
   footer is pinned to the bottom instead of floating mid-screen. */
body[data-page="kontakt"] .main {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

body[data-page="kontakt"] .site-foot {
	margin-top: auto;
}

/* ============================================================
   Reveal-on-load
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
	.reveal {
		opacity: 0;
		transform: translateY(14px);
		animation: reveal .7s cubic-bezier(.2, .7, .3, 1) forwards;
	}

	.reveal.d1 {
		animation-delay: .06s;
	}

	.reveal.d2 {
		animation-delay: .12s;
	}

	.reveal.d3 {
		animation-delay: .18s;
	}

	.reveal.d4 {
		animation-delay: .24s;
	}

	@keyframes reveal {
		to {
			opacity: 1;
			transform: none;
		}
	}
}

.drawer {
	display: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
	.work-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 900px) {
	.app {
		display: block;
	}

	.sidebar {
		display: none;
	}

	.topbar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 18px var(--pad);
		background: var(--cream-deep);
		border-bottom: 1px solid var(--line);
		position: sticky;
		top: 0;
		z-index: 100;
	}

	.topbar .name {
		font-family: var(--serif);
		font-size: 23px;
		font-weight: 600;
	}

	.topbar .burger {
		background: none;
		border: none;
		font-size: 22px;
		cursor: pointer;
		color: var(--ink);
	}

	.drawer {
		position: fixed;
		inset: 0;
		background: var(--cream);
		z-index: 150;
		display: none;
		flex-direction: column;
		padding: 26px var(--pad);
	}

	.drawer.open {
		display: flex;
	}

	.drawer .close {
		align-self: flex-end;
		background: none;
		border: none;
		font-size: 26px;
		cursor: pointer;
	}

	.drawer nav {
		display: flex;
		flex-direction: column;
		gap: 6px;
		margin-top: 30px;
	}

	.drawer nav a {
		font-family: var(--serif);
		font-size: 34px;
		color: var(--ink);
		padding: 8px 0;
		border-bottom: 1px solid var(--line-soft);
	}

	.drawer .status {
		margin-top: auto;
	}

	.home-hero {
		grid-template-columns: 1fr;
	}

	.about-hero {
		grid-template-columns: 1fr;
	}

	.about-hero .portrait {
		position: relative;
		top: 0;
		height: 360px;
	}

	.contact-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.work-grid {
		grid-template-columns: 1fr;
	}

	.feed {
		grid-template-columns: 1fr;
	}

	.skills {
		grid-template-columns: 1fr;
	}

	.lb-prev {
		left: 8px;
	}

	.lb-next {
		right: 8px;
	}
}
