:root {
    color-scheme: dark;
    --page-bg: #06101d;
    --page-bg-deep: #040b14;
    --surface: #0d1c2e;
    --surface-raised: #11243a;
    --surface-hover: #142a43;
    --border: rgba(148, 180, 211, 0.18);
    --border-accent: rgba(76, 175, 255, 0.3);
    --text: #f3f8fc;
    --text-secondary: #9db0c5;
    --accent: #59b9f5;
    --accent-soft: rgba(89, 185, 245, 0.12);
    --online: #4fd18b;
    --shadow-card: 0 14px 34px rgba(0, 0, 0, 0.2);
    --shadow-hero: 0 26px 66px rgba(0, 0, 0, 0.3);
    --radius-large: 28px;
    --radius-card: 18px;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--page-bg); }

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgba(40, 121, 181, 0.16), transparent 34rem),
        radial-gradient(circle at 90% 20%, rgba(40, 95, 155, 0.12), transparent 30rem),
        linear-gradient(180deg, var(--page-bg) 0%, var(--page-bg-deep) 100%);
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    content: "";
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

a { color: inherit; }

.app-shell { width: min(100% - 64px, 1180px); margin: 0 auto; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid var(--border-accent);
    border-radius: 14px;
    font-size: 1.2rem;
    font-weight: 850;
    color: var(--accent);
    background: var(--accent-soft);
    box-shadow: inset 0 0 20px rgba(89,185,245,.08);
}
.brand strong { display: block; margin-top: 3px; font-size: 1.15rem; letter-spacing: .01em; }
.eyebrow { margin: 0; font-size: .68rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; color: var(--accent); }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border: 1px solid var(--border); border-radius: 999px; font-size: .74rem; font-weight: 700; color: var(--text-secondary); background: rgba(255,255,255,.025); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--online); box-shadow: 0 0 10px rgba(79,209,139,.65); }

main { padding: 44px 0 64px; }
.hero {
    position: relative;
    display: grid;
    min-height: 370px;
    grid-template-columns: minmax(0, 1fr) minmax(260px, .45fr);
    align-items: center;
    gap: 48px;
    overflow: hidden;
    padding: clamp(38px, 6vw, 72px);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-large);
    background:
        radial-gradient(circle at 82% 50%, rgba(89,185,245,.18), transparent 17rem),
        linear-gradient(145deg, #142d47, var(--surface));
    box-shadow: var(--shadow-hero);
}
.hero::after { position: absolute; inset: auto -8% -60% 36%; height: 300px; content: ""; border-radius: 50%; background: rgba(89,185,245,.055); filter: blur(25px); }
.hero-copy { position: relative; z-index: 1; }
.matri-wordmark {
    display: flex;
    align-items: center;
    max-width: 760px;
    margin: 20px 0 0;
    font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
    font-size: clamp(3.7rem, 9vw, 7.7rem);
    font-weight: 300;
    line-height: .82;
    letter-spacing: .08em;
    color: #f5f9fd;
    text-transform: uppercase;
    text-shadow: 0 0 32px rgba(89,185,245,.08);
}
.matri-wordmark > span { display: inline-block; }
.matri-wordmark__a {
    position: relative;
    width: .67em;
    overflow: hidden;
    color: transparent;
}
.matri-wordmark__a::before,
.matri-wordmark__a::after {
    position: absolute;
    top: 0;
    bottom: 0;
    content: "";
    background: #f5f9fd;
}
.matri-wordmark__a::before {
    left: .03em;
    width: .17em;
    transform: skew(-18deg);
    transform-origin: bottom;
}
.matri-wordmark__a::after {
    right: .03em;
    width: .17em;
    transform: skew(18deg);
    transform-origin: bottom;
}
.hero-mark { position: relative; z-index: 1; display: grid; width: clamp(180px, 24vw, 260px); aspect-ratio: 1; place-items: center; justify-self: end; border: 1px solid rgba(89,185,245,.25); border-radius: 50%; font-size: clamp(6rem, 14vw, 10rem); font-weight: 900; color: rgba(212,240,255,.92); background: radial-gradient(circle, rgba(89,185,245,.16), rgba(6,16,29,.36) 66%); box-shadow: inset 0 0 70px rgba(89,185,245,.13), 0 0 70px rgba(89,185,245,.08); }

