/* mattiaslindberg.com — "Sky editorial" layer on top of the Fancy theme */

:root[data-theme] {
    --ml-bg: #F6F9FC;
    --ml-white: #FFFFFF;
    --ml-ice: #EAF2FB;
    --ml-sky: #8DB8EA;
    --ml-sky-soft: #BFD7F2;
    --ml-blue: #3A7BD5;
    --ml-navy: #0C1B2E;
    --ml-navy-2: #16294A;
    --ml-text: #0C1B2E;
    --ml-muted: #4D5F75;
    --ml-line: #E1EAF4;
    --ml-serif: "Instrument Serif", Georgia, serif;
    --ml-sans: "Inter Tight", ui-sans-serif, system-ui, sans-serif;

    --primary: var(--ml-bg);
    --secondary: var(--ml-ice);
    --tertiary: var(--ml-sky-soft);
    --heading: var(--ml-navy);
    --text: var(--ml-text);
    --meta: var(--ml-muted);
    --submenu: var(--ml-navy);
    --submenu-text: var(--ml-bg);
    --border: var(--ml-line);
    --overlay: var(--ml-navy);
    --shadow: var(--ml-navy);
    --font-body: var(--ml-sans);
    --font-heading: var(--ml-serif);
    --font-weight-weight-heading: 400;
}

body { background: var(--ml-bg); }
h1, h2, h3, .font-heading { letter-spacing: -0.01em; }

/* ---------- Navbar over the home hero ---------- */
.home-template .navbar {
    position: absolute;
    top: 0; left: 0; right: 0;
    background: transparent;
    color: var(--ml-bg);
    --heading: var(--ml-bg);
    --text: var(--ml-bg);
}
.home-template .navbar a,
.home-template .navbar button { color: var(--ml-bg); }
.home-template .navbar strong,
.home-template .navbar [class*="logo"] { color: var(--ml-bg) !important; }
.home-template .navbar .var-secondary {
    background: rgba(246,249,252,.14) !important; color: var(--ml-bg) !important;
    border-color: transparent !important;
}
.home-template .navbar .var-secondary svg { color: var(--ml-bg); stroke: currentColor; }

