@font-face {
    font-family: "Xenotron";
    src: url("/assets/fonts/xenotron.woff2") format("woff2"),
         url("/assets/fonts/xenotron.woff") format("woff"),
         url("/assets/fonts/xenotron.ttf") format("truetype");
    font-display: swap;
}

:root {
    --bg: #070f2b;
    --bg-soft: #0f1f4d;
    --text: #e8efff;
    --muted: #a8b9e7;
    --primary: #3d8bff;
    --primary-strong: #2d6ef6;
    --card: rgba(9, 21, 56, 0.75);
    --border: rgba(126, 162, 255, 0.28);
    --card-glow: rgba(72, 134, 255, 0.22);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background:
        radial-gradient(90rem 45rem at 110% -10%, #2454d0 0%, transparent 60%),
        radial-gradient(70rem 38rem at -20% 120%, #153783 0%, transparent 55%),
        linear-gradient(165deg, var(--bg) 0%, #091638 44%, var(--bg-soft) 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(101, 141, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(101, 141, 255, 0.08) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.65), transparent 90%);
}

.wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 56px 20px 40px;
    position: relative;
    z-index: 1;
}

.page-main {
    flex: 1;
}

.hgi {
    vertical-align: bottom;
}

.site-footer {
    background: rgba(4, 10, 30, 0.92);
    border-top: 1px solid rgba(126, 162, 255, 0.2);
    position: relative;
    z-index: 1;
}

.site-footer-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-links,
.footer-language {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.footer-links a,
.footer-language a,
.footer-language span {
    font-size: 0.86rem;
    color: #b8c8f4;
    text-decoration: none;
}

.footer-language a.active {
    color: #ffffff;
    font-weight: 700;
    text-decoration: underline;
}

.footer-links a:hover,
.footer-language a:hover {
    color: #e3edff;
}

h1,
h2 {
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    letter-spacing: 0.02em;
}

.brand-title {
    font-family: "Xenotron", "Segoe UI", Roboto, Arial, sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #00AEEF;
    font-size: clamp(1.9rem, 5vw, 4rem);
}

h1 {
    margin: 0 0 16px;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    color: #f3f7ff;
    text-shadow: 0 0 22px rgba(83, 147, 255, 0.35);
}

h2 {
    margin: 0 0 10px;
    font-size: 1.2rem;
    color: #dce7ff;
}

p { margin: 0 0 14px; color: var(--muted); }

a,
a:visited {
    color: #d9e7ff;
}

.hero,
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    backdrop-filter: blur(6px);
    box-shadow:
        0 0 0 1px rgba(75, 123, 255, 0.1) inset,
        0 14px 30px rgba(2, 8, 28, 0.5);
    margin-bottom: 18px;
}

.hero {
    padding: 36px;
    background:
        linear-gradient(145deg, rgba(53, 114, 255, 0.22), rgba(34, 71, 171, 0.1)),
        var(--card);
    margin-bottom: 36px;
}

.btn {
    display: inline-block;
    background: linear-gradient(125deg, var(--primary), var(--primary-strong));
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 11px 16px;
    border-radius: 10px;
    box-shadow: 0 8px 20px var(--card-glow);
}

.list {
    display: grid;
    margin-top: 18px;
}

.card {
    padding: 18px;
    transition: transform 120ms ease, box-shadow 120ms ease;
    text-decoration: none;
}

a.card:hover, .link-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 0 1px rgba(107, 155, 255, 0.45) inset,
        0 16px 30px rgba(4, 10, 35, 0.62),
        0 0 24px rgba(58, 125, 255, 0.28);
}

.card-main {
    display: block;
    text-decoration: none;
    color: inherit;
}

.card-main:visited,
.card-main:hover,
.card-main:active {
    color: inherit;
    text-decoration: none;
}

.card-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-wrap {
    --logo-radius: 14px;
    --logo-inner-radius: 12px;
    width: 56px;
    height: 56px;
    display: inline-grid;
    place-items: center;
    border-radius: var(--logo-radius);
    background: linear-gradient(145deg, #1e3d91, #12255c);
    border: 1px solid rgba(114, 158, 255, 0.45);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 0 18px rgba(90, 145, 255, 0.23);
    padding: 2px;
}

.logo-wrap-medium {
    width: 56px;
    height: 56px;
}

.logo-wrap-large {
    --logo-radius: 18px;
    --logo-inner-radius: 16px;
    width: 92px;
    height: 92px;
    box-shadow: 0 0 24px rgba(90, 145, 255, 0.35);
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--logo-inner-radius);
}

.logo-fallback {
    display: none;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #d9e8ff;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

.logo-wrap-large .logo-fallback {
    font-size: 1.15rem;
}

.meta { font-size: 0.9rem; color: var(--muted); }

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8da9e8;
    margin-right: 2px;
    align-self: center;
}

.tag {
    background: rgba(58, 105, 220, 0.22);
    border: 1px solid rgba(132, 172, 255, 0.4);
    color: #d9e7ff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    text-decoration: none;
}

.tag:hover {
    background: rgba(72, 126, 255, 0.35);
}

.tag.active {
    background: rgba(72, 126, 255, 0.42);
    border-color: rgba(154, 190, 255, 0.7);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.actions {
    margin-top: 18px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.about-kicker,
.about-card-eyebrow {
    color: #8fb8ff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.about-hero {
    position: relative;
    overflow: hidden;
}

.about-hero::after {
    content: "";
    position: absolute;
    right: 28px;
    bottom: 24px;
    width: 112px;
    height: 112px;
    border: 1px solid rgba(143, 184, 255, 0.32);
    border-radius: 20px;
    background:
        linear-gradient(90deg, rgba(143, 184, 255, 0.14) 1px, transparent 1px),
        linear-gradient(rgba(143, 184, 255, 0.14) 1px, transparent 1px);
    background-size: 16px 16px;
    transform: rotate(8deg);
    opacity: 0.72;
}

.about-hero > * {
    position: relative;
    z-index: 1;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.about-card {
    margin-bottom: 0;
}

.about-card h2,
.about-note h2 {
    color: #f1f6ff;
}

.about-note {
    padding: 24px;
}

.contact-form {
    display: grid;
    gap: 16px;
    padding: 24px;
}

.form-field {
    display: grid;
    gap: 7px;
}

.form-field label {
    color: #dce8ff;
    font-weight: 700;
}

.form-field input,
.form-field textarea {
    width: 100%;
    border: 1px solid rgba(132, 172, 255, 0.38);
    border-radius: 10px;
    background: rgba(6, 15, 41, 0.72);
    color: #f1f6ff;
    font: inherit;
    padding: 11px 12px;
    outline: none;
}

.form-field textarea {
    min-height: 170px;
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: rgba(163, 198, 255, 0.78);
    box-shadow: 0 0 0 3px rgba(67, 128, 255, 0.18);
}

.field-error {
    color: #ffc7d1;
    font-size: 0.9rem;
}

.form-status {
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 18px;
    padding: 12px 14px;
}

.form-status-success {
    background: rgba(37, 118, 82, 0.34);
    border-color: rgba(106, 224, 164, 0.42);
    color: #d8ffe9;
}

.form-status-error {
    background: rgba(128, 45, 64, 0.34);
    border-color: rgba(255, 154, 177, 0.42);
    color: #ffe1e7;
}

.contact-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.turnstile-wrap {
    min-height: 65px;
}

.turnstile-placeholder {
    border: 1px dashed rgba(143, 184, 255, 0.42);
    border-radius: 10px;
    color: #b8c8f4;
    padding: 13px 14px;
    background: rgba(12, 27, 68, 0.45);
}

.contact-form button:disabled {
    cursor: not-allowed;
    filter: grayscale(0.35);
    opacity: 0.58;
}

.view-switch {
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(31, 58, 132, 0.42);
    border: 1px solid rgba(122, 166, 255, 0.35);
    margin: 6px 0 2px;
}

.hero-actions-right {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
}

.view-pill,
.view-pill:visited {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: #cddfff;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.view-pill.active {
    color: #ffffff;
    background: linear-gradient(130deg, rgba(75, 141, 255, 0.95), rgba(44, 99, 228, 0.95));
    box-shadow: 0 8px 18px rgba(52, 113, 246, 0.45);
}

.timeline {
    --timeline-axis-x: 16px;
    --timeline-axis-center: calc(var(--timeline-axis-x) + 1.5px);
    --timeline-content-offset: 44px;
    position: relative;
    display: grid;
    gap: 14px;
    margin-top: 18px;
    padding-left: var(--timeline-content-offset);
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--timeline-axis-center) - 1.5px);
    width: 3px;
    border-radius: 2px;
    background: linear-gradient(180deg, rgba(122, 171, 255, 0.75), rgba(67, 108, 219, 0.24));
}

.year-break {
    position: relative;
    margin: 10px 0 2px;
    font-size: 1.02rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #d9e9ff;
    font-weight: 800;
    text-shadow: 0 0 16px rgba(111, 161, 255, 0.45);
}

.year-break::before {
    content: "";
    position: absolute;
    left: calc(var(--timeline-axis-center) - var(--timeline-content-offset));
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 12px;
    background: #98beff;
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    filter: drop-shadow(0 0 7px rgba(90, 144, 255, 0.85));
}

.timeline-card {
    position: relative;
}

.timeline-card::before {
    content: "";
    position: absolute;
    left: calc(var(--timeline-axis-center) - var(--timeline-content-offset) - 1px);
    top: 24px;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #8fb5ff;
    border: 2px solid #10307a;
    box-shadow: 0 0 0 4px rgba(44, 102, 233, 0.22);
}

.timeline-date {
    margin-bottom: 8px;
    color: #a9c1f3;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.btn-secondary {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: #d8e6ff;
    background: rgba(24, 44, 96, 0.55);
    font-weight: 600;
}

.btn-secondary:hover {
    background: rgba(39, 69, 145, 0.72);
}

.nerd-area {
    margin: 16px -18px -18px -18px;
    padding: 14px 16px;
    border-top: 1px solid rgba(126, 162, 255, 0.2);
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    background:
        linear-gradient(150deg, rgba(39, 77, 177, 0.16), rgba(20, 43, 105, 0.06)),
        rgba(8, 19, 51, 0.42);
    display: grid;
    gap: 10px;
    font-size: 0.7rem;
}

.nerd-area-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
}

.nerd-area-row .hgi {
    color: rgba(194, 216, 255, 0.88);
    width: 20px;
}

.nerd-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.nerd-list span {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    line-height: 1.3;
    color: rgba(214, 228, 255, 0.7);
    border: 1px solid rgba(122, 166, 255, 0.26);
    border-radius: 999px;
    padding: 3px 10px;
}
    
.nerd-list span strong {
    color: #f2f7ffb7;
    letter-spacing: 0.01em;
}

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

    .about-hero::after {
        right: -28px;
        bottom: -28px;
        opacity: 0.42;
    }

    .nerd-area {
        padding: 12px;
    }

    .nerd-area-row {
        gap: 8px;
    }
}

