/* =============================================
   RESET & ROOT
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --black:    #000000;
    --dark:     #0d0d0d;
    --darker:   #080808;
    --white:    #ffffff;
    --w60:      rgba(255,255,255,0.60);
    --w40:      rgba(255,255,255,0.40);
    --w25:      rgba(255,255,255,0.25);
    --w15:      rgba(255,255,255,0.15);
    --w08:      rgba(255,255,255,0.08);
    --w05:      rgba(255,255,255,0.05);
    --border:   rgba(255,255,255,0.08);

    --mono: 'IBM Plex Mono', 'Courier New', monospace;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --nav-h:  56px;
    --pad-x:  48px;
    --sec-py: 140px;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--black);
    color: var(--white);
    font-family: var(--sans);
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    cursor: none;
}

img   { max-width: 100%; display: block; }
a     { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: none; color: inherit; }

section[id] {
    scroll-margin-top: var(--nav-h);
}

/* =============================================
   CUSTOM CURSOR
   ============================================= */
#cursor {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--white);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    will-change: left, top;
}

#cursor-ring {
    position: fixed;
    width: 30px;
    height: 30px;
    border: 1px solid var(--w40);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease;
    will-change: left, top;
}

body.cursor-hover #cursor-ring {
    width: 48px;
    height: 48px;
    border-color: var(--white);
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
    opacity: 0;
    transform: translateY(28px);
    animation: fadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--d, 0s);
}

.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0s);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   NAVIGATION
   ============================================= */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 500;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--pad-x);
    border-bottom: 1px solid var(--border);
    background: rgba(0,0,0,0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: border-color 0.4s;
}

.nav-logo {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.5; }

.nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 36px;
}

.nav-links a {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    color: var(--w60);
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }

.nav-right {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-social {
    display: flex;
    gap: 22px;
}

.nav-social a {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: var(--w40);
    transition: color 0.2s;
}
.nav-social a:hover { color: var(--white); }

.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 22px;
    padding: 4px 0;
}

.nav-burger span {
    display: block;
    width: 100%;
    height: 1px;
    background: var(--w60);
    transition: transform 0.3s, opacity 0.3s, background 0.2s;
}

.nav-burger.open span:first-child {
    transform: translateY(6px) rotate(45deg);
    background: var(--white);
}
.nav-burger.open span:last-child {
    transform: translateY(-6px) rotate(-45deg);
    background: var(--white);
}

/* =============================================
   MOBILE MENU
   ============================================= */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 490;
    background: var(--black);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 80px var(--pad-x);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 64px;
}

.mobile-link {
    font-family: var(--mono);
    font-size: clamp(36px, 8vw, 56px);
    font-weight: 700;
    color: var(--w25);
    transition: color 0.2s;
    line-height: 1.15;
}
.mobile-link:hover { color: var(--white); }

.mobile-social {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mobile-social a {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--w40);
    transition: color 0.2s;
}
.mobile-social a:hover { color: var(--white); }

/* =============================================
   HERO
   ============================================= */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--nav-h) + 80px) var(--pad-x) 80px;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--w25);
    text-transform: uppercase;
    margin-bottom: 36px;
}

.sep {
    color: var(--w15);
}

.hero-name {
    font-family: var(--mono);
    font-size: clamp(64px, 11.5vw, 148px);
    font-weight: 700;
    line-height: 0.93;
    letter-spacing: -0.025em;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    margin-bottom: 44px;
}

.hero-name-line {
    display: block;
}

.hero-name-dim {
    color: var(--w40);
}

.hero-roles {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: var(--mono);
    font-size: clamp(12px, 1.3vw, 16px);
    font-weight: 500;
    letter-spacing: 0.22em;
    color: var(--w40);
    text-transform: uppercase;
}

.hero-scroll {
    position: absolute;
    bottom: 44px;
    left: var(--pad-x);
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.28em;
    color: var(--w25);
    text-transform: uppercase;
}

.scroll-line {
    width: 48px;
    height: 1px;
    background: var(--w15);
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: var(--w60);
    transform: translateX(-100%);
    animation: scrollLine 2.4s ease-in-out 1.2s infinite;
}

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

/* =============================================
   HERO PHOTO GRID
   ============================================= */
