/* Lukas Hulting portfolio. Matches the CV: Montserrat 300/400/600, navy accent, airy, spaced uppercase headings.
   Layout: one centred column (max ~1040px); projects as full-width cards with a text column and an image column. */
@font-face {
	font-family: 'Montserrat';
	src: url('fonts/montserrat-latin.woff2') format('woff2');
	font-weight: 300 600;
	font-style: normal;
	font-display: swap;
}
:root {
	--accent: #23395d;
	--ink: #1d2433;
	--grey: #5b6372;
	--surface: #f1f3f6;
	--line: #dde1e7;
	--bg: #ffffff;
	--accent-soft: #e6ebf3;
	--font: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
	color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0; background: var(--bg); color: var(--ink);
	font: 400 16px/1.65 var(--font);
	padding-left: max(20px, env(safe-area-inset-left, 0px));
	padding-right: max(20px, env(safe-area-inset-right, 0px));
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: 1040px; margin: 0 auto; }

/* headings like the CV: uppercase, wide tracking */
.eyebrow, h2, .label {
	font-weight: 600; text-transform: uppercase; letter-spacing: 0.22em; color: var(--accent);
}
h1, h2, h3, p { margin: 0; }
h1 { font-weight: 300; font-size: clamp(2rem, 6vw, 3.1rem); letter-spacing: 0.16em; text-transform: uppercase; line-height: 1.15; }
h1 strong { font-weight: 600; }
h2 { font-size: 0.95rem; display: flex; align-items: center; gap: 16px; }
h2::after { content: ''; flex: 1; height: 1px; background: var(--line); }
h3 { font-size: 1.3rem; font-weight: 600; line-height: 1.3; text-wrap: balance; }
.label { font-size: 0.72rem; letter-spacing: 0.18em; }
.muted { color: var(--grey); }

/* nav */
.nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 22px; flex-wrap: wrap; }
.nav .brand { font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; font-size: 0.85rem; color: var(--ink); text-decoration: none; }
.nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav ul a { color: var(--grey); text-decoration: none; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; }
.nav ul a:hover { color: var(--accent); }

