:root {
    --bg-color: #f7f7f7;
    --text-color: #050505;
    --border-color: rgba(0, 0, 0, 0.15);
    --accent: #ff4500;
    --font-primary: 'Outfit', sans-serif;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.4;
    overflow-x: hidden;
}

/* --- Layout Grid (Swiss/Brutalist style) --- */
.header, .hero, .work, .footer, .marquee {
    border-bottom: 1px solid var(--border-color);
}

/* --- Header --- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    background: rgba(247, 247, 247, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 800;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.header-logo img {
    height: 40px;
    width: auto;
    border-radius: 50%;
}

.header-nav {
    display: flex;
    gap: 2rem;
}

.header-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 400;
    font-size: 1rem;
    text-transform: uppercase;
    transition: var(--transition);
}

.header-nav a:hover {
    color: var(--accent);
}

/* --- Hero --- */
.hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    min-height: 70vh;
}

.hero-content {
    padding: 4rem 2rem;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-content h1 {
    font-size: clamp(3rem, 6vw, 6rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -2px;
    margin-bottom: 2rem;
    max-width: 1000px;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 500px;
    color: #444;
}

.hero-stats {
    display: flex;
    flex-direction: column;
}

.stat-box {
    flex: 1;
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-box:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
}

/* --- Marquee --- */
.marquee {
    overflow: hidden;
    white-space: nowrap;
    padding: 1.5rem 0;
    background: var(--text-color);
    color: var(--bg-color);
}

.marquee-content {
    display: inline-block;
    animation: marquee 20s linear infinite;
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

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

/* --- Work Section --- */
.work {
    background: var(--bg-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-weight: 600;
}

.section-header h2 {
    font-size: 1.5rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.project-card {
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    aspect-ratio: 4/3;
    display: flex;
    flex-direction: column;
}

.project-card.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card:nth-child(even) {
    border-right: none;
}

.project-image-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.project-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--text-color);
    color: var(--bg-color);
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 50px;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: pulseBadge 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulseBadge {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0,0,0,0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(0,0,0,0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0,0,0,0); }
}

.project-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-image-wrap img {
    transform: scale(1.05);
}

.project-info {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    background: var(--bg-color);
    transition: var(--transition);
}

.project-card:hover .project-info {
    background: var(--text-color);
    color: var(--bg-color);
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
}

/* --- Footer --- */
.footer {
    padding: 4rem 2rem;
    background: var(--bg-color);
}

.footer-top {
    margin-bottom: 6rem;
}

.footer-title-link {
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1px;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.footer-title-link:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 600;
}

/* --- Modal --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: transparent;
    border: none;
    font-family: var(--font-primary);
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    z-index: 1010;
}

.modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 6rem 2rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-header {
    text-align: center;
    margin-bottom: 4rem;
}

.modal-header h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    max-width: 1200px;
    width: 100%;
}

.modal-gallery img, .modal-gallery video {
    width: 100%;
    height: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
    }
    .hero-content {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .project-grid {
        grid-template-columns: 1fr;
    }
    .project-card {
        border-right: none;
    }
    .header-nav {
        display: none;
    }
}

/* --- Splash Screen --- */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.splash-logo {
    width: 150px;
    height: auto;
    border-radius: 50%;
    z-index: 10;
    animation: pulseLogo 2s infinite cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.splash-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0.15; /* Dimmed flashing images */
}

.splash-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    object-fit: cover;
    opacity: 0;
}

.flash-1 { animation: flashImage 0.3s 0.2s forwards; }
.flash-2 { animation: flashImage 0.3s 0.6s forwards; }
.flash-3 { animation: flashImage 0.3s 1.0s forwards; }
.flash-4 { animation: flashImage 0.3s 1.4s forwards; }

@keyframes flashImage {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes pulseLogo {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

/* --- Magnetic Elements --- */
.magnetic {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.4s;
    will-change: transform;
}

/* --- Custom Cursor --- */
@media (pointer: fine) {
    body, a, button, .project-card, .magnetic, .modal-close {
        cursor: none !important;
    }

    .custom-cursor {
        position: fixed;
        top: 0;
        left: 0;
        width: 16px;
        height: 16px;
        background-color: #fff;
        border-radius: 50%;
        pointer-events: none;
        z-index: 10000;
        transform: translate(-50%, -50%);
        transition: width 0.3s ease, height 0.3s ease;
        mix-blend-mode: difference;
    }

    .custom-cursor.hover-active {
        width: 60px;
        height: 60px;
        mix-blend-mode: difference;
    }
}
