/* ---------- Fonts ---------- */
@font-face { font-family: "Kanit"; font-weight: 300; font-display: swap; src: url("assets/fonts/Kanit/Kanit-Light.ttf") format("truetype"); }
@font-face { font-family: "Kanit"; font-weight: 500; font-display: swap; src: url("assets/fonts/Kanit/Kanit-Medium.ttf") format("truetype"); }
@font-face { font-family: "Kanit"; font-weight: 700; font-display: swap; src: url("assets/fonts/Kanit/Kanit-Bold.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("assets/fonts/Inter/Inter_18pt-Regular.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("assets/fonts/Inter/Inter_18pt-Medium.ttf") format("truetype"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("assets/fonts/Inter/Inter_18pt-SemiBold.ttf") format("truetype"); }

/* ---------- Tokens ---------- */
:root {
    --bg: #f6f6f4;
    --bg-elev: #ffffff;
    --bg-sunk: #ecece8;
    --fg: #141414;
    --fg-muted: #5c5c5c;
    --line: rgba(20, 20, 20, .09);
    --accent: #1e90ff;
    --accent-2: #ff4500;
    --glow: rgba(30, 144, 255, .18);
    --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px -12px rgba(0, 0, 0, .12);
    --radius: 28px;
    --gutter: clamp(16px, 4vw, 48px);
    --max: 1200px;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #0c0c0d;
    --bg-elev: #161618;
    --bg-sunk: #1d1d20;
    --fg: #f2f2f0;
    --fg-muted: #9a9a9e;
    --line: rgba(255, 255, 255, .08);
    --glow: rgba(30, 144, 255, .28);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 20px 40px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0c0c0d;
        --bg-elev: #161618;
        --bg-sunk: #1d1d20;
        --fg: #f2f2f0;
        --fg-muted: #9a9a9e;
        --line: rgba(255, 255, 255, .08);
        --glow: rgba(30, 144, 255, .28);
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 20px 40px -16px rgba(0, 0, 0, .6);
        color-scheme: dark;
    }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--fg);
    font: 400 16px/1.6 "Inter", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background-color .4s ease, color .4s ease;
}

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

[hidden] { display: none !important; }

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

h1, h2, h3 { font-family: "Kanit", sans-serif; font-weight: 500; line-height: 1.05; margin: 0; letter-spacing: -.02em; }