/* ---------- Shared ---------- */
.ml { font-family: var(--ml-sans); color: var(--ml-text); }
.ml *, .ml *::before, .ml *::after { box-sizing: border-box; }
.ml img { display: block; max-width: 100%; height: auto; }
.ml-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.ml-sec { padding: 112px 0; }
.ml-sec--white { background: var(--ml-white); }
.ml-sec--ice { background: var(--ml-ice); }
.ml-sec--navy { background: var(--ml-navy); color: var(--ml-bg); }
.ml-kicker {
    display: flex; align-items: center; gap: 12px;
    font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
    color: var(--ml-blue); margin: 0 0 18px;
}
.ml-kicker span { color: var(--ml-muted); font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.ml-sec--navy .ml-kicker { color: var(--ml-sky); }
.ml-sec--navy .ml-kicker span { color: #8597AD; }
.ml-h {
    font-family: var(--ml-serif); font-weight: 400;
    font-size: clamp(40px, 5.4vw, 72px); line-height: 1; letter-spacing: -0.015em;
    margin: 0 0 24px; color: inherit;
}
.ml-h i, .ml-hero h1 i { font-style: italic; color: var(--ml-blue); }
.ml-sec--navy .ml-h i { color: var(--ml-sky); }
.ml-lead { font-size: 19px; line-height: 1.6; color: var(--ml-muted); max-width: 40em; margin: 0; }
.ml-sec--navy .ml-lead { color: #C5D8EE; }
.ml-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.ml-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 24px; border-radius: 999px;
    font-size: 15px; font-weight: 500; text-decoration: none; line-height: 1;
    transition: transform .2s ease, background .2s ease, color .2s ease;
}
.ml-btn:hover { transform: translateY(-2px); }
.ml-btn--sky { background: var(--ml-sky); color: var(--ml-navy); }
.ml-btn--sky:hover { background: var(--ml-sky-soft); }
.ml-btn--navy { background: var(--ml-navy); color: var(--ml-bg); }
.ml-btn--navy:hover { background: var(--ml-navy-2); }
.ml-btn--ghost { border: 1px solid currentColor; color: inherit; background: transparent; }
.ml-link { color: var(--ml-blue); text-decoration: none; font-weight: 500; }
.ml-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* reveal on scroll */
.ml-reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.ml-reveal.is-in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.ml-hero {
    position: relative; min-height: min(92vh, 860px);
    display: flex; align-items: flex-end;
    background: var(--ml-navy); color: var(--ml-bg); overflow: hidden;
}
.ml-hero__media {
    position: absolute; top: 0; bottom: 0; right: 0; width: 72%;
    background: var(--ml-sky); overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
            mask-image: linear-gradient(90deg, transparent 0%, #000 30%);
}
.ml .ml-hero__img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: 50% 22%;
    filter: grayscale(1) contrast(1.15) brightness(.92);
    mix-blend-mode: multiply;
    animation: ml-zoom 18s ease-out both;
}
.ml-hero::after {
    content: ""; position: absolute; inset: 0;
    background:
        linear-gradient(90deg, rgba(12,27,46,.9) 0%, rgba(12,27,46,.45) 40%, rgba(12,27,46,0) 64%),
        linear-gradient(0deg, rgba(12,27,46,.6) 0%, rgba(12,27,46,0) 30%);
}
.ml-hero .ml-wrap { position: relative; z-index: 2; padding-bottom: 96px; padding-top: 160px; }
.ml-hero h1 {
    font-family: var(--ml-serif); font-weight: 400;
    font-size: clamp(56px, 8.4vw, 120px); line-height: .92; letter-spacing: -0.02em;
    margin: 0; max-width: 8.5em; color: var(--ml-bg);
}
.ml-hero h1 i { color: var(--ml-sky); }
.ml-hero p { font-size: 19px; line-height: 1.55; color: #D6E6F8; max-width: 31em; margin: 28px 0 0; }
.ml-hero .ml-btn--ghost { color: var(--ml-bg); border-color: rgba(141,184,234,.7); }
.ml-hero__scroll {
    position: absolute; right: 32px; bottom: 32px; z-index: 2;
    font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #9FB7D3;
    writing-mode: vertical-rl;
}
@keyframes ml-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }

/* ---------- Ticker ---------- */
.ml-ticker { background: var(--ml-sky-soft); color: var(--ml-navy); overflow: hidden; white-space: nowrap; border-bottom: 1px solid #A9C8EC; }
.ml-ticker__track { display: inline-flex; animation: ml-marquee 38s linear infinite; }
.ml-ticker span { padding: 16px 0; font-size: 13px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.ml-ticker span::after { content: "✳"; margin: 0 28px; color: var(--ml-blue); }
@keyframes ml-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Story ---------- */
.ml-story { display: grid; grid-template-columns: 5fr 6fr; gap: 80px; align-items: center; }
.ml-duo { position: relative; border-radius: 6px; overflow: hidden; background: var(--ml-sky); aspect-ratio: 4 / 5; }
.ml .ml-duo img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 30%; filter: grayscale(1) contrast(1.15) brightness(.95); mix-blend-mode: multiply; }
.ml-duo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,27,46,0) 55%, rgba(12,27,46,.35)); }
.ml-story .ml-lead { color: var(--ml-text); }
.ml-story .ml-lead + .ml-lead { margin-top: 18px; color: var(--ml-muted); }
.ml-stats { display: flex; gap: 48px; margin: 40px 0 32px; padding-top: 32px; border-top: 1px solid var(--ml-line); }
.ml-stats b { display: block; font-family: var(--ml-serif); font-weight: 400; font-size: 52px; line-height: 1; color: var(--ml-navy); }
.ml-stats small { display: block; margin-top: 8px; font-size: 13px; color: var(--ml-muted); }

