:root {
    --bg-black: #000000;
    --text-white: #ffffff;
    --accent-red: #ff0000;
    --muted-gray: #888888;
    --border-color: rgba(255, 255, 255, 0.1);
    
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --header-height: 120px;
    --container-padding: 4vw;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
}

body {
    background-color: var(--bg-black);
    color: var(--text-white);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.4;
}

/* --- Typography --- */

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

.accent {
    color: var(--accent-red);
}

.italic {
    font-style: italic;
    font-family: var(--font-body);
    font-weight: 300;
}

.normal {
    font-style: normal;
}

.section-label {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--accent-red);
    text-transform: uppercase;
    display: block;
    margin-bottom: 2rem;
}

.large-text {
    font-size: clamp(2rem, 5vw, 4.5rem);
    line-height: 1;
    max-width: 90%;
}

.desc-text {
    font-size: clamp(1.1rem, 1.5vw, 1.4rem);
    color: var(--muted-gray);
    max-width: 600px;
    margin-top: 3rem;
}

/* --- Layout --- */

.container {
    padding: 0 var(--container-padding);
}

.section-padding {
    padding: 10rem 0;
}

/* --- Navigation --- */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 2rem var(--container-padding);
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: start;
    gap: 2rem;
}

.nav-pillar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pillar-label {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    color: var(--muted-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.pillar-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link {
    color: var(--text-white);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-family: var(--font-heading);
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-red);
}

.header-center {
    display: flex;
    justify-content: center;
}

.logo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.knight-logo {
    width: 30px;
    height: 30px;
    color: var(--accent-red);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
}

.header-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: var(--font-heading);
    font-size: 0.8rem;
}

.location {
    color: var(--muted-gray);
    font-size: 0.6rem;
}

/* --- Hero Section --- */

.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: flex-end;
    padding-bottom: 5vh;
    overflow: hidden;
}

.hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6) grayscale(1);
}

.glitch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.4) 100%);
}

.hero-content {
    width: 100%;
    display: flex;
    justify-content: center;
}

.hero-title {
    font-size: clamp(3rem, 12vw, 10rem);
    line-height: 0.85;
    text-align: center;
}

.reveal-line {
    display: block;
    overflow: hidden;
}

.floating-cta {
    position: absolute;
    right: var(--container-padding);
    top: 50%;
    transform: translateY(-50%);
}

.cta-circle {
    width: 120px;
    height: 120px;
    border: 1px solid var(--accent-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-white);
    font-family: var(--font-heading);
    font-size: 0.7rem;
    text-align: center;
    padding: 20px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.cta-circle:hover {
    background: var(--accent-red);
    transform: scale(1.1);
}

/* --- Perspective --- */

.perspective-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

/* --- Works (Horizontal) --- */

.works-wrapper {
    background: #0a0a0a;
    overflow: hidden;
}

.works-container {
    display: flex;
    width: 300vw;
    height: 100vh;
}

.work-item {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10vw;
}

.work-img-wrap {
    width: 100%;
    height: 60vh;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
}

.work-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s ease;
}

.work-item:hover .work-img {
    transform: scale(1.05);
    filter: grayscale(0);
}

.work-details {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.work-category {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--muted-gray);
}

.work-title {
    font-size: clamp(2rem, 4vw, 5rem);
}

/* --- Footer --- */

.footer {
    background: var(--accent-red);
    color: var(--text-white);
    position: relative;
    padding-bottom: 2rem;
}

.footer-top {
    padding: 4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.footer-marquee {
    display: flex;
    white-space: nowrap;
}

.marquee-inner {
    display: flex;
    animation: marquee 20s linear infinite;
}

.footer-name {
    font-family: var(--font-heading);
    font-size: clamp(5rem, 15vw, 15rem);
    font-weight: 900;
    margin-right: 5vw;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.footer-content {
    padding: 5rem var(--container-padding);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    margin-bottom: 5rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.col-label {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    opacity: 0.6;
}

.col-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link {
    color: var(--text-white);
    text-decoration: none;
    font-size: clamp(1.2rem, 2vw, 2.5rem);
    font-family: var(--font-heading);
    font-weight: 600;
}

.status-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.1);
    padding: 1rem 2rem;
    border-radius: 50px;
    width: fit-content;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #00ff00;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff00;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    opacity: 0.7;
}

/* --- Preloader (Ravi inspired) --- */

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-black);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.preloader-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    padding: var(--container-padding);
}

.preloader-brand-elements {
    position: absolute;
    bottom: 5vh;
    left: var(--container-padding);
    right: var(--container-padding);
    height: 50px;
    display: flex;
    justify-content: flex-end; /* Start at right */
    align-items: center;
}

.brand-item {
    position: absolute;
    width: 35px; /* Fixed width for better math */
    height: 35px;
    font-family: var(--font-heading);
    font-size: 35px;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

/* Specific offsets for the starting cluster in bottom-right */
.brand-a {
    right: 70px; /* (2 * 35px) from right edge */
}

.brand-infinity {
    right: 35px; /* (1 * 35px) from right edge */
}

.brand-j {
    right: 0;
}

.brand-infinity svg {
    width: 100%;
    height: 100%;
}

/* Glitch Square Removed */

/* --- Custom Cursor --- */

.cursor {
    width: 8px;
    height: 8px;
    background: var(--accent-red);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10001;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent-red);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.15s ease-out;
}

/* --- Responsive --- */

@media (max-width: 1024px) {
    .header-container {
        grid-template-columns: repeat(3, 1fr);
    }
    .header-time, .nav-pillar:last-of-type {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-container {
        grid-template-columns: 1fr 1fr;
    }
    .nav-pillar {
        display: none;
    }
    .perspective-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .works-container {
        flex-direction: column;
        width: 100vw;
        height: auto;
    }
    .work-item {
        height: 60vh;
    }
}
