/* Fonts & Reset */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-color: #0F0F11;
    --text-color: #FFFFFF;
    --text-muted: #9A9A9A;
    --border-color: rgba(255, 255, 255, 0.1);
    --accent-color: #3B82F6;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: initial;
}

html, body {
    width: 100%;
    min-height: 100%;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-primary);
    overflow-x: hidden;
}

body.loading {
    overflow: hidden;
}

/* Lenis scroll settings */
html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    scroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* --- Preloader Overlay --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background-color: #141517;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.preloader-text-container {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
}

.preloader-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #FFFFFF;
    display: inline-block;
}

.preloader-word {
    font-size: 2.5rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: #FFFFFF;
    margin: 0;
}

.preloader-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    fill: #141517;
}

/* --- Hero Section --- */
.hero-section {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem 4rem;
    position: relative;
}

.nav-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.nav-logo {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.magnetic-nav-item {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    display: inline-block;
    padding: 0.5rem;
    position: relative;
}

.magnetic-nav-item span {
    display: inline-block;
    position: relative;
    z-index: 1;
}

.hero-title-container {
    margin-top: 15vh;
}

.hero-title-sub {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hero-title-main {
    font-size: 8vw;
    font-weight: 750;
    line-height: 0.95;
    letter-spacing: -0.03em;
    color: var(--text-color);
}

.hero-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.hero-scroll-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.indicator-arrow {
    font-size: 1.2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
    60% { transform: translateY(-3px); }
}

/* --- About Section --- */
.about-section {
    width: 100%;
    padding: 10rem 4rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}

.about-container {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    font-size: 2.8vw;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--text-color);
}

.about-globe-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Magnetic Button Wrapper */
.magnetic-wrap {
    display: inline-block;
    position: relative;
    padding: 30px; /* Expands interaction field */
    cursor: pointer;
}

.magnetic-button {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: transparent;
    color: var(--text-color);
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    z-index: 1;
}

.magnetic-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    background-color: var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: -1;
}

.magnetic-button:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

.magnetic-button:hover {
    border-color: var(--accent-color);
}

.big-button {
    width: 160px;
    height: 160px;
}

.contact-button {
    width: 180px;
    height: 180px;
    background-color: #1C1D20;
}

.btn-text {
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;
    pointer-events: none;
}

/* --- Projects Section --- */
.projects-section {
    width: 100%;
    padding: 8rem 4rem 15rem 4rem;
    position: relative;
}

.projects-header {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 4rem auto;
}

.projects-header h2 {
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.projects-list {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.project-item {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 0;
    border-top: 1px solid var(--border-color);
    cursor: pointer;
    position: relative;
    transition: padding 0.3s ease, border-color 0.3s ease;
}

.project-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--text-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.project-item:hover::after {
    transform: scaleX(1);
}

.project-item:hover {
    padding: 2.5rem 1.5rem;
    border-color: transparent;
}

.project-item:last-child {
    border-bottom: 1px solid var(--border-color);
}

.project-info {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.project-number {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.project-title {
    font-size: 3.5vw;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.project-item:hover .project-title {
    transform: translateX(10px);
}

.project-category {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 400;
    transition: opacity 0.3s ease;
}

.project-item:hover .project-category {
    color: var(--text-color);
}

/* Floating Preview Window */
#project-preview-container {
    width: 280px;
    height: 350px;
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 12px;
    overflow: hidden;
    pointer-events: none;
    z-index: 1000;
    transform: scale(0);
    transform-origin: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    background-color: #141517;
}

#project-preview-slider {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1);
}

.preview-slide {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
}

.preview-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Curved Transition Boundary --- */
.curved-boundary-container {
    width: 100%;
    height: 100px;
    position: relative;
    z-index: 10;
    background-color: transparent;
    margin-top: -5px; /* prevent rendering gaps */
}

.curved-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    fill: #1C1D20;
}

/* --- Footer Section --- */
.footer-section {
    width: 100%;
    background-color: #1C1D20;
    padding: 8rem 4rem 4rem 4rem;
    position: relative;
    z-index: 5;
    color: #FFFFFF;
}

.footer-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.footer-header h2 {
    font-size: 6.5vw;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 4rem;
}

.footer-contact-wrap {
    display: flex;
    margin-bottom: 6rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 3rem;
}

.footer-socials {
    display: flex;
    gap: 2rem;
}

.footer-socials .magnetic-nav-item {
    color: #FFFFFF;
}

.footer-copy {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
}

/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
    .hero-section {
        padding: 2rem;
    }
    .hero-title-main {
        font-size: 10vw;
    }
    .about-section {
        padding: 6rem 2rem;
    }
    .about-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .about-text {
        font-size: 5vw;
    }
    .projects-section {
        padding: 6rem 2rem 10rem 2rem;
    }
    .project-title {
        font-size: 5vw;
    }
    .footer-section {
        padding: 6rem 2rem 2rem 2rem;
    }
    .footer-header h2 {
        font-size: 10vw;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 2rem;
        align-items: flex-start;
    }
}

/* --- Infinite Marquee CSS --- */
.hero-marquee-container {
    position: absolute;
    bottom: 12vh;
    left: 0;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
}

.hero-marquee-inner {
    display: inline-flex;
    will-change: transform;
}

.hero-marquee-inner span {
    font-size: 15vw;
    font-weight: 800;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.15); /* Dennis Snellenberg-like stroke */
    padding-right: 2rem;
    white-space: nowrap;
}

/* Ensure hero title stays on top of the marquee */
.hero-title-container {
    position: relative;
    z-index: 2;
}

/* --- Floating Menu Button CSS --- */
.menu-btn-wrap {
    position: fixed;
    top: 35px;
    right: 35px;
    z-index: 999;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.76, 0, 0.24, 1);
}

.menu-btn-wrap.show {
    transform: scale(1);
}

.menu-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #1C1D20;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.menu-btn:hover {
    background-color: var(--accent-color);
}

.hamburger {
    width: 30px;
    height: 8px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger .line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #FFFFFF;
    transition: transform 0.3s ease, top 0.3s ease;
}

.menu-btn.active .hamburger .line:nth-child(1) {
    transform: translateY(3px) rotate(45deg);
}

.menu-btn.active .hamburger .line:nth-child(2) {
    transform: translateY(-3px) rotate(-45deg);
}

/* --- Side Menu CSS --- */
.side-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100dvh;
    background-color: #1C1D20;
    z-index: 998;
    transform: translateX(100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 120px 80px;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
}

.menu-svg {
    position: absolute;
    top: 0;
    left: -99px;
    width: 100px;
    height: 100%;
    fill: #1C1D20;
    pointer-events: none;
}

.side-menu-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.side-menu-header {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
    margin-bottom: 40px;
    letter-spacing: 0.1em;
}

.side-menu-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.menu-link-wrap {
    overflow: hidden;
}

.menu-link {
    display: inline-block;
    font-size: 2.8rem;
    font-weight: 400;
    color: #FFFFFF;
    text-decoration: none;
    transform: translateY(100%);
    opacity: 0;
}

/* --- Custom Cursor Label CSS --- */
#custom-cursor-label {
    position: fixed;
    top: 0;
    left: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: #FFFFFF;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1001;
    transform: translate(-50%, -50%) scale(0);
    will-change: transform;
}