.hero-photos {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-photos-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.82) 0%,
        rgba(0,0,0,0.52) 30%,
        rgba(0,0,0,0.52) 70%,
        rgba(0,0,0,0.82) 100%
    );
    pointer-events: none;
}

.hero-photos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    position: relative;
    z-index: 1;
}

.photo-col {
    display: flex;
    flex-direction: column;
    will-change: transform;
}

.photo-col img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
    filter: brightness(0.75) saturate(0.8);
    margin-bottom: 3px;
}


.hero-inner {
    position: relative;
    z-index: 1;
}

/* =============================================
   SECTION SHARED
   ============================================= */
section {
    padding: var(--sec-py) var(--pad-x);
    border-top: 1px solid var(--border);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 72px;
}

.section-label {
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.28em;
    color: var(--w25);
    text-transform: uppercase;
    white-space: nowrap;
}

.section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* =============================================
   PROJECTS GRID
   ============================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    background: var(--w08);
}

.project-card {
    background: var(--black);
    cursor: none;
    transition: opacity 0.3s;
}

.project-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--dark);
}

.project-thumb-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #111 0%, #0a0a0a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-thumb-bg .thumb-fallback-text {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--w15);
    text-align: center;
    padding: 16px;
}

.project-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.4s ease;
    filter: brightness(0.8) saturate(0.9);
}

.project-thumb img.loaded {
    filter: brightness(0.82) saturate(0.85);
}

.project-card:hover .project-thumb img {
    transform: scale(1.05);
    filter: brightness(0.6) saturate(0.8);
}

.project-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 3;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-overlay-btn {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.22em;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.45);
    padding: 11px 22px;
    transition: border-color 0.2s, background 0.2s;
}

.project-overlay-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--white);
}

.project-num {
    position: absolute;
    top: 14px;
    left: 18px;
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.45);
    z-index: 2;
}

.project-info {
    padding: 20px 22px 26px;
    border-top: 1px solid var(--border);
}

.project-title {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--white);
    line-height: 1.4;
    margin-bottom: 7px;
}

.project-sub {
    font-size: 11px;
    color: var(--w40);
    margin-bottom: 10px;
    line-height: 1.4;
}

.project-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.project-cat {
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.18em;
    color: var(--w40);
    text-transform: uppercase;
}

.project-role-tag {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    color: var(--w20);
    text-transform: uppercase;
}

.tag-sep {
    font-size: 9px;
    color: var(--w15);
}

/* =============================================
   OVERFLOW HEADER
   ============================================= */
.overflow-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 64px;
}

.overflow-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* =============================================
   ALL WORK LIST
   ============================================= */
.all-work-list {
    display: flex;
    flex-direction: column;
}

.work-item {
    display: grid;
    grid-template-columns: 48px 1fr 160px;
    align-items: center;
    gap: 24px;
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
    transition: opacity 0.25s;
}

.work-item:first-child {
    border-top: 1px solid var(--border);
}

.work-item:hover { opacity: 0.5; }

.work-num {
    font-family: var(--mono);
    font-size: 9px;
    color: var(--w20);
    letter-spacing: 0.1em;
}

.work-title-wrap { min-width: 0; }

.work-title {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--white);
    line-height: 1.3;
}

.work-sub {
    font-size: 11px;
    color: var(--w40);
    margin-top: 3px;
}

.work-cat {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.16em;
    color: var(--w30);
    text-transform: uppercase;
    text-align: right;
}

/* =============================================
   ABOUT
   ============================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 80px;
    align-items: start;
}

.about-bio {
    font-size: 17px;
    font-weight: 300;
    line-height: 1.85;
    color: var(--w60);
    margin-bottom: 28px;
}

.about-bio em {
    color: var(--white);
    font-style: italic;
}

.about-bio:last-child { margin-bottom: 0; }

.about-details {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
}

.detail-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
}

.detail-row:last-child { border-bottom: none; }

.detail-label {
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.22em;
    color: var(--w25);
    text-transform: uppercase;
}

.detail-val {
    font-size: 13px;
    color: var(--w60);
    line-height: 1.6;
}

/* =============================================
   CONTACT
   ============================================= */
.contact-links {
    display: flex;
    flex-direction: column;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
    transition: padding-left 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.2s;
}

.contact-link:first-child { border-top: 1px solid var(--border); }

.contact-link:hover {
    padding-left: 20px;
}