.featured, .links-section { margin-top: 52px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 22px; }
.section-heading h2 { margin: 7px 0 0; font-size: clamp(1.55rem, 3vw, 2rem); letter-spacing: -.035em; }
.section-heading > p { max-width: 380px; margin: 0; font-size: .84rem; line-height: 1.55; color: var(--text-secondary); text-align: right; }
.featured-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.project-card {
    position: relative;
    display: grid;
    min-height: 190px;
    grid-template-columns: auto minmax(0,1fr) auto;
    align-items: center;
    gap: 20px;
    padding: 28px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    text-decoration: none;
    background: linear-gradient(145deg, var(--surface-raised), var(--surface));
    box-shadow: var(--shadow-card);
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.project-card::before { position: absolute; top: -70px; right: -55px; width: 180px; height: 180px; content: ""; border-radius: 50%; background: rgba(89,185,245,.08); filter: blur(8px); }
.project-card:hover, .project-card:focus-visible { border-color: var(--border-accent); outline: none; background: linear-gradient(145deg, var(--surface-hover), var(--surface)); transform: translateY(-3px); }
.project-card--music::before { background: rgba(142,116,255,.1); }
.card-icon { position: relative; display: grid; width: 58px; height: 58px; place-items: center; border: 1px solid var(--border-accent); border-radius: 16px; font-size: 1.55rem; color: var(--accent); background: var(--accent-soft); }
.project-card--music .card-icon { color: #b9a9ff; border-color: rgba(168,145,255,.3); background: rgba(142,116,255,.1); }
.card-content { position: relative; display: flex; min-width: 0; flex-direction: column; }
.card-kicker { margin-bottom: 7px; font-size: .65rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.project-card--music .card-kicker { color: #b9a9ff; }
.card-content strong { font-size: clamp(1.2rem, 2.5vw, 1.55rem); letter-spacing: -.025em; }
.card-content > span:last-child { margin-top: 8px; font-size: .78rem; line-height: 1.45; color: var(--text-secondary); }
.card-arrow { position: relative; font-size: 1.45rem; color: var(--text-secondary); transition: transform .2s ease, color .2s ease; }
.project-card:hover .card-arrow { color: var(--accent); transform: translateX(4px); }

.link-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.link-grid a { display: flex; min-height: 74px; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 14px; font-size: .82rem; font-weight: 700; text-decoration: none; background: rgba(13,28,46,.72); transition: border-color .2s ease, background .2s ease; }
.link-grid a span { color: var(--text-secondary); }
.link-grid a:hover, .link-grid a:focus-visible { border-color: var(--border-accent); outline: none; background: var(--surface-hover); }
.app-footer { display: flex; justify-content: center; gap: 10px; padding: 24px 0 34px; border-top: 1px solid var(--border); font-size: .72rem; color: var(--text-secondary); }
.app-footer > span + span::before { margin-right: 10px; content: "·"; }

@media (max-width: 820px) {
    .app-shell { width: min(100% - 32px, 760px); }
    .hero { min-height: 340px; grid-template-columns: 1fr minmax(150px,.35fr); gap: 24px; padding: 40px; }
    .hero-mark { width: clamp(145px, 24vw, 190px); }
    .featured-grid { grid-template-columns: 1fr; }
    .link-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 560px) {
    .app-shell { width: min(100% - 24px, 520px); }
    .topbar { align-items: flex-start; padding: 22px 0; }
    .status-pill { max-width: 145px; justify-content: center; text-align: center; }
    main { padding-top: 24px; }
    .hero { min-height: 450px; grid-template-columns: 1fr; gap: 24px; padding: 30px 24px; }
    .hero-mark { width: 135px; justify-self: start; font-size: 5.5rem; }
    .featured, .links-section { margin-top: 38px; }
    .section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
    .section-heading > p { text-align: left; }
    .project-card { min-height: 170px; grid-template-columns: auto minmax(0,1fr); gap: 16px; padding: 22px; }
    .card-arrow { display: none; }
    .card-icon { width: 50px; height: 50px; }
    .link-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .project-card, .card-arrow, .link-grid a { transition: none; }
}
