
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black:       #050505;
    --deep:        #0a0a0f;
    --ruby:        #9B111E;
    --ruby-bright: #c41230;
    --ruby-dim:    #5a0a12;
    --white:       #f5f5f5;
    --grey:        #888;
    --mono:        'Share Tech Mono', monospace;
    --cinzel:      'Cinzel', serif;
    --poppins:     'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: var(--black);
    color: var(--white);
    font-family: var(--poppins);
    overflow-x: hidden;
    cursor: crosshair;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--ruby); }


.opening {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#matrix-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.12;
    z-index: 0;
}

.boot-sequence {
    position: absolute;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-family: var(--mono);
    font-size: clamp(0.85rem, 2vw, 1.1rem);
    color: var(--ruby-bright);
    text-shadow: 0 0 12px var(--ruby);
}

.terminal-line {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.prompt {
    color: var(--grey);
}

.typed {
    letter-spacing: 2px;
}

.cursor {
    animation: blink 0.7s infinite;
    color: var(--ruby);
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.access-granted {
    font-family: var(--cinzel);
    font-size: clamp(1.5rem, 5vw, 3rem);
    color: var(--ruby-bright);
    letter-spacing: 8px;
    text-align: center;
    text-shadow:
        0 0 20px var(--ruby),
        0 0 60px var(--ruby),
        0 0 120px var(--ruby-dim);
    animation: accessPulse 0.5s ease forwards;
    margin-top: 2rem;
}

@keyframes accessPulse {
    0% { opacity: 0; transform: scale(0.8); }
    60% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translate(0, 0) rotate(0); }
    10%  { transform: translate(-4px, 2px) rotate(-0.3deg); }
    20%  { transform: translate(4px, -2px) rotate(0.3deg); }
    30%  { transform: translate(-3px, 3px) rotate(0); }
    40%  { transform: translate(3px, -3px) rotate(0.2deg); }
    50%  { transform: translate(-2px, 2px) rotate(-0.2deg); }
    60%  { transform: translate(2px, -2px) rotate(0); }
    70%  { transform: translate(-2px, 0px) rotate(0.1deg); }
    80%  { transform: translate(2px, 2px) rotate(-0.1deg); }
    90%  { transform: translate(-1px, -1px) rotate(0); }
}

.shake {
    animation: shake 0.5s ease;
}

.hero-reveal {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(2rem, 5vw, 6rem);
    padding: 2rem 5%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-reveal.visible {
    opacity: 1;
}

.scanline-overlay {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.08) 2px,
        rgba(0,0,0,0.08) 4px
    );
    pointer-events: none;
    z-index: 20;
}

.hero-image-wrap {
    position: relative;
    flex-shrink: 0;
}

.hero-photo {
    width: clamp(260px, 32vw, 480px);
    height: auto;
    display: block;
    position: relative;
    z-index: 2;
    filter: grayscale(20%) contrast(1.1);
    animation: photoFadeIn 1.2s ease forwards;
}

@keyframes photoFadeIn {
    from { opacity: 0; transform: translateY(20px); filter: brightness(0) grayscale(1); }
    to   { opacity: 1; transform: translateY(0);    filter: grayscale(20%) contrast(1.1); }
}

.photo-border-glow {
    position: absolute;
    inset: -3px;
    border: 2px solid var(--ruby);
    z-index: 1;
    box-shadow:
        0 0 20px var(--ruby-dim),
        0 0 60px rgba(155,17,30,0.2),
        inset 0 0 20px rgba(155,17,30,0.1);
    animation: borderPulse 3s ease-in-out infinite;
}

@keyframes borderPulse {
    0%, 100% { box-shadow: 0 0 20px var(--ruby-dim), 0 0 60px rgba(155,17,30,0.2); }
    50%       { box-shadow: 0 0 35px var(--ruby),     0 0 90px rgba(155,17,30,0.35); }
}

.photo-glitch-overlay {
    position: absolute;
    inset: 0;
    background: var(--ruby);
    z-index: 3;
    mix-blend-mode: color;
    opacity: 0.08;
    pointer-events: none;
}