/* ---------- Inputs ---------- */
.ml-inputs-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 56px; }
.ml-inputs-head .ml-lead { max-width: 28em; }
.ml-inputs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ml-input {
    position: relative; min-height: 260px; padding: 28px; border-radius: 6px;
    background: var(--ml-white); border: 1px solid var(--ml-line);
    display: flex; flex-direction: column; justify-content: flex-end;
    text-decoration: none; color: var(--ml-text); overflow: hidden;
    transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .3s ease;
}
.ml-input:hover { transform: translateY(-4px); border-color: var(--ml-sky); }
.ml-input__n { position: absolute; top: 24px; left: 28px; font-size: 12px; letter-spacing: .12em; color: var(--ml-muted); }
.ml-input h3 { font-family: var(--ml-serif); font-weight: 400; font-size: 34px; line-height: 1.05; margin: 0 0 10px; color: inherit; }
.ml-input p { font-size: 15px; line-height: 1.5; margin: 0; color: var(--ml-muted); }
.ml-input__go { margin-top: 14px; font-size: 14px; font-weight: 500; color: var(--ml-blue); }
.ml-input--photo { color: var(--ml-bg); border: 0; background: var(--ml-navy); }
.ml-input--photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.ml-input--photo::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(12,27,46,.88) 0%, rgba(12,27,46,.1) 70%); }
.ml-input--photo:hover img { transform: scale(1.05); }
.ml-input--photo > *:not(img) { position: relative; z-index: 2; }
.ml-input--photo .ml-input__n { position: absolute; color: #C5D8EE; }
.ml-input--photo p { color: #D6E6F8; }
.ml-input--photo .ml-input__go { color: var(--ml-sky); }
.ml-input--blue { background: var(--ml-sky-soft); border-color: var(--ml-sky-soft); }
.ml-input--blue p { color: #2B4466; }

/* ---------- ROHEMM ---------- */
.ml-rohemm { display: grid; grid-template-columns: 6fr 5fr; gap: 80px; align-items: center; }
.ml-rohemm__brand { font-family: var(--ml-serif); font-size: clamp(64px, 9vw, 128px); line-height: .9; letter-spacing: .01em; margin: 0 0 16px; color: var(--ml-bg); font-weight: 400; }
.ml-rohemm__tag { font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--ml-sky); margin: 0 0 28px; }
.ml-rohemm__card { position: relative; transform: rotate(2.5deg); transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.ml-rohemm__card:hover { transform: rotate(0deg) scale(1.02); }
.ml-rohemm__card img { border-radius: 6px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.ml-rohemm__price {
    position: absolute; left: -28px; bottom: 36px; background: var(--ml-bg); color: var(--ml-navy);
    padding: 18px 22px; border-radius: 6px; transform: rotate(-2.5deg);
}
.ml-rohemm__price b { display: block; font-family: var(--ml-serif); font-weight: 400; font-size: 38px; line-height: 1; }
.ml-rohemm__price small { font-size: 13px; color: var(--ml-muted); }
.ml-rohemm .ml-btn--ghost { color: var(--ml-bg); border-color: rgba(141,184,234,.6); }
.ml-rohemm__note { margin-top: 20px; font-size: 13px; color: #8597AD; }

/* ---------- Channels ---------- */
.ml-channels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 56px; }
.ml-channel {
    display: flex; flex-direction: column; justify-content: space-between; min-height: 200px;
    padding: 28px; border-radius: 6px; background: var(--ml-white); border: 1px solid var(--ml-line);
    text-decoration: none; color: var(--ml-text); transition: background .3s ease, color .3s ease, transform .3s ease;
}
.ml-channel:hover { background: var(--ml-navy); color: var(--ml-bg); transform: translateY(-4px); }
.ml-channel h3 { font-family: var(--ml-serif); font-weight: 400; font-size: 36px; margin: 0; color: inherit; }
.ml-channel p { font-size: 15px; line-height: 1.5; margin: 8px 0 0; opacity: .75; }
.ml-channel span { font-size: 14px; font-weight: 500; color: var(--ml-blue); }
.ml-channel:hover span { color: var(--ml-sky); }

/* ---------- Writing ---------- */
.ml-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 56px; }
.ml-post { text-decoration: none; color: var(--ml-text); display: block; }
.ml-post__img { aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: var(--ml-sky-soft); margin-bottom: 20px; }
.ml-post__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.2,.7,.2,1); }
.ml-post:hover .ml-post__img img { transform: scale(1.04); }
.ml-post__meta { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ml-blue); margin: 0 0 10px; }
.ml-post h3 { font-family: var(--ml-serif); font-weight: 400; font-size: 30px; line-height: 1.1; margin: 0; color: inherit; }
.ml-post:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.ml-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }

/* ---------- Gallery ---------- */
.ml-gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: 12px; margin-top: 56px; }
.ml-gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: 6px; background: var(--ml-navy); }
.ml-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1), filter .6s ease; filter: saturate(.85); }
.ml-gallery figure:hover img { transform: scale(1.05); filter: saturate(1); }
.ml-gallery figcaption {
    position: absolute; left: 14px; bottom: 12px; font-size: 12px; letter-spacing: .08em; color: #fff;
    opacity: 0; transform: translateY(6px); transition: all .4s ease; text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
.ml-gallery figure:hover figcaption { opacity: 1; transform: none; }
.ml-g-wide { grid-column: span 2; }
.ml-g-tall { grid-row: span 2; }

/* ---------- Work ---------- */
.ml-work { display: flex; justify-content: space-between; align-items: center; gap: 40px; padding: 56px 0; border-top: 1px solid var(--ml-line); border-bottom: 1px solid var(--ml-line); }
.ml-work h2 { font-family: var(--ml-serif); font-weight: 400; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.1; margin: 0; max-width: 20em; color: var(--ml-navy); }
.ml-work h2 i { color: var(--ml-blue); }
.ml-work .ml-btns { margin: 0; flex: none; }

/* ---------- Say hi ---------- */
.ml-hi { background: var(--ml-sky-soft); text-align: center; }
.ml-hi .ml-h { margin-left: auto; margin-right: auto; }
.ml-hi .ml-lead { margin: 0 auto; color: #2B4466; }
.ml-hi .ml-btns { justify-content: center; }

/* ---------- Footer cross-links (all pages) ---------- */
.ml-also { font-size: 14px; color: var(--ml-muted); }
.ml-also a { color: var(--ml-blue); text-decoration: none; }
.ml-also a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .ml-sec { padding: 80px 0; }
    .ml-story, .ml-rohemm { grid-template-columns: 1fr; gap: 48px; }
    .ml-duo { aspect-ratio: 4 / 3; }
    .ml-inputs, .ml-channels, .ml-posts { grid-template-columns: 1fr 1fr; }
    .ml-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
    .ml-inputs-head, .ml-head-row, .ml-work { flex-direction: column; align-items: flex-start; }
    .ml-rohemm__card { max-width: 420px; margin-left: 28px; }
}
@media (max-width: 640px) {
    .ml-wrap { padding: 0 20px; }
    .ml-sec { padding: 64px 0; }
    .ml-hero { min-height: 100svh; }
    .ml-hero__media { width: 100%; -webkit-mask-image: none; mask-image: none; }
    .ml .ml-hero__img { object-position: 55% 15%; }
    .ml-hero::after { background: linear-gradient(0deg, rgba(12,27,46,.95) 0%, rgba(12,27,46,.75) 42%, rgba(12,27,46,.1) 72%); }
    .ml-hero .ml-wrap { padding-bottom: 56px; }
    .ml-hero p { font-size: 17px; }
    .ml-hero__scroll { display: none; }
    .ml-lead { font-size: 17px; }
    .ml-inputs, .ml-channels, .ml-posts { grid-template-columns: 1fr; }
    .ml-input { min-height: 200px; }
    .ml-stats { gap: 28px; }
    .ml-stats b { font-size: 40px; }
    .ml-gallery { grid-auto-rows: 150px; }
    .ml-g-tall { grid-row: span 1; }
    .ml-btn { padding: 13px 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .ml-hero__img, .ml-ticker__track { animation: none; }
    .ml-reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- About: "How I got here" timeline (HTML card in page content) ---------- */
.ml-tl.ml-tl { margin: 3.5em 0; font-family: var(--ml-sans); }
.ml-tl .ml-tl__kicker {
    margin: 0 0 1.5em; font-size: 12px; font-weight: 500; letter-spacing: .16em;
    text-transform: uppercase; color: var(--ml-blue);
}
.ml-tl .ml-tl__list { list-style: none; margin: 0; padding: 0 0 0 32px; position: relative; }
.ml-tl .ml-tl__list::before {
    content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 1px; background: var(--ml-sky);
}
.ml-tl .ml-tl__item { position: relative; margin: 0 0 3em; padding: 0; }
.ml-tl .ml-tl__item:last-child { margin-bottom: 0; }
.ml-tl .ml-tl__item::before {
    content: ""; position: absolute; left: -31px; top: 14px; width: 13px; height: 13px; border-radius: 50%;
    background: var(--ml-bg); border: 2px solid var(--ml-blue);
}
.ml-tl .ml-tl__year {
    display: block; margin: 0 0 .4em; font-family: var(--ml-serif); font-size: 40px; line-height: 1.1;
    color: var(--ml-navy); letter-spacing: -0.01em;
}
.ml-tl .ml-tl__img {
    margin: 0 0 1em; border-radius: 6px; overflow: hidden; background: var(--ml-sky); max-width: 100%;
}
.ml-tl .ml-tl__img--portrait { max-width: 340px; }
.ml-tl .ml-tl__img img {
    display: block; width: 100%; height: auto; margin: 0;
    filter: grayscale(1) contrast(1.1); mix-blend-mode: multiply;
    transition: filter .6s ease;
}
.ml-tl .ml-tl__img:hover img { filter: none; mix-blend-mode: normal; }
.ml-tl .ml-tl__text { margin: 0; font-size: 18px; line-height: 1.6; color: var(--ml-text); }
.ml-tl .ml-tl__text a { color: var(--ml-blue); }
@media (max-width: 640px) {
    .ml-tl .ml-tl__year { font-size: 32px; }
    .ml-tl .ml-tl__img--portrait { max-width: 100%; }
    .ml-tl .ml-tl__text { font-size: 17px; }
}