.screens {
    margin-top: 18px;
    padding: 18px;
}

.screens-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.screens-head h2 {
    margin: 0;
}

.screens-count {
    color: var(--muted);
    font-size: 0.86rem;
}

.screens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

.screen-thumb {
    appearance: none;
    border: 1px solid rgba(132, 172, 255, 0.4);
    border-radius: 10px;
    overflow: hidden;
    padding: 0;
    width: 100%;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    background: rgba(19, 38, 88, 0.55);
}

.screen-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    image-rendering: auto;
    transform: translateZ(0);
    transition: transform 130ms ease;
}

.screen-thumb:hover img,
.screen-thumb:focus-visible img {
    transform: translateZ(0) scale(1.04);
}

.screen-thumb:focus-visible {
    outline: 2px solid #8db6ff;
    outline-offset: 2px;
}

.screen-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    margin: 0;
    width: 100vw;
    max-width: none;
    height: 100vh;
    max-height: none;
    padding: 0;
    border: 0;
    background: transparent;
}

.screen-modal[open] {
    display: block;
}

.screen-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    background: rgba(3, 8, 24, 0.82);
    cursor: pointer;
}

.screen-modal-dialog {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: min-content minmax(0, 1fr) min-content;
    gap: 10px;
    padding: 14px 18px 18px;
    z-index: 1;
}