.hero-text {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hero-name {
    font-family: var(--cinzel);
    color: var(--ruby);
    font-size: clamp(4.5rem, 9vw, 9rem);
    line-height: 0.88;
    letter-spacing: 6px;
    text-shadow:
        0 0 40px rgba(155,17,30,0.5),
        0 0 80px rgba(155,17,30,0.2);
    animation: nameSlide 0.8s 0.2s both ease-out;
}

@keyframes nameSlide {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}

.name-line-2 {
    display: block;
    color: var(--white);
    text-shadow: 0 0 20px rgba(255,255,255,0.1);
}

.full-name {
    color: var(--grey);
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-family: var(--mono);
    margin-top: 0.5rem;
}

.rotating-titles {
    position: relative;
    height: 2.5rem;
    overflow: hidden;
}

.rotating-title {
    position: absolute;
    top: 0; left: 0;
    font-size: 1.2rem;
    letter-spacing: 3px;
    color: var(--white);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    font-family: var(--mono);
}

.rotating-title.active {
    opacity: 1;
    transform: translateY(0);
}

.rotating-title.exit {
    opacity: 0;
    transform: translateY(-30px);
}

.scroll-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    opacity: 0;
    animation: fadeIn 1s 2s forwards ease;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.scroll-arrow {
    font-size: 1.5rem;
    color: var(--ruby);
    animation: bounce 1.5s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(8px); }
}

.scroll-text {
    font-family: var(--mono);
    letter-spacing: 3px;
    font-size: 0.8rem;
    color: var(--grey);
    text-transform: uppercase;
}


.red-transition {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: hidden;
}

.red-circle {
    width: 10px;
    height: 10px;
    background: var(--ruby);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.8s cubic-bezier(0.76, 0, 0.24, 1);
}

.red-circle.expanding {
    transform: scale(350);
}


.foundation {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 5%;
    overflow: hidden;
    background: var(--deep);
}

.circuit-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(155,17,30,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(155,17,30,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
}

.glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--ruby);
    border-radius: 50%;
    filter: blur(200px);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

.glow-left  { left: -10%; top: 50%; transform: translateY(-50%); }
.glow-center { left: 50%; top: 50%; transform: translate(-50%, -50%); }

.foundation-inner {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 5rem;
    align-items: center;
    width: 100%;
    max-width: 1200px;
}

.engineering-collage {
    position: relative;
    width: clamp(220px, 30vw, 380px);
    height: clamp(280px, 40vw, 420px);
    flex-shrink: 0;
}

.collage-card {
    position: absolute;
    border: 1px solid var(--ruby-dim);
    background: rgba(155,17,30,0.06);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    transition: 0.3s ease;
}

.collage-card:hover {
    border-color: var(--ruby);
    background: rgba(155,17,30,0.15);
    box-shadow: 0 0 25px rgba(155,17,30,0.3);
    z-index: 10;
    transform: scale(1.05);
}

.collage-label {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--ruby);
}

.collage-icon {
    font-size: 1.8rem;
    filter: grayscale(80%);
}

.card-1 { top: 0;    left: 0;   width: 55%; height: 48%; }
.card-2 { top: 0;    right: 0;  width: 40%; height: 40%; }
.card-3 { bottom: 0; left: 0;   width: 42%; height: 48%; }
.card-4 { bottom: 0; right: 0;  width: 54%; height: 50%; }

.foundation-right {
    flex: 1;
    max-width: 600px;
}

.title-foundation {
    font-family: var(--cinzel);
    color: var(--ruby);
    font-size: clamp(2rem, 4vw, 4rem);
    letter-spacing: 4px;
    margin-bottom: 0.75rem;
    text-shadow: 0 0 30px rgba(155,17,30,0.4);
}

.subtitle {
    color: var(--grey);
    margin-bottom: 3rem;
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.timeline {
    display: flex;
    flex-direction: column;
}

.timeline-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.lit {
    opacity: 1;
    transform: translateX(0);
}

.timeline-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 6px;
    flex-shrink: 0;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--ruby-dim);
    background: var(--black);
    transition: all 0.4s ease;
    box-shadow: 0 0 0px var(--ruby);
    flex-shrink: 0;
}

.timeline-item.lit .timeline-dot {
    border-color: var(--ruby);
    background: var(--ruby);
    box-shadow: 0 0 18px var(--ruby), 0 0 40px rgba(155,17,30,0.4);
}

.timeline-line {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, var(--ruby-dim), transparent);
    margin-top: 4px;
}

.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding-bottom: 2.5rem;
}

