/* ===========================
   CSS Custom Properties
   =========================== */
:root {
    --color-bg: #000;
    --color-text: #fff;
    --color-text-muted: #999;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --spacing-section: 10vh;
    --spacing-gallery: 6vh;
    --max-width-photo: 960px;
    --nav-height: 56px;
    --transition-speed: 0.3s;
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-family);
    font-size: clamp(14px, 1.5vw, 16px);
    line-height: 1.6;
    overflow-x: hidden;
}

body {
    background-color: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--color-text);
    text-decoration: none;
}

:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 4px;
}

/* ===========================
   Navigation — Top bar
   =========================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 clamp(1rem, 4vw, 2.5rem);
    height: var(--nav-height);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav__logo {
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    z-index: 101;
    white-space: nowrap;
}

.nav__links {
    display: none;
    gap: 2rem;
    align-items: center;
    margin-left: auto;
}

.nav__links a {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.9;
    transition: opacity var(--transition-speed);
}

.nav__links a:hover {
    opacity: 1;
}

.nav__instagram {
    display: flex;
    align-items: center;
    opacity: 0.5;
    transition: opacity var(--transition-speed);
}

.nav__instagram:hover {
    opacity: 1;
}

/* Hamburger */
.nav__hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 101;
    margin-left: auto;
}

.nav__hamburger span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--color-text);
    transition: transform var(--transition-speed), opacity var(--transition-speed);
    margin-left: auto;
}

.nav__hamburger.active span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.nav__hamburger.active span:nth-child(2) {
    opacity: 0;
}

.nav__hamburger.active span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* Fullscreen nav overlay */
.nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.nav-overlay.open {
    opacity: 1;
    visibility: visible;
}

.nav-overlay__links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.nav-overlay__links a {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.6;
    transition: opacity var(--transition-speed);
}

.nav-overlay__links a:hover {
    opacity: 1;
}

/* Desktop: show inline links, hide hamburger */
@media (min-width: 768px) {
    .nav__links {
        display: flex;
    }

    .nav__hamburger {
        display: none;
    }
}

/* ===========================
   Hero Section
   Full-bleed best photo with name overlay
   =========================== */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.15) 0%,
        rgba(0, 0, 0, 0.35) 60%,
        rgba(0, 0, 0, 0.6) 100%
    );
}

.hero__content {
    position: relative;
    text-align: center;
    z-index: 1;
}

.hero__title {
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1.5s ease-out forwards;
}

.hero__subtitle {
    font-size: clamp(0.75rem, 1.8vw, 1rem);
    font-weight: 300;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-top: 0.75rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 1.5s ease-out 0.3s forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll indicator */
.hero__scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    color: var(--color-text);
    opacity: 0.5;
    animation: bounce 2.5s ease-in-out infinite;
    transition: opacity var(--transition-speed);
}

.hero__scroll:hover {
    opacity: 1;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* ===========================
   Portfolio / Gallery
   Full-bleed vertical scroll like Franklin Yeep
   =========================== */
.portfolio {
    padding: calc(var(--nav-height) + 0.75rem) 0 var(--spacing-section);
}


.portfolio__heading {
    font-size: clamp(0.7rem, 1.3vw, 0.8rem);
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: clamp(1.5rem, 3vw, 3rem);
}

.portfolio__gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(12px, 3vw, 40px);
    padding: 0 clamp(12px, 3vw, 40px);
}

/* Landscape: single column, two images visible per screen */
.portfolio__gallery.portfolio__gallery--landscape {
    grid-template-columns: 1fr;
    max-width: 1400px;
    margin: 0 auto;
    gap: clamp(24px, 5vw, 60px);
    padding: 0 clamp(24px, 5vw, 60px);
}

.portfolio__gallery--landscape .portfolio__item {
    height: calc(100vh - var(--nav-height) - clamp(48px, 10vw, 120px));
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio__gallery--landscape .portfolio__item img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
}


.portfolio__item {
    overflow: hidden;
}

.portfolio__item img {
    width: 100%;
    height: 100%;
    max-height: 85vh;
    object-fit: cover;
    cursor: pointer;
    transition: transform var(--transition-speed) ease, opacity var(--transition-speed);
}

/* Fade-in on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hover effect: only dim when hovering an actual photo, not the gap */
.portfolio__gallery {
    pointer-events: none;
}

.portfolio__item {
    pointer-events: auto;
}

.portfolio__gallery:has(.portfolio__item:hover) .portfolio__item {
    opacity: 0.4;
    transition: opacity 0.4s ease;
}

.portfolio__gallery:has(.portfolio__item:hover) .portfolio__item:hover {
    opacity: 1;
}

/* Keep fade-in items that haven't appeared yet unaffected */
.portfolio__gallery:hover .fade-in:not(.visible) {
    opacity: 0;
}

@media (min-width: 768px) {
    .portfolio__gallery {
        gap: clamp(20px, 3vw, 40px);
        padding: 0 clamp(20px, 3vw, 40px);
    }
}

/* ===========================
   About Section
   =========================== */
.about {
    padding: var(--spacing-section) clamp(1.25rem, 4vw, 3rem);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.about__inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.about__portrait {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.about__portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about__text {
    text-align: center;
}

.about__text h2 {
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    color: var(--color-text-muted);
}

.about__text p {
    font-weight: 300;
    line-height: 1.9;
    color: var(--color-text-muted);
    max-width: 460px;
    margin: 0 auto 1rem;
}

.about__text p:last-child {
    margin-bottom: 0;
}

.about__bio {
    font-weight: 300;
    line-height: 1.9;
    color: var(--color-text-muted);
    max-width: 460px;
    text-align: center;
}

/* ===========================
   Contact Section
   =========================== */
.contact {
    padding: var(--spacing-section) clamp(1.25rem, 4vw, 3rem);
    text-align: center;
}

.contact h2 {
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    color: var(--color-text-muted);
}

.contact p {
    font-weight: 300;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.contact__email {
    display: inline-block;
    font-size: clamp(0.875rem, 2vw, 1.125rem);
    font-weight: 400;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

/* ===========================
   Footer
   =========================== */
.footer {
    padding: 3rem 1.25rem;
    text-align: center;
    font-size: 0.65rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.8;
}

.footer__instagram {
    display: inline-block;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.75rem;
    transition: color var(--transition-speed);
}

.footer__instagram:hover {
    color: var(--color-text);
}

/* ===========================
   Lightbox
   =========================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    cursor: pointer;
}

.lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lightbox__close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 2rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity var(--transition-speed);
}

.lightbox__close:hover {
    opacity: 1;
}

.lightbox__img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    cursor: default;
}