.contact-link-label {
    font-family: var(--mono);
    font-size: clamp(24px, 4.5vw, 60px);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--w25);
    transition: color 0.3s;
    line-height: 1;
}

.contact-link:hover .contact-link-label {
    color: var(--white);
}

.contact-link-arrow {
    font-family: var(--mono);
    font-size: clamp(16px, 2.5vw, 28px);
    color: var(--w15);
    transition: color 0.3s, transform 0.3s;
    line-height: 1;
}

.contact-link:hover .contact-link-arrow {
    color: var(--white);
    transform: translateX(8px);
}

/* =============================================
   FOOTER
   ============================================= */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px var(--pad-x);
    border-top: 1px solid var(--border);
}

.footer-name {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.16em;
    color: var(--w25);
}

.footer-copy {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--w15);
}

/* =============================================
   VIDEO MODAL
   ============================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.96);
    z-index: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--nav-h) var(--pad-x) 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal.open {
    opacity: 1;
    pointer-events: all;
}

.modal-close {
    position: fixed;
    top: 18px;
    right: var(--pad-x);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--w60);
    transition: color 0.2s;
    z-index: 10;
}

.modal-close:hover { color: var(--white); }

.modal-body {
    width: 100%;
    max-width: 1200px;
}

.modal-video-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--dark);
    overflow: hidden;
}

.modal-video-wrap iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.modal-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.modal-title-text {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--white);
}

.modal-cat {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.18em;
    color: var(--w40);
    text-transform: uppercase;
}

.modal-external {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.18em;
    color: var(--w40);
    text-transform: uppercase;
    margin-left: auto;
    border-bottom: 1px solid var(--w15);
    padding-bottom: 1px;
    transition: color 0.2s, border-color 0.2s;
}

.modal-external:hover {
    color: var(--white);
    border-color: var(--w60);
}

/* =============================================
   PHOTOGRAPHY INDEX
   ============================================= */
.photo-index-section {
    padding-top: calc(var(--nav-h) + var(--sec-py));
    border-top: none;
}

.photo-projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    background: var(--w08);
}

.photo-project {
    background: var(--black);
    display: block;
    text-decoration: none;
}

.photo-project-thumb {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--dark);
}

.photo-project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.4s ease;
    filter: brightness(0.82) saturate(0.85);
}

.photo-project:hover .photo-project-thumb img {
    transform: scale(1.04);
    filter: brightness(0.62) saturate(0.8);
}

.photo-project-num {
    position: absolute;
    top: 14px;
    left: 18px;
    font-family: var(--mono);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.45);
    z-index: 2;
}

.photo-project-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 3;
}

.photo-project:hover .photo-project-overlay { opacity: 1; }

.photo-project-overlay span {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.22em;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.45);
    padding: 11px 22px;
    transition: border-color 0.2s;
}

.photo-project:hover .photo-project-overlay span {
    border-color: var(--white);
}

.photo-project-info {
    padding: 20px 22px 26px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.photo-project-title {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--white);
    line-height: 1.4;
}

.photo-project-meta {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.16em;
    color: var(--w40);
    text-transform: uppercase;
    flex-shrink: 0;
}

/* =============================================
   RESPONSIVE — TABLET
   ============================================= */
@media (max-width: 1100px) {
    :root {
        --pad-x:  36px;
        --sec-py: 110px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 56px;
    }

    .about-details {
        max-width: 480px;
    }
}

@media (max-width: 860px) {
    :root {
        --pad-x:  28px;
        --sec-py: 88px;
    }

    .nav-links { display: none; }

    .nav-burger { display: flex; }

    .projects-grid,
    .photo-projects-grid {
        grid-template-columns: 1fr;
    }

    .work-item {
        grid-template-columns: 36px 1fr;
    }

    .work-cat { display: none; }

    .hero-name {
        font-size: clamp(52px, 15vw, 96px);
    }
}

@media (max-width: 600px) {
    :root {
        --pad-x:  20px;
        --sec-py: 72px;
        --nav-h:  52px;
    }

    .nav-social { display: none; }

    .section-header { margin-bottom: 48px; }

    .about-bio { font-size: 15px; }

    .modal {
        padding: var(--nav-h) var(--pad-x) 24px;
    }

    .contact-link { padding: 20px 0; }

    footer {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    body { cursor: auto; }
    #cursor, #cursor-ring { display: none; }
}
