:root {
    --phosphor: #b3ff00;
    --phosphor-soft: #d5ff72;
    --phosphor-dim: #7fae18;

    --bg: #070a06;
    --bg-deep: #030503;
    --surface: rgba(179, 255, 0, 0.045);
    --surface-strong: rgba(179, 255, 0, 0.075);
    --surface-dark: rgba(5, 10, 5, 0.78);

    --text: #dceacb;
    --text-soft: #aab89a;
    --text-dim: #6f7f61;

    --line: rgba(179, 255, 0, 0.18);
    --line-soft: rgba(179, 255, 0, 0.08);
    --glow: rgba(179, 255, 0, 0.20);

    --font-main: "IBMVGA", "IBMVGA437", "Courier New", monospace;
    --font-ui: "IBMVGA", "IBMVGA437", "Courier New", monospace;

    --text-xs: clamp(0.72rem, 0.68rem + 0.18vw, 0.82rem);
    --text-sm: clamp(0.84rem, 0.78rem + 0.25vw, 0.96rem);
    --text-md: clamp(1rem, 0.92rem + 0.36vw, 1.16rem);
    --text-lg: clamp(1.18rem, 1.02rem + 0.75vw, 1.58rem);
    --text-xl: clamp(1.65rem, 1.25rem + 1.8vw, 2.75rem);
    --text-hero: clamp(2.6rem, 1.25rem + 6.2vw, 6.4rem);

    --space-1: 0.35rem;
    --space-2: 0.65rem;
    --space-3: 1rem;
    --space-4: 1.5rem;
    --space-5: 2.25rem;
    --space-6: 3.5rem;

    --max-width: 1120px;
    --radius: 22px;
    --radius-sm: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-main);
    font-size: var(--text-md);
    line-height: 1.65;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 0%, rgba(179,255,0,.105), transparent 30rem),
        radial-gradient(circle at 88% 18%, rgba(179,255,0,.045), transparent 26rem),
        linear-gradient(180deg, var(--bg), var(--bg-deep));
}

body.modal-open { overflow: hidden; }

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(to bottom, rgba(255,255,255,.019), rgba(255,255,255,.019) 1px, transparent 1px, transparent 4px),
        linear-gradient(90deg, transparent, rgba(179,255,0,.025), transparent);
    opacity: .24;
    z-index: 50;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 120px rgba(0,0,0,.78);
    z-index: 49;
}

a {
    color: var(--phosphor-soft);
    text-decoration: none;
    border-bottom: 1px solid rgba(179,255,0,.32);
}

a:hover { color: var(--phosphor); border-bottom-color: var(--phosphor); }

button, input, textarea, select { font: inherit; }

.page {
    width: min(100% - 2rem, var(--max-width));
    margin: 0 auto;
}

.hero { padding: clamp(4rem, 8vw, 7rem) 0 var(--space-6); }

.hero-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.hero-kicker,
.section-kicker,
.timeline-date,
.project-type,
.grid-card-type,
.modal-date,
.modal-section-title {
    color: var(--phosphor);
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    letter-spacing: .14em;
    text-transform: uppercase;
    text-shadow: 0 0 18px var(--glow);
}

.lang-switch { display: flex; gap: .45rem; }

.lang-button,
.more-button,
.modal-close,
.carousel-button {
    border: 1px solid var(--line);
    color: var(--phosphor);
    background: rgba(179,255,0,.035);
    cursor: pointer;
}

.lang-button {
    padding: .35rem .65rem;
    border-radius: 999px;
    font-size: var(--text-xs);
}

.lang-button.active,
.lang-button:hover,
.more-button:hover,
.modal-close:hover,
.carousel-button:hover {
    background: rgba(179,255,0,.14);
    box-shadow: 0 0 22px rgba(179,255,0,.14);
}

.logo-splash { width: clamp(92px, 16vw, 160px); margin-bottom: var(--space-4); }
.logo-splash svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 0 24px rgba(179,255,0,.28)); }

.hero h1 {
    max-width: 860px;
    margin: 0;
    font-size: var(--text-hero);
    line-height: .95;
    letter-spacing: -.06em;
    color: #edf6e5;
}

.hero p,
.section-heading p {
    max-width: 720px;
    color: var(--text-soft);
    font-size: var(--text-lg);
}

.section-heading { margin: 0 0 var(--space-5); }
.section-heading h2 { margin: .2rem 0 .7rem; font-size: var(--text-xl); line-height: 1.05; }
.section-heading p { margin: 0; }

.featured-section { padding: 0 0 var(--space-6); }
.timeline-section { padding: var(--space-4) 0 var(--space-6); }

.timeline {
    position: relative;
    padding: var(--space-4) 0 var(--space-6);
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--line), var(--line), transparent);
}

.project {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 6vw, 5rem);
    margin-bottom: clamp(3rem, 7vw, 6rem);
}

