:root {
    --ink: #ff4d00;
    --bg: #ffffff;
    --line: #e4e4e4;
    --muted: #8a8a8a;
    --dark: #000000dd;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--ink) var(--bg);
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: Trebuchet MS, 'Helvetica Neue', Arial, sans-serif;
    align-items: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Top tab nav --- */
nav {
    display: flex;
    justify-content: center;
    width: 100%;
    gap: clamp(1.5rem, 4vw, 3rem);
    padding: 1rem 1rem;
    border-bottom: 1px solid var(--line);
}

nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding-top: 0.35rem;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.nav_logo {
    position: relative;
    top: -3px;
    width: 23px;
    height: auto;
}


nav a:hover,
nav a:focus-visible {
    color: var(--ink);
    border-color: var(--ink);
}

/* --- Main --- */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6vh 5vw;

}

.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 75vh;
    aspect-ratio: 1 / 1;
}

.media-frame {
    width: 100%;
    height: 100%;
    /* border: 1px solid var(--line);
    border-radius: 50%; */
    /* background: #fafafa; */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    opacity: 1;
}

.media-frame img,
.media-frame video {
    width: 100%;
    height: 100%;
    border: 1px solid var(--line);
    border-radius: 50%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.2;
}

.media-placeholder {
    color: var(--muted);
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    text-align: center;
    z-index: -1;
    /* padding: 1rem; */
}

/* .logo_holder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 200px;
    border: 5px solid black;
    border-radius: 100%;
} */

.main_logo {
    width: clamp(75px, 5vw, 5vw);
    height: auto;
    padding-bottom: 1rem;
}

/* Brand mark sits in front of the media */
.brand {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(1.6rem, 10vw, 2.6rem);
    font-family: Trebuchet MS, Helvetica, sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--dark);
    /* color: #000000; */
    /* mix-blend-mode: difference; */
    mix-blend-mode: normal;
    pointer-events: none;
    white-space: nowrap;
    justify-content: center;
}

.brand span {
    font-weight: 400;
}

.circle_cursor {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid var(--ink);
    border-radius: 50%;
    top: -20px;
    left: -20px;
    pointer-events: none;
    will-change: transform;
    z-index: 9999;
}

/* --- Gallery --- */
h1 {
    position: relative;
    text-align: center;
    margin-bottom: 3rem;
    font-family: Trebuchet MS, Helvetica, sans-serif;
    font-size: clamp(1rem, 4vw, 1.6rem);
    text-transform: uppercase;
    color: var(--dark);

    small {
        display: block;
        font-size: 15px;
        padding-top: 8px;
        color: gray;
    }
}

h2 {
    font-family: "Trebuchet MS", Helvetica, sans-serif;
    text-overflow: clip;
    font-size: 24px;
    text-transform: uppercase;
    margin-bottom: 2px;
    margin-top: 0;
}

h2,
.item p {
    opacity: 0;
    color: var(--dark);
}

.gallery_container {
    padding: 75px 0;
    margin: 0 auto;
    width: min(1140px, 80vw);
}

.gallery-wrap {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 70vh;
    border-radius: 40px;
    overflow: hidden;
    contain: layout paint;
}

.item {
    position: relative;
    flex: 1 1 0;
    padding: 30px;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
    transition: flex 0.7s ease;
    cursor: default;

    &:hover {
        flex: 7;
    }

    &:hover h2,
    &:hover p {
        opacity: 1;
        transition: opacity 1.9s ease;
    }
}

.item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    pointer-events: none;
}

.item-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    box-sizing: border-box;
}

/* --- Contact --- */
.contact {
    padding: 5rem;
    text-align: center;
    color: var(--muted);
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.contact a {
    color: var(--ink);
    text-decoration: none;

    &:hover {
        text-decoration: underline;
        color: var(--ink);
    }
}

/* --- Social row + footer --- */
.social {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    padding-bottom: 1rem;
}

.social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--ink);
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.social a:hover,
.social a:focus-visible {
    opacity: 1;
}

.social svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    padding-bottom: 2rem;
}

canvas {
    width: 70vmin;
    height: 70vmin;
}

#scene {
    position: absolute;
    z-index: -1;
}

#myCanvasTool {

    position: relative;
}

/* 3. Independent Biography Style */
.biografy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: left;
    color: var(--dark);
    width: 100%;
    max-width: clamp(300px, 80vw, 600px);
    margin-bottom: 18vh;
    /* Space between bio text and form */
}

/* --- Mobile: square media instead of rectangle --- */
@media (max-width: 600px) {
    nav {
        padding: 0.5rem 1rem;
    }

    .hero {
        height: auto;
        aspect-ratio: 1 / 1;
        width: min(420px, 90vw);
    }

    .brand {
        font-size: clamp(1rem, 4vw, 2.6rem);
    }

    .media-frame img,
    .media-frame video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .main_logo {
        width: 75px;
        height: auto;
        padding-bottom: 1rem;
    }

    .gallery_container {
        padding: 75px 0;
        margin: 0 auto;
        width: min(420px, 90vw);
    }

    h1 {
        margin-bottom: 0.5rem;
        font-family: Trebuchet MS, Helvetica, sans-serif;
        font-size: 1rem;
        text-transform: uppercase;
        color: var(--dark);
    }

    h2 {
        font-size: 1rem;
    }

    p {
        font-size: 0.8rem;
    }

    .gallery-wrap {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 70vh;
    }

}