/* hero */
.hero { display: grid; grid-template-columns: auto 1fr; gap: 48px; align-items: center; padding-block: 48px 72px; }
.portrait { width: 220px; height: 220px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 8px var(--surface); }
.hero .text { display: grid; gap: 18px; min-width: 0; }
.hero .role { font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--grey); font-weight: 600; }
.hero .pitch { font-size: 1.12rem; font-weight: 300; max-width: 58ch; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--grey); font-size: 0.92rem; }
.facts span { display: inline-flex; align-items: center; gap: 8px; }
.facts span::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.btn {
	display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 4px;
	font-weight: 600; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
	border: 1.5px solid var(--accent); min-height: 46px;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #1a2b47; }
.btn.secondary { color: var(--accent); background: transparent; }
.btn.secondary:hover { background: var(--accent-soft); }
.btn svg { width: 16px; height: 16px; flex: none; }

/* sections */
section { padding-block: 40px; scroll-margin-top: 16px; }
section > h2 { margin-bottom: 28px; }

/* project cards */
.projects { display: grid; gap: 28px; }
.project { background: var(--surface); border-radius: 10px; padding: clamp(22px, 4vw, 40px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 36px; }
.project .body { display: grid; gap: 14px; align-content: start; min-width: 0; }
.project .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.project p { color: var(--ink); }
.project .role { border-left: 3px solid var(--accent); padding-left: 14px; color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 4px 0 0; }
.tags li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 0.78rem; color: var(--grey); }
.media { display: grid; gap: 12px; align-content: start; min-width: 0; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gallery .wide { grid-column: 1 / -1; }
figure { margin: 0; display: grid; gap: 6px; }
figure button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 6px; overflow: hidden; display: block; width: 100%; }
figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #e4e8ee; border-radius: 6px; }
figure.wide img { aspect-ratio: 16 / 9; }
figure.contain img { object-fit: contain; background: #fff; }
figcaption { font-size: 0.78rem; color: var(--grey); }
.placeholder {
	aspect-ratio: 4 / 3; border-radius: 6px; border: 1.5px dashed #c5ccd7; display: grid; place-items: center;
	color: var(--grey); font-size: 0.85rem; text-align: center; padding: 20px; background: #f8f9fb;
}
.linkout { font-weight: 600; font-size: 0.85rem; letter-spacing: 0.08em; }

/* home server diagram (HTML, no IPs/ports) */
.diagram { display: grid; gap: 10px; font-size: 0.82rem; }
.diagram .tier { border-radius: 6px; padding: 10px 14px; text-align: center; font-weight: 600; letter-spacing: 0.04em; }
.diagram .net { background: #fff; border: 1px solid var(--line); color: var(--grey); }
.diagram .proxy { background: var(--accent); color: #fff; }
.diagram .arrow { text-align: center; color: var(--grey); line-height: 1; font-size: 1.1rem; }
.diagram .services { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.diagram .svc { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px; line-height: 1.35; }
.diagram .svc b { display: block; font-weight: 600; color: var(--ink); }
.diagram .svc span { color: var(--grey); font-size: 0.75rem; }
.diagram .svc.here { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.diagram .base { background: var(--accent-soft); color: var(--accent); }

/* leadership */
.lead { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.lead .body { display: grid; gap: 12px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: var(--surface); border-radius: 8px; padding: 18px; display: grid; gap: 2px; }
.stat b { font-size: 1.7rem; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat span { font-size: 0.82rem; color: var(--grey); }
.also { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 4px; }

/* skills */
.skills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.skills div { display: grid; gap: 8px; align-content: start; }
.skills p { color: var(--ink); font-size: 0.95rem; }

/* contact / footer */
.contact { background: var(--accent); color: #fff; border-radius: 10px; padding: clamp(26px, 5vw, 48px); display: grid; gap: 18px; }
.contact h2 { color: #fff; }
.contact h2::after { background: rgba(255, 255, 255, 0.25); }
.contact .rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.contact .rows div { display: grid; gap: 2px; min-width: 0; }
.contact .label { color: rgba(255, 255, 255, 0.7); }
.contact a { color: #fff; font-size: 1.02rem; word-break: break-word; }
.contact .btn.primary { background: #fff; color: var(--accent); border-color: #fff; justify-self: start; }
footer { padding-block: 32px 48px; color: var(--grey); font-size: 0.82rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* lightbox */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1200px, 94vw); max-height: 92vh; }
dialog.lightbox::backdrop { background: rgba(15, 20, 30, 0.88); }
dialog.lightbox img { max-height: 84vh; width: auto; margin: 0 auto; border-radius: 6px; }
dialog.lightbox p { color: #fff; text-align: center; font-size: 0.85rem; margin-top: 10px; }
dialog.lightbox form { position: fixed; top: max(14px, env(safe-area-inset-top, 0px)); right: max(14px, env(safe-area-inset-right, 0px)); }
dialog.lightbox .close { background: #fff; color: var(--ink); border: 0; border-radius: 999px; width: 44px; height: 44px; font-size: 1.4rem; cursor: pointer; }

/* responsive */
@media (max-width: 860px) {
	.project, .lead { grid-template-columns: 1fr; }
	.skills { grid-template-columns: 1fr 1fr; }
	.contact .rows { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
	.hero { grid-template-columns: 1fr; justify-items: start; gap: 28px; padding-block: 24px 48px; }
	.portrait { width: 160px; height: 160px; }
	.nav { display: none; }
	.skills { grid-template-columns: 1fr; }
	.diagram { font-size: 0.76rem; }
	.diagram .svc span { font-size: 0.7rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .nav, .actions, dialog { display: none; } }
