/* ========================
   FONT FACE
   ======================== */

@font-face {
    font-family: 'NHaasGrotesk';
    src: url('../assets/fonts/NHaasGroteskDSPro-45Lt.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NHaasGrotesk';
    src: url('../assets/fonts/NHaasGroteskDSPro-55Rg.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NHaasGrotesk';
    src: url('../assets/fonts/NHaasGroteskDSPro-65Md.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NHaasGrotesk';
    src: url('../assets/fonts/NHaasGroteskDSPro-75Bd.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ========================
   RESET
   ======================== */

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

:root {
    --primary: rgba(0, 0, 0, 0.85);
    --secondary: rgba(0, 0, 0, 0.42);
    --muted: rgba(0, 0, 0, 0.32);
    --bg: #ffffff;
    --text: #000000;
    --font: 'NHaasGrotesk', 'Neue Haas Grotesk Display Pro', Helvetica, Arial, sans-serif;
}

html, body {
    height: 100%;
    font-family: var(--font);
    font-weight: 400;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    cursor: none;
}

/* Cursor trail canvas */
.cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
}

body.loaded {
    overflow: auto;
}

/* ========================
   PAGE TRANSITION OVERLAY
   ======================== */

.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.page-transition.active {
    opacity: 1;
    pointer-events: all;
}

/* Loader removed — site lands directly on home. */

/* ========================
   MAIN SITE
   ======================== */

.site {
    /* Always visible — children (nav, home-center) handle their own reveal
       transitions via the .site.visible parent class. */
}

/* ========================
   HOMEPAGE
   ======================== */

.home {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* --- Nav --- */
.nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 13px;
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
    white-space: nowrap;
}

.nav-link {
    font-family: var(--font);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.144;
    letter-spacing: 0;
    color: var(--primary);
    text-decoration: none;
    position: relative;
    transition: opacity 0.2s ease;
}

.nav-link:hover {
    text-decoration: underline;
    text-decoration-color: var(--primary);
}

/* --- Index Dropdown --- */
.nav-dropdown {
    position: relative;
    display: inline-flex;
}

.nav-index-trigger {
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: -8px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    min-width: 140px;
    background: var(--bg);
    border: 0.5px solid var(--secondary);
    z-index: 101;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-item {
    display: block;
    font-family: var(--font);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.144;
    letter-spacing: 0;
    color: var(--primary);
    text-decoration: none;
    padding: 4px 0;
    transition: opacity 0.1s ease;
}

.dropdown-item:hover {
    opacity: 0.55;
}

.dropdown-discipline {
    display: none;
}

/* --- Toggle --- */
.toggle {
    width: 48px;
    height: 16px;
    border-radius: 30px;
    border: 1px solid var(--primary);
    background: transparent;
    cursor: pointer;
    position: relative;
    padding: 0;
    transition: border-color 0.3s ease;
}

.toggle-dot {
    position: absolute;
    top: 2px;
    left: 3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toggle.active .toggle-dot {
    left: 33px;
}

/* --- Home Center — statement with vertical slide + info --- */
.home-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-45%, -50%);
    display: flex;
    align-items: flex-start;
    gap: 28px;
}

/* Statement — blur dissolve */
.statement-wrapper {
    flex-shrink: 0;
}

.statement {
    font-family: var(--font);
    font-size: 34px;
    font-weight: 400;
    line-height: 1.07;
    letter-spacing: -0.34px;
    color: var(--primary);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.32s ease;
}

.statement.show {
    opacity: 1;
}

.home-info {
    padding-top: 2px;
    flex-shrink: 0;
}

.info-name {
    font-family: var(--font);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.144;
    letter-spacing: 0;
    color: var(--secondary);
    white-space: nowrap;
    text-decoration: none;
}

.info-timestamp {
    font-family: var(--font);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.144;
    letter-spacing: 0;
    color: var(--secondary);
    white-space: nowrap;
    margin-top: 2px;
}

/* ========================
   ACCESSIBILITY — focus rings + reduced motion
   ======================== */

.nav-link:focus-visible,
.dropdown-item:focus-visible,
.next-project:focus-visible,
.info-name:focus-visible {
    outline: 1.5px solid var(--primary);
    outline-offset: 3px;
    border-radius: 2px;
}

.toggle:focus-visible {
    outline: 1.5px solid var(--primary);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .cursor-trail { display: none !important; }
}

/* ========================
   DARK MODE
   ======================== */

body.dark {
    --primary: rgba(255, 255, 255, 0.85);
    --secondary: rgba(255, 255, 255, 0.42);
    --muted: rgba(255, 255, 255, 0.32);
    --bg: #0a0a0a;
    --text: #ffffff;
}

body.dark .loader {
    background: var(--bg);
}

/* ========================
   MOBILE
   ======================== */

@media (max-width: 768px) {

    html, body {
        cursor: auto;
    }

    .cursor-trail {
        display: none !important;
    }

    .nav {
        padding: 10px 12px;
    }

    .nav-left {
        gap: 12px;
    }

    .nav-link {
        font-size: 12px;
    }

    .toggle {
        width: 40px;
        height: 14px;
    }

    .toggle-dot {
        width: 8px;
        height: 8px;
        top: 2px;
        left: 3px;
    }

    .toggle.active .toggle-dot {
        left: 27px;
    }

    .home-center {
        left: 12px;
        right: 12px;
        top: auto;
        bottom: 20%;
        transform: none;
        flex-direction: column;
        gap: 12px;
        width: calc(100% - 24px);
    }

    .statement {
        font-size: 22px;
    }

    .home-info {
        padding-top: 0;
    }

    .info-name,
    .info-timestamp {
        font-size: 10px;
    }

    .dropdown-menu {
        min-width: 160px;
    }

    .dropdown-item {
        font-size: 11px;
        padding: 4px 0;
    }
}