.degree {
    color: var(--white);
    font-weight: 700;
    font-family: var(--cinzel);
    font-size: 1rem;
    letter-spacing: 1px;
}

.school {
    color: #cccccc;
    font-size: 0.9rem;
}

.year {
    color: var(--ruby);
    font-family: var(--mono);
    font-size: 0.85rem;
    letter-spacing: 2px;
}

.scroll-more {
    margin-top: 2rem;
    color: var(--grey);
    font-family: var(--mono);
    font-size: 0.85rem;
    letter-spacing: 2px;
    animation: bounce 2s infinite ease-in-out;
    display: inline-block;
}


.arsenal {
    min-height: 100vh;
    position: relative;
    padding: 6rem 5%;
    overflow: hidden;
    background: var(--black);
}

#arsenal-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.3;
}

.arsenal-inner {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
}

.category {
    margin-bottom: 3.5rem;
}

.category-title {
    font-family: var(--mono);
    font-size: 1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--ruby);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cat-bracket {
    color: var(--ruby-dim);
    font-size: 1.2rem;
}

.grid {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.file-card {
    width: clamp(160px, 20vw, 220px);
    padding: 1.5rem 1.25rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--ruby-dim);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    cursor: default;
}

.file-card:hover {
    transform: translateY(-10px) scale(1.03);
    border-color: var(--ruby);
    box-shadow:
        0 0 30px rgba(155,17,30,0.4),
        0 20px 40px rgba(0,0,0,0.5),
        inset 0 0 20px rgba(155,17,30,0.05);
}

.file-card:hover h4 {
    color: var(--ruby-bright);
    text-shadow: 0 0 15px var(--ruby);
}

.file-card {
    transform-style: preserve-3d;
    will-change: transform;
}

.file {
    font-family: var(--mono);
    font-size: 0.65rem;
    opacity: 0.5;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
}

.file-card h4 {
    font-family: var(--cinzel);
    font-size: 1.1rem;
    color: var(--ruby);
    margin-bottom: 0.75rem;
    transition: color 0.25s, text-shadow 0.25s;
}

.file-card p {
    font-size: 0.75rem;
    color: var(--grey);
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
}

.status span.active   { color: #00ff88; }
.status span.learning { color: #ffcc00; }
.status span.training { color: #ff8800; }

.card-glow-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--ruby), transparent);
    top: 0;
    left: -100%;
    animation: scanCard 3s infinite;
}

.file-card:nth-child(1) .card-glow-line { animation-delay: 0s;    }
.file-card:nth-child(2) .card-glow-line { animation-delay: 0.4s;  }
.file-card:nth-child(3) .card-glow-line { animation-delay: 0.8s;  }
.file-card:nth-child(4) .card-glow-line { animation-delay: 1.2s;  }

@keyframes scanCard {
    0%   { left: -100%; top: 0; }
    40%  { left: 100%;  top: 0; }
    41%  { left: -100%; top: 100%; }
    80%  { left: 100%;  top: 100%; }
    100% { left: 100%;  top: 100%; }
}

.file-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 16px 16px 0;
    border-color: transparent var(--ruby-dim) transparent transparent;
    transition: border-color 0.25s;
}

.file-card:hover::after {
    border-color: transparent var(--ruby) transparent transparent;
}

.transition-2 {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

#particle-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.transition-text {
    position: relative;
    z-index: 2;
    font-family: var(--cinzel);
    font-size: clamp(1.5rem, 5vw, 4rem);
    letter-spacing: 8px;
    color: var(--ruby);
    text-align: center;
    text-shadow: 0 0 40px var(--ruby);
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.transition-text.visible {
    opacity: 1;
    transform: scale(1);
}

.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.hidden {
    display: none !important;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--ruby);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
    box-shadow: 0 0 8px var(--ruby);
}

.cursor-ring {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(155,17,30,0.6);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: all 0.12s ease;
}