::selection { background: var(--accent); color: #fff; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Ambient background blobs */
.ambient {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.ambient::before, .ambient::after {
    content: "";
    position: absolute;
    width: 60vmax;
    height: 60vmax;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .5;
    animation: drift 24s ease-in-out infinite alternate;
}

.ambient::before { background: radial-gradient(circle, var(--glow), transparent 65%); top: -25vmax; left: -15vmax; }
.ambient::after { background: radial-gradient(circle, rgba(255, 69, 0, .12), transparent 65%); bottom: -30vmax; right: -20vmax; animation-delay: -12s; }

@keyframes drift {
    to { transform: translate(8vmax, 6vmax) scale(1.1); }
}

/* ---------- Header ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 16px 0;
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    background: color-mix(in srgb, var(--bg) 70%, transparent);
    border-bottom: 1px solid transparent;
    transition: border-color .3s ease;
}

.header.is-scrolled { border-bottom-color: var(--line); }

.header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: flex; align-items: center; gap: 12px; font: 500 20px "Kanit", sans-serif; }

.brand img { width: 36px; height: 36px; border-radius: 10px; }

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

.nav a, .icon-btn {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--fg-muted);
    transition: color .2s ease, background-color .2s ease;
}

.nav a:hover, .icon-btn:hover { color: var(--fg); background: var(--bg-sunk); }

.icon-btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.icon-btn svg { width: 20px; height: 20px; }

.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

@media (max-width: 560px) {
    .nav .nav-link { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(64px, 14vh, 160px) clamp(48px, 10vh, 120px); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg-elev);
    font-size: 13px;
    font-weight: 500;
    color: var(--fg-muted);
}

.eyebrow .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3fa844;
    box-shadow: 0 0 0 4px rgba(63, 168, 68, .18);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    50% { box-shadow: 0 0 0 8px rgba(63, 168, 68, 0); }
}

.hero h1 {
    margin-top: 28px;
    font-size: clamp(48px, 10vw, 128px);
    font-weight: 500;
}

.hero h1 .muted { color: var(--fg-muted); font-weight: 300; }

.gradient-text {
    background: linear-gradient(100deg, var(--accent), #8a5cff 50%, var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    max-width: 560px;
    margin: 28px 0 0;
    font-size: clamp(17px, 1.6vw, 20px);
    color: var(--fg-muted);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border-radius: 999px;
    font-weight: 500;
    font-size: 15px;
    border: 1px solid var(--line);
    background: var(--bg-elev);
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.btn svg { width: 18px; height: 18px; }

.btn-primary { background: var(--fg); color: var(--bg); border-color: transparent; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(48px, 10vh, 112px); }

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 40px;
}

.section-head h2 { font-size: clamp(32px, 5vw, 56px); }

.section-head span { color: var(--fg-muted); font-size: 14px; }

/* ---------- Project grid ---------- */
.projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.project-card {
    --mx: 50%;
    --my: 50%;
    position: relative;
    display: flex;
    flex-direction: column;
    aspect-ratio: 1 / 1;
    padding: 24px;
    border-radius: var(--radius);
    background: var(--bg-elev);
    border: 1px solid var(--line);
    overflow: hidden;
    isolation: isolate;
    transition: transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .4s ease, border-color .4s ease;
}

.project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(420px circle at var(--mx) var(--my), var(--card-glow, var(--glow)), transparent 60%);
    opacity: 0;
    transition: opacity .4s ease;
}

.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.project-card:hover::before { opacity: 1; }

.project-card .logo {
    flex: 1;
    display: grid;
    place-items: center;
}

.project-card .logo img,
.project-card .logo .monogram {
    width: 45%;
    aspect-ratio: 1;
    object-fit: contain;
    transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}

.project-card:hover .logo img,
.project-card:hover .logo .monogram { transform: scale(1.08); }

.monogram {
    display: grid;
    place-items: center;
    border-radius: 24%;
    background: linear-gradient(135deg, var(--c1, var(--accent)), var(--c2, #8a5cff));
    color: #fff;
    font: 600 clamp(28px, 4vw, 44px) "Kanit", sans-serif;
    box-shadow: 0 16px 40px -12px var(--c1, var(--accent));
}

.project-card .meta { display: flex; align-items: end; justify-content: space-between; gap: 12px; }

.project-card h3 { font-size: 22px; }

.project-card .tag { font-size: 13px; color: var(--fg-muted); margin-top: 4px; }

.arrow {
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-sunk);
    transition: background-color .3s ease, color .3s ease, transform .3s ease;
}

.arrow svg { width: 16px; height: 16px; }

.project-card:hover .arrow { background: var(--fg); color: var(--bg); transform: rotate(-45deg); }

.project-card.is-soon { pointer-events: none; }
.project-card.is-soon .logo { opacity: .35; filter: grayscale(1); }

/* ---------- About ---------- */
.about {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat {
    padding: 28px;
    border-radius: var(--radius);
    background: var(--bg-elev);
    border: 1px solid var(--line);
}

.stat strong { display: block; font: 500 clamp(28px, 3.5vw, 40px)/1.1 "Kanit", sans-serif; }

.stat span { color: var(--fg-muted); font-size: 14px; }

.about-text {
    grid-column: 1 / -1;
    margin: 20px 0 0;
    max-width: 760px;
    font-size: clamp(17px, 1.6vw, 20px);
    color: var(--fg-muted);
}

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

/* ---------- Contact / footer ---------- */
.contact {
    padding: clamp(40px, 8vw, 80px);
    border-radius: calc(var(--radius) + 8px);
    background: var(--fg);
    color: var(--bg);
    text-align: center;
    overflow: hidden;
    position: relative;
}

.contact h2 { font-size: clamp(36px, 6vw, 72px); }

.contact p { color: color-mix(in srgb, var(--bg) 65%, transparent); margin: 16px 0 32px; }

.contact .btn { background: var(--bg); color: var(--fg); }

.socials { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }

.socials a {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--bg) 20%, transparent);
    transition: background-color .2s ease, color .2s ease;
}

.socials a:hover { background: var(--bg); color: var(--fg); }

.socials svg { width: 20px; height: 20px; }

.footer {
    padding: 40px 0;
    color: var(--fg-muted);
    font-size: 13px;
}

.footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

.footer a:hover { color: var(--fg); }

/* ---------- Project page ---------- */
.back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    font-size: 14px;
    color: var(--fg-muted);
    transition: color .2s ease, gap .2s ease;
}

.back:hover { color: var(--fg); gap: 12px; }

.back svg { width: 16px; height: 16px; }

.project-hero {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: clamp(24px, 5vw, 64px);
    padding: clamp(48px, 10vh, 112px) 0 clamp(32px, 6vh, 64px);
}

.project-hero .logo-xl {
    width: clamp(120px, 20vw, 220px);
    aspect-ratio: 1;
}

.project-hero .logo-xl img,
.project-hero .logo-xl .monogram {
    width: 100%;
    height: 100%;
    object-fit: contain;
    font-size: clamp(48px, 8vw, 96px);
}

