:root {
    --bg-color: #020202;
    --text-color: #f7f7f7;
    --accent-color: #d4af37;
    --secondary-color: #888888;
    --hud-color: rgba(255, 255, 255, 0.2);
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none !important; /* Managed by JS */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.logo {
    font-family: 'Cinzel', serif;
    font-weight: 900;
    font-size: 1.25rem;
    text-decoration: none;
    color: var(--text-color);
    letter-spacing: 0.2em;
}

.section-label, .narrative-label, .hero-label-top {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-color);
    letter-spacing: 0.3em;
    margin-bottom: 1rem;
    display: block;
}

/* --- Cursor --- */

#cursor {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
}

#cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease-out, width 0.3s, height 0.3s, background 0.3s;
}

.cursor-hover #cursor-follower {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,1);
}

/* --- HUD --- */

#hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    padding: 2rem;
    opacity: 0.5;
}

.hud-top, .hud-bottom {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    font-family: var(--font-mono);
    font-size: 0.6rem;
}

.hud-bottom {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    width: calc(100% - 4rem);
}

.hud-line {
    height: 1px;
    background: var(--hud-color);
    flex-grow: 1;
}

.hud-side-left {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    height: 200px;
    width: 1px;
    background: var(--hud-color);
}

.hud-scanner {
    position: absolute;
    top: 0;
    left: -2px;
    width: 5px;
    height: 20px;
    background: var(--accent-color);
    animation: scan 4s infinite ease-in-out;
}

@keyframes scan {
    0%, 100% { top: 0; }
    50% { top: 180px; }
}

/* --- Layout --- */

section {
    min-height: 100vh;
    padding: 8rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
}

/* --- Navigation --- */

nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2.5rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.nav-status {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--secondary-color);
    border-left: 1px solid var(--hud-color);
    padding-left: 1rem;
}

/* --- Hero --- */

.hero-section {
    background-image: linear-gradient(to bottom, rgba(2,2,2,0.4), var(--bg-color)), url('yurt_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    align-items: flex-start;
}

.hero-content h1 {
    font-size: clamp(4rem, 12vw, 10rem);
    line-height: 0.9;
    margin-bottom: 2rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 600px;
    color: var(--secondary-color);
    font-weight: 300;
}

/* --- Narrative --- */

.narrative-container {
    max-width: 1200px;
    margin: 0 auto;
}

.narrative-text {
    max-width: 600px;
}

.narrative-text h3 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.narrative-text p {
    font-size: 1.1rem;
    color: var(--secondary-color);
}

/* --- Bento Grid --- */

.portfolio-section {
    padding: 10rem 4rem;
}

.portfolio-header {
    margin-bottom: 6rem;
}

.portfolio-header h2 {
    font-size: 4rem;
    margin-bottom: 2rem;
}

.portfolio-line {
    width: 100px;
    height: 2px;
    background: var(--accent-color);
}

.section-desc {
    max-width: 600px;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(300px, auto);
    gap: 1.5rem;
    max-width: 1600px;
    width: 100%;
}

.portfolio-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-decoration: none;
    color: inherit;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -2;
    opacity: 0.7;
    filter: saturate(1.2);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 20%, rgba(2,2,2,0.6) 100%);
    z-index: -1;
}

.portfolio-card:hover .card-bg {
    transform: scale(1.05);
    opacity: 0.9;
    filter: saturate(1.4) brightness(1.1);
}

/* Bento Sizing Logic */
.portfolio-card:nth-child(1),
.portfolio-card:nth-child(2),
.portfolio-card:nth-child(3),
.portfolio-card:nth-child(4),
.portfolio-card:nth-child(5) { grid-column: span 12; height: 650px; }
.portfolio-card:nth-child(n+6) { grid-column: span 6; }

.portfolio-card:nth-child(3) .card-bg,
.portfolio-card:nth-child(4) .card-bg,
.portfolio-card:nth-child(5) .card-bg {
    background-position: center;
    transform: scale(1);
}

.portfolio-card:nth-child(3):hover .card-bg,
.portfolio-card:nth-child(4):hover .card-bg,
.portfolio-card:nth-child(5):hover .card-bg {
    transform: scale(1.05);
}

.portfolio-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-5px);
}

.card-category {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--secondary-color);
    max-width: 80%;
    margin-bottom: 2rem;
}

.card-cta {
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.4s ease;
}

.portfolio-card:hover .card-cta {
    opacity: 1;
    transform: translateX(0);
}

.cta-mini-text {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: var(--accent-color);
}

.cta-mini-line {
    width: 30px;
    height: 1px;
    background: var(--accent-color);
}

/* --- Space Space --- */

.space-section {
    background-image: linear-gradient(to top, rgba(2,2,2,0.8), rgba(2,2,2,0.1)), url('space_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
    align-items: center;
}

.space-content h2 {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 3rem;
    border: 1px solid var(--text-color);
    text-decoration: none;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    transition: all 0.4s;
    margin-top: 3rem;
    position: relative;
    overflow: hidden;
    background: transparent;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--text-color);
    transition: all 0.4s cubic-bezier(0.7, 0, 0.3, 1);
    z-index: -1;
}

.cta-button:hover::before {
    left: 0;
}

.cta-button:hover {
    color: var(--bg-color);
}

.contact-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-top: 4rem;
    opacity: 0.6;
}

/* --- Footer --- */

.main-footer {
    padding: 4rem;
    background: var(--bg-color);
}

.footer-line {
    width: 100%;
    height: 1px;
    background: var(--glass-border);
    margin-bottom: 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--secondary-color);
}

/* --- Responsive --- */

@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(1, 1fr);
    }
    .portfolio-card {
        grid-column: span 1 !important;
    }
    section { padding: 4rem 2rem; }
    nav { padding: 1.5rem 2rem; }
    .hero-content h1 { font-size: 4rem; }
}