@media (max-width: 768px) {
    .hero-reveal {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .hero-photo {
        width: 70vw;
        max-width: 280px;
    }

    .foundation-inner {
        flex-direction: column;
    }

    .engineering-collage {
        width: 100%;
        max-width: 320px;
        height: 220px;
        margin: 0 auto;
    }

    .timeline-content {
        padding-bottom: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

.missions {
    min-height: 100vh;
    position: relative;
    padding: 6rem 5%;
    overflow: hidden;
    background: var(--deep);
}

.missions-inner {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.mission-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 3rem;
}

.mission-file {
    border: 1px solid var(--ruby-dim);
    background: rgba(255,255,255,0.02);
    overflow: hidden;
    transition: border-color 0.3s ease;
    position: relative;
}

.mission-file::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px;
    height: 100%;
    background: var(--ruby-dim);
    transition: background 0.3s ease;
}

.mission-file.open::before,
.mission-file:hover::before {
    background: var(--ruby);
}

.mission-file.open {
    border-color: var(--ruby);
}

.mission-header {
    padding: 1.75rem 2rem;
    cursor: pointer;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.4rem 1rem;
    align-items: center;
    user-select: none;
}

.mission-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    grid-column: 1;
}

.mission-id {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--ruby);
}

.mission-status {
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 2px;
    padding: 3px 8px;
    border-radius: 2px;
}

.status-complete { color: #00ff88; border: 1px solid #00ff88; }
.status-active   { color: #ffcc00; border: 1px solid #ffcc00; }

.mission-title {
    font-family: var(--cinzel);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--white);
    grid-column: 1;
    letter-spacing: 1px;
}

.mission-org {
    font-size: 0.8rem;
    color: var(--grey);
    font-family: var(--mono);
    letter-spacing: 1px;
    grid-column: 1;
}

.mission-toggle {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--ruby);
    letter-spacing: 2px;
    grid-row: 1 / 4;
    grid-column: 2;
    align-self: center;
    transition: transform 0.3s ease;
    white-space: nowrap;
}

.mission-file.open .mission-toggle {
    transform: rotate(180deg);
}

.mission-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.mission-file.open .mission-body {
    max-height: 400px;
}

.mission-details {
    padding: 0 2rem 2rem;
    border-top: 1px solid rgba(155,17,30,0.2);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
}

.classified-stamp {
    position: absolute;
    top: 1rem; right: 2rem;
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 4px;
    color: rgba(0,255,136,0.5);
    border: 1px solid rgba(0,255,136,0.3);
    padding: 4px 10px;
    transform: rotate(-3deg);
}

.detail-row {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding-top: 0.75rem;
}

.detail-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: var(--ruby);
    flex-shrink: 0;
    width: 130px;
    padding-top: 2px;
}

.detail-val {
    font-size: 0.85rem;
    color: #ccc;
    line-height: 1.6;
}

.fighter {
    min-height: 100vh;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.spotlight {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(155,17,30,0.25) 0%, rgba(155,17,30,0.05) 50%, transparent 70%);
    border-radius: 50%;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: spotlightPulse 4s ease-in-out infinite;
}

@keyframes spotlightPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1);   opacity: 0.7; }
    50%       { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

.fighter-noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
}

.fighter-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.fighter-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

/* Medal */
.medal-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.3) translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.medal-wrap.drop {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.medal {
    font-size: 5rem;
    position: relative;
    z-index: 3;
    filter: drop-shadow(0 0 20px rgba(255,200,0,0.6));
    animation: medalSway 3s ease-in-out infinite;
}

@keyframes medalSway {
    0%, 100% { transform: rotate(-3deg); }
    50%       { transform: rotate(3deg); }
}

.medal-glow {
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, rgba(255,200,0,0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: medalGlow 2s ease-in-out infinite;
}

@keyframes medalGlow {
    0%, 100% { opacity: 0.5; transform: scale(1);   }
    50%       { opacity: 1;   transform: scale(1.2); }
}

.medal-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,200,0,0.15);
    animation: ringExpand 3s ease-out infinite;
}

.ring-1 { width: 140px; height: 140px; animation-delay: 0s;   }
.ring-2 { width: 180px; height: 180px; animation-delay: 0.6s; }
.ring-3 { width: 220px; height: 220px; animation-delay: 1.2s; }

@keyframes ringExpand {
    0%   { transform: scale(0.5); opacity: 0.5; }
    100% { transform: scale(1.4); opacity: 0; }
}

.fighter-title {
    font-family: var(--cinzel);
    font-size: clamp(3rem, 9vw, 8rem);
    letter-spacing: 8px;
    color: var(--white);
    text-shadow:
        0 0 40px rgba(255,255,255,0.15),
        0 0 80px rgba(155,17,30,0.3);
    line-height: 1;
}