.project-hero h1 { font-size: clamp(44px, 8vw, 104px); }

.project-hero p { margin: 16px 0 0; max-width: 600px; font-size: clamp(17px, 1.6vw, 20px); color: var(--fg-muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

.chip {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg-elev);
    font-size: 13px;
    font-weight: 500;
}

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

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.gallery figure {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-sunk);
    border: 1px solid var(--line);
    cursor: zoom-in;
}

.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}

.gallery figure:hover img { transform: scale(1.04); }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(0, 0, 0, .85);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    cursor: zoom-out;
}

.lightbox.is-open { opacity: 1; pointer-events: auto; }

.lightbox img { max-height: 90vh; border-radius: 16px; }

.links { display: flex; flex-wrap: wrap; gap: 12px; }

/* Plain text pages (privacy policy etc.) */
.prose { max-width: 720px; padding-block: clamp(48px, 10vh, 96px); }

.prose h1 { font-size: clamp(36px, 6vw, 64px); margin-bottom: 32px; }

.prose h2 { font-size: 24px; margin: 40px 0 8px; }

.prose p { color: var(--fg-muted); margin: 0; }

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

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
}

.policy {
    padding: clamp(24px, 4vw, 40px);
    max-width: none;
    border-radius: var(--radius);
    background: var(--bg-elev);
    border: 1px solid var(--line);
}

.policy h3 { font-size: 20px; margin: 28px 0 6px; }

.section-head .back { margin-top: 0; }

.platforms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.app-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: var(--radius);
    background: var(--bg-elev);
    border: 1px solid var(--line);
    transition: transform .3s ease, box-shadow .3s ease;
}

a.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

a.app-card:hover .arrow { background: var(--fg); color: var(--bg); }

.app-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: var(--bg-sunk);
}

.app-icon svg { width: 26px; height: 26px; }

.app-text { flex: 1; display: flex; flex-direction: column; }

.app-text strong { font: 500 20px/1.2 "Kanit", sans-serif; }

.app-text span { color: var(--fg-muted); font-size: 14px; }

/* ---------- Badges ---------- */
:root { --badge-personal: #e8a317; --badge-solo: #1e90ff; }

.badges {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.badge {
    --c: var(--badge-personal);
    display: flex;
    align-items: center;
    height: 32px;
    padding: 0 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--c) 14%, var(--bg-elev));
    color: var(--c);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}


.badge svg { flex: none; width: 18px; height: 18px; }

.badge span {
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-width .4s cubic-bezier(.2, .8, .2, 1), opacity .3s ease, margin .4s ease;
}

.project-card:hover .badge span { max-width: 140px; opacity: 1; margin: 0 4px 0 6px; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; }

.badge-legend {
    --c: var(--badge-personal);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--fg-muted);
}

.badge-legend svg { width: 16px; height: 16px; color: var(--c); }

.chip-badge {
    --c: var(--badge-personal);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--c);
    border-color: color-mix(in srgb, var(--c) 35%, transparent);
    background: color-mix(in srgb, var(--c) 10%, var(--bg-elev));
}

.chip-badge svg { width: 14px; height: 14px; }

@media (max-width: 720px) {
    .section-head { flex-direction: column; align-items: flex-start; }
}

.project-card .date {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--fg-muted);
    opacity: .75;
    font-variant-numeric: tabular-nums;
}

.badge.badge-solo, .badge-legend.badge-solo, .chip-badge.chip-solo { --c: var(--badge-solo); }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
    :root { --gutter: 15px; --radius: 22px; }

    .header { padding: 10px 0; }

    .hero { padding-block: 48px 40px; }
    .hero h1 { margin-top: 20px; }
    .hero p { margin-top: 20px; }
    .hero-actions { margin-top: 28px; }

    .section { padding-block: 36px; }
    .section-head { margin-bottom: 20px; gap: 12px; }

    .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .project-card { padding: 14px; }
    .project-card .logo img,
    .project-card .logo .monogram { width: 58%; font-size: 26px; }
    .project-card h3 { font-size: 17px; overflow-wrap: anywhere; }
    .project-card .tag { font-size: 12px; margin-top: 0; line-height: 1.35; }
    .project-card .arrow { display: none; }
    .badges { top: 10px; right: 10px; }
    .badge { height: 26px; padding: 0 5px; }
    .badge svg { width: 15px; height: 15px; }

    .about { gap: 12px; }
    .stat { padding: 20px; }

    .contact { padding: 40px 20px; }

    .back { margin-top: 20px; }
    .project-hero { gap: 20px; padding: 28px 0 8px; }
    .project-hero .logo-xl { width: 96px; }
    .project-hero h1 { overflow-wrap: anywhere; }
    .chips { margin-top: 18px; }

    .platforms, .gallery { gap: 12px; }
    .app-card { padding: 14px; gap: 14px; }
    .app-icon { width: 48px; height: 48px; border-radius: 14px; }

    .policy { padding: 20px; }
    .prose { padding-block: 32px; }

    .footer { padding: 24px 0 32px; }
}