.project:nth-child(even) .project-card { grid-column: 2; }
.project:nth-child(even) .timeline-date { grid-column: 1; grid-row: 1; justify-self: end; text-align: right; }

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 2rem;
    width: 13px;
    height: 13px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: var(--phosphor);
    box-shadow: 0 0 0 6px rgba(179,255,0,.07), 0 0 24px rgba(179,255,0,.35);
    z-index: 2;
}

.timeline-date { align-self: start; padding-top: 1.15rem; color: var(--text-dim); }

.project-card {
    overflow: hidden;
    padding: var(--space-3);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--surface-strong), rgba(179,255,0,.018));
    box-shadow: inset 0 0 0 1px rgba(179,255,0,.08), 0 18px 60px rgba(0,0,0,.28);
    transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    background: linear-gradient(180deg, rgba(179,255,0,.095), rgba(179,255,0,.025));
    box-shadow: inset 0 0 0 1px rgba(179,255,0,.16), 0 22px 80px rgba(0,0,0,.34);
}

.carousel { position: relative; overflow: hidden; border-radius: calc(var(--radius) - .45rem); background: rgba(0,0,0,.28); }
.carousel-track { display: flex; transition: transform .35s ease; }
.slide { flex: 0 0 100%; aspect-ratio: 16 / 10; background: rgba(179,255,0,.025); }
.slide img, .slide video { display: block; width: 100%; height: 100%; object-fit: cover; }
.slide-empty { background: repeating-linear-gradient(135deg, rgba(179,255,0,.05), rgba(179,255,0,.05) 1px, transparent 1px, transparent 14px); }

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    font-size: 1.65rem;
    line-height: 1;
    display: grid;
    place-items: center;
    backdrop-filter: blur(8px);
}

.carousel-button.prev { left: .75rem; }
.carousel-button.next { right: .75rem; }

.carousel-dots {
    position: absolute;
    left: 50%;
    bottom: .75rem;
    transform: translateX(-50%);
    display: flex;
    gap: .35rem;
}

.carousel-dot {
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: rgba(220,234,203,.35);
}

.carousel-dot.active { background: var(--phosphor); box-shadow: 0 0 10px var(--glow); }

.project-content { padding: var(--space-4) .25rem .1rem; }
.project-content h2 { margin: 0 0 .8rem; color: var(--phosphor-soft); font-size: var(--text-lg); line-height: 1.15; }
.project-description { color: var(--text-soft); font-size: var(--text-sm); }
.project-description p { margin: 0 0 .7rem; }

.tags { display: flex; flex-wrap: wrap; gap: .45rem; margin: var(--space-3) 0; }
.tag {
    padding: .25rem .55rem;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    color: var(--phosphor-soft);
    background: rgba(179,255,0,.035);
    font-size: var(--text-xs);
}

.project-actions { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-3); }
.more-button { padding: .55rem .85rem; border-radius: 999px; color: var(--bg); background: var(--phosphor); }
.project-links, .modal-links { display: flex; flex-wrap: wrap; gap: .75rem; font-size: var(--text-sm); }

.footer {
    padding: var(--space-5) 0 var(--space-6);
    color: var(--text-dim);
    border-top: 1px solid var(--line-soft);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    padding: 1rem;
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(10px);
}

.modal.open { display: grid; place-items: center; }

.modal-panel {
    width: min(100%, 1040px);
    max-height: min(90vh, 900px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(12,18,10,.98), rgba(5,8,5,.98));
    box-shadow: 0 26px 100px rgba(0,0,0,.65), 0 0 60px rgba(179,255,0,.08);
}

.modal-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-4);
    background: rgba(5,8,5,.92);
    border-bottom: 1px solid var(--line-soft);
}

.modal-title { margin: .3rem 0 0; color: var(--phosphor-soft); font-size: var(--text-xl); }
.modal-close { width: 2.25rem; height: 2.25rem; border-radius: 50%; font-size: 1.6rem; line-height: 1; }
.modal-body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: var(--space-4); padding: var(--space-4); }
.modal-detail { color: var(--text-soft); font-size: var(--text-sm); }
.modal-section-title { margin-top: var(--space-4); }
.project-description-detail { margin-top: var(--space-3); color: var(--text); }

@media (max-width: 760px) {
    .page { width: min(100% - 1rem, var(--max-width)); }
    .hero { padding-top: 3rem; }
    .hero-topbar { align-items: flex-start; }
    .timeline::before { left: 0; }
    .project, .project:nth-child(even) .project-card, .project:nth-child(even) .timeline-date {
        display: block;
        grid-column: auto;
        text-align: left;
    }
    .project { padding-left: 1.35rem; margin-bottom: 3rem; }
    .timeline-dot { left: 0; }
    .timeline-date { margin-bottom: .75rem; padding-top: 0; }
    .project-actions { align-items: flex-start; flex-direction: column; }
    .modal-body { grid-template-columns: 1fr; }
}