.fighter-words {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.fighter-word {
    font-family: var(--cinzel);
    font-size: clamp(1rem, 2.5vw, 1.6rem);
    letter-spacing: 4px;
    color: var(--grey);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease, color 0.3s ease;
}

.fighter-word.revealed {
    opacity: 1;
    transform: translateY(0);
    color: var(--white);
}

.fighter-word:hover {
    color: var(--ruby);
    text-shadow: 0 0 20px var(--ruby);
}

.fighter-achievement {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 100%;
    justify-content: center;
    opacity: 0;
    transform: scaleX(0);
    transition: opacity 0.8s ease 0.4s, transform 0.8s ease 0.4s;
}

.fighter-achievement.revealed {
    opacity: 1;
    transform: scaleX(1);
}

.achievement-line {
    height: 1px;
    width: 80px;
    background: linear-gradient(90deg, transparent, var(--ruby));
}

.fighter-achievement .achievement-line:last-child {
    background: linear-gradient(270deg, transparent, var(--ruby));
}

.achievement-text {
    font-family: var(--cinzel);
    font-size: clamp(1rem, 2vw, 1.4rem);
    letter-spacing: 6px;
    color: var(--ruby);
    text-shadow: 0 0 25px var(--ruby);
    white-space: nowrap;
}

.fighter-sub {
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 3px;
    color: var(--grey);
}

.creations {
    min-height: 100vh;
    position: relative;
    padding: 6rem 5%;
    overflow: hidden;
    background: var(--deep);
}

.creations-inner {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
}

.project-showcase {
    position: relative;
    margin-top: 3rem;
    min-height: 480px;
}

.project-slide {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    animation: slideIn 0.6s ease forwards;
}

.project-slide.active {
    display: grid;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

.project-poster {
    position: relative;
    height: 380px;
    overflow: hidden;
    border: 1px solid var(--ruby-dim);
}

.poster-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}

.project-poster:hover .poster-bg {
    transform: scale(1.05);
}

.poster-bg-1 {
    background: linear-gradient(135deg, #1a0a0a 0%, #2d0a12 50%, #0a0505 100%);
}
.poster-bg-2 {
    background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2d 50%, #050510 100%);
}
.poster-bg-3 {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a0a 50%, #050505 100%);
}

.poster-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 60%);
}

.poster-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 1.5rem;
}

.project-num {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--ruby);
    display: block;
    margin-bottom: 0.5rem;
}

.project-title {
    font-family: var(--cinzel);
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: var(--white);
    letter-spacing: 3px;
    line-height: 1.1;
    margin-bottom: 0.4rem;
}

.project-type {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--grey);
    letter-spacing: 2px;
}

.project-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1rem 0;
}

.project-desc p {
    color: #bbb;
    line-height: 1.8;
    font-size: 0.95rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: var(--ruby);
    border: 1px solid var(--ruby-dim);
    padding: 4px 10px;
}

.project-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.proj-btn {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--white);
    background: var(--ruby);
    border: 1px solid var(--ruby);
    padding: 10px 20px;
    text-decoration: none;
    transition: 0.3s ease;
    display: inline-block;
}

.proj-btn:hover {
    background: transparent;
    box-shadow: 0 0 20px rgba(155,17,30,0.4);
}

.proj-btn-ghost {
    background: transparent;
    color: var(--ruby);
}

.proj-btn-ghost:hover {
    background: var(--ruby);
    color: var(--white);
}

.project-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 2.5rem;
}

.proj-nav-btn {
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--grey);
    background: transparent;
    border: 1px solid var(--ruby-dim);
    padding: 8px 20px;
    cursor: pointer;
    transition: 0.3s ease;
}

.proj-nav-btn:hover {
    color: var(--ruby);
    border-color: var(--ruby);
    box-shadow: 0 0 15px rgba(155,17,30,0.3);
}

.proj-dots {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.proj-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ruby-dim);
    cursor: pointer;
    transition: 0.3s ease;
}

.proj-dot.active {
    background: var(--ruby);
    box-shadow: 0 0 8px var(--ruby);
    width: 20px;
    border-radius: 3px;
}

.offduty {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 5%;
    overflow: hidden;
    background: var(--black);
}

.offduty-inner {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.hobby-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
    will-change: transform;
}