/* Real logos: rounded app-icon tiles */
.project-card .logo img,
.project-hero .logo-xl img {
    border-radius: 22%;
    box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .35);
}

@media (max-width: 640px) {
    .gallery {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        margin-inline: calc(var(--gutter) * -1);
        padding-inline: var(--gutter);
        scroll-padding-inline: var(--gutter);
        scrollbar-width: none;
    }

    .gallery::-webkit-scrollbar { display: none; }

    .gallery figure { flex: 0 0 62%; scroll-snap-align: start; }
}

.prose a, .policy a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose small, .policy small { font-size: 13px; opacity: .8; }

/* Per-project hover accent (set inline from each logo's colors) */
.project-card::before {
    background:
        radial-gradient(420px circle at var(--mx) var(--my), var(--card-glow, var(--glow)), transparent 60%),
        radial-gradient(360px circle at 100% 100%, var(--card-glow-2, transparent), transparent 70%);
}

.project-card:hover { border-color: color-mix(in srgb, var(--card-accent, var(--accent)) 35%, transparent); }

.project-card:hover .arrow { background: var(--card-accent, var(--fg)); color: #fff; }


/* Gallery: fixed 200px tall strip, scrolls horizontally */
.gallery {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    padding-bottom: 4px;
}

.gallery figure {
    flex: none;
    height: 200px;
    border-radius: 16px;
    scroll-snap-align: start;
}

.gallery img { width: auto; height: 200px; max-height: 200px; }

/* Project page: tighter rhythm between stacked sections, cards keep natural width */
main.container > .section + .section { padding-top: 0; }
main.container > .section:has(+ .section) { padding-bottom: clamp(32px, 6vh, 64px); }

.platforms { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.stack {
    display: grid;
    gap: 16px;
    padding: clamp(20px, 3vw, 28px);
    border-radius: var(--radius);
    background: var(--bg-elev);
    border: 1px solid var(--line);
}

.stack-row { display: grid; grid-template-columns: 140px 1fr; align-items: center; gap: 12px; }

.stack-row .chips { margin-top: 0; }

.stack-label { font-size: 13px; font-weight: 600; color: var(--fg-muted); text-transform: uppercase; letter-spacing: .06em; }

@media (max-width: 640px) {
    .stack-row { grid-template-columns: 1fr; gap: 8px; }
}

.project-card .date { min-height: 1.6em; }

/* Logo area fixed so logos line up regardless of text length */
.project-card .logo { flex: none; height: 58%; }
.project-card .meta { margin-top: auto; }

@media (max-width: 640px) {
    .project-card .logo { height: 54%; }
    .project-card h3 { line-height: 1.1; }
}

@media (max-width: 640px) {
    .project-card { aspect-ratio: auto; }
    .project-card .logo { height: 96px; margin-bottom: 12px; }
    .project-card .logo img,
    .project-card .logo .monogram { width: auto; height: 76px; }
}

.project-card .logo .monogram-long { font-size: clamp(18px, 2.4vw, 30px); letter-spacing: -.02em; }
.project-hero .logo-xl .monogram-long { font-size: clamp(32px, 5vw, 60px); }
@media (max-width: 640px) { .project-card .logo .monogram-long { font-size: 20px; } }

.email-btn.is-copied { background: #3fa844; color: #fff; }
.contact .email-hint { margin: 10px 0 0; font-size: 13px; }

/* Ambient background: project pages pass --amb-1 / --amb-2 (logo colors) inline */
:root { --amb-strength: 22%; --amb-strength-2: 16%; }
:root[data-theme="dark"] { --amb-strength: 30%; --amb-strength-2: 22%; }

.ambient[style]::before { background: radial-gradient(circle, color-mix(in srgb, var(--amb-1) var(--amb-strength), transparent), transparent 65%); }
.ambient[style]::after { background: radial-gradient(circle, color-mix(in srgb, var(--amb-2) var(--amb-strength-2), transparent), transparent 65%); }

:root { --amb-strength: 42%; --amb-strength-2: 30%; }
:root[data-theme="dark"] { --amb-strength: 40%; --amb-strength-2: 32%; }
.ambient[style]::before { top: -18vmax; left: -12vmax; }
.ambient[style]::after { bottom: -22vmax; right: -14vmax; }