.screen-modal-close {
    justify-self: end;
    border: 0;
    background: transparent;
    color: #e4eefe;
    font-size: 2rem;
    line-height: 1;
    padding: 2px 6px;
    cursor: pointer;
}

.screen-modal-stage {
    min-height: 0;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.screen-modal-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.screen-modal-meta {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: center;
    place-self: center;
}

.screen-modal-meta button {
    justify-self: start;
    border: 1px solid rgba(168, 197, 255, 0.45);
    color: #dbe9ff;
    background: rgba(15, 32, 78, 0.62);
    border-radius: 8px;
    padding: 6px 12px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.24);
    cursor: pointer;
}

.screen-modal-meta button:hover,
.screen-modal-meta button:focus-visible {
    background: rgba(28, 52, 118, 0.72);
    border-color: rgba(189, 214, 255, 0.7);
}

.screen-modal-meta button[data-screen-next] {
    justify-self: end;
}

.screen-modal-meta span {
    color: #dce9ff;
    font-weight: 700;
    letter-spacing: 0.08em;
}

body.screen-modal-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .screens-grid {
        grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    }

    .screen-modal {
        padding: 0;
    }

    .screen-modal-dialog {
        padding: 10px 12px 12px;
    }

    .screen-modal-close {
        font-size: 1.7rem;
    }
}