.hobby-card {
    position: relative;
    border: 1px solid var(--ruby-dim);
    background: rgba(255,255,255,0.02);
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: transform 0.1s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
    overflow: hidden;
}

.hobby-card:hover {
    border-color: var(--ruby);
    box-shadow: 0 0 30px rgba(155,17,30,0.25);
}

.hobby-card:hover .hobby-glow {
    opacity: 1;
}

.hobby-icon {
    font-size: 2.5rem;
    transition: transform 0.3s ease;
    filter: grayscale(60%);
}

.hobby-card:hover .hobby-icon {
    transform: scale(1.2);
    filter: grayscale(0%);
}

.hobby-label {
    font-family: var(--cinzel);
    font-size: 0.85rem;
    letter-spacing: 3px;
    color: var(--grey);
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.hobby-card:hover .hobby-label {
    color: var(--white);
}

.hobby-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(155,17,30,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.achievements {
    min-height: 100vh;
    position: relative;
    padding: 6rem 5%;
    overflow: hidden;
    background: var(--deep);
}

.achievements-inner {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
}

.counter-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    margin: 3rem 0 4rem;
    border: 1px solid var(--ruby-dim);
}

.counter-block {
    padding: 2.5rem 1.5rem;
    text-align: center;
    border-right: 1px solid var(--ruby-dim);
    background: rgba(255,255,255,0.02);
    transition: background 0.3s ease;
}

.counter-block:last-child { border-right: none; }

.counter-block:hover {
    background: rgba(155,17,30,0.07);
}

.counter-num {
    display: block;
    font-family: var(--cinzel);
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--ruby);
    text-shadow: 0 0 30px rgba(155,17,30,0.4);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.counter-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: var(--grey);
    text-transform: uppercase;
}

.achievement-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ach-card {
    border: 1px solid var(--ruby-dim);
    background: rgba(255,255,255,0.02);
    padding: 1.5rem 2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s, box-shadow 0.3s;
}

.ach-card.fly-right {
    transform: translateX(60px);
}

.ach-card.landed {
    opacity: 1;
    transform: translateX(0);
}

.ach-card.open {
    border-color: var(--ruby);
    box-shadow: 0 0 20px rgba(155,17,30,0.2);
}

.ach-card:hover {
    border-color: var(--ruby);
}

.ach-icon {
    font-size: 2rem;
    filter: grayscale(50%);
    transition: filter 0.3s ease;
}

.ach-card:hover .ach-icon {
    filter: grayscale(0%);
}

.ach-info h4 {
    font-family: var(--cinzel);
    color: var(--white);
    font-size: 1rem;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
}

.ach-info p {
    color: var(--grey);
    font-size: 0.8rem;
    font-family: var(--mono);
    letter-spacing: 1px;
}

.ach-expand-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--ruby-dim);
    color: var(--ruby);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.ach-card.open .ach-expand-btn {
    background: var(--ruby);
    color: var(--white);
    transform: rotate(45deg);
    border-color: var(--ruby);
}

.ach-expanded {
    display: none;
    grid-column: 1 / -1;
    padding-top: 1rem;
    border-top: 1px solid rgba(155,17,30,0.2);
    color: #bbb;
    font-size: 0.85rem;
    line-height: 1.7;
}

.ach-card.open .ach-expanded {
    display: block;
}

.vision {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

.vision-map-bg {
    position: absolute;
    inset: 0;
    opacity: 0.6;
}

.world-svg {
    width: 100%;
    height: 100%;
}

.vision-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    padding: 2rem;
}

.vision-words {
    display: flex;
    gap: clamp(1.5rem, 4vw, 4rem);
    flex-wrap: wrap;
    justify-content: center;
}

.vision-word {
    font-family: var(--cinzel);
    font-size: clamp(2rem, 6vw, 5.5rem);
    letter-spacing: 6px;
    color: transparent;
    -webkit-text-stroke: 1px rgba(155,17,30,0.4);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease, -webkit-text-stroke 0.5s ease, color 0.5s ease;
}

.vision-word.lit {
    opacity: 1;
    transform: translateY(0);
    -webkit-text-stroke: 1px rgba(155,17,30,0.8);
}

.vision-word.lit:hover {
    color: var(--ruby);
    -webkit-text-stroke: 1px var(--ruby);
    text-shadow: 0 0 40px rgba(155,17,30,0.5);
    cursor: default;
}

.vision-tagline {
    font-family: var(--cinzel);
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    color: var(--white);
    letter-spacing: 3px;
    opacity: 0;
    text-shadow: 0 0 30px rgba(255,255,255,0.2);
}

.vision-tagline.revealed {
    opacity: 1;
}

.vision-sub {
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 4px;
    color: var(--ruby);
}


.finale {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
}

#finale-matrix {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.06;
}

.finale-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    padding: 2rem 5%;
    max-width: 800px;
    width: 100%;
}

.finale-title-wrap {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 100%;
    justify-content: center;
}

.finale-line {
    height: 1px;
    flex: 1;
    max-width: 120px;
    background: linear-gradient(90deg, transparent, var(--ruby));
}

.finale-title-wrap .finale-line:last-child {
    background: linear-gradient(270deg, transparent, var(--ruby));
}

.finale-title {
    font-family: var(--cinzel);
    font-size: clamp(2rem, 6vw, 5rem);
    color: var(--white);
    letter-spacing: 6px;
    text-shadow:
        0 0 40px rgba(255,255,255,0.1),
        0 0 80px rgba(155,17,30,0.2);
    white-space: nowrap;
}

.finale-sub {
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: var(--grey);
}

.finale-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.finale-btn {
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: var(--white);
    background: transparent;
    border: 1px solid var(--ruby-dim);
    padding: 14px 28px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    transition: 0.3s ease;
    min-width: 110px;
    position: relative;
    overflow: hidden;
}

.finale-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--ruby);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 0;
}

.finale-btn:hover::before {
    transform: translateY(0);
}

.finale-btn-id,
.finale-btn span:not(.finale-btn-id) {
    position: relative;
    z-index: 1;
}

.finale-btn-id {
    font-size: 0.55rem;
    color: var(--ruby);
    letter-spacing: 3px;
    transition: color 0.3s ease;
}

.finale-btn:hover .finale-btn-id {
    color: rgba(255,255,255,0.6);
}

.finale-btn:hover {
    border-color: var(--ruby);
    box-shadow: 0 0 25px rgba(155,17,30,0.4);
}

.credits {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    width: 100%;
}

.credits-line {
    width: 60px;
    height: 1px;
    background: var(--ruby-dim);
}

.credits-text {
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--grey);
}

.credits-sub {
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: rgba(136,136,136,0.4);
}

@media (max-width: 768px) {
    .mission-header {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .mission-toggle { grid-row: auto; grid-column: 1; }

    .project-slide.active { grid-template-columns: 1fr; }
    .project-poster { height: 250px; }

    .hobby-grid { grid-template-columns: repeat(2, 1fr); }

    .counter-row { grid-template-columns: repeat(2, 1fr); }
    .counter-block { border-right: none; border-bottom: 1px solid var(--ruby-dim); }
    .counter-block:nth-child(2n) { border-right: none; }

    .finale-title { font-size: 1.8rem; }

    .vision-words { gap: 1rem; }
    .vision-word  { font-size: 2rem; }
}

html, body {
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

section {
    width: 100%;
    overflow: hidden;
}

.grid,
.hero,
.foundation-inner,
.project-showcase,
.counter-row,
.finale-links {
    flex-wrap: wrap;
}

.file-card,
.hobby-card,
.counter-block,
.project-slide {
    min-width: 0;
    box-sizing: border-box;
}

p, span {
    word-break: break-word;
}

.file-card:active,
.hobby-card:active {
    transform: scale(0.98);
}

@media (max-width: 768px) {

    section {
        padding: 60px 20px;
    }

    .title-foundation {
        font-size: 1.6rem;
        text-align: center;
    }

    .subtitle {
        text-align: center;
        font-size: 0.9rem;
        margin-bottom: 25px;
    }

    .grid {
        justify-content: center;
        gap: 12px;
    }

    .file-card {
        width: 100%;
        max-width: 320px;
    }

    .timeline-content {
        padding-left: 10px;
    }

    .mission-file {
        padding: 14px;
    }

    .project-details {
        padding: 12px;
    }

    .counter-row {
        gap: 15px;
    }

    .hobby-grid {
        gap: 12px;
        justify-content: center;
    }

    .hobby-card {
        width: 45%;
    }
}