/* =========================
   RESET
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =========================
   VARIABLES
========================= */
:root {
    --space-sm: 20px;
    --space-md: 40px;
    --space-lg: 60px;
    --space-xl: 80px;
    --accent: #df961a;
}

/* =========================
   BASE
========================= */
body {
    font-family: 'Archivo', sans-serif;
    font-size: 17px;
    font-weight: 100;
    background: #1a1917;
    color: #fffdf5;
    line-height: 1.3;
    padding: var(--space-md);
    animation: fadeIn 1s ease-in;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
}

section[id] {
    scroll-margin-top: 60px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* =========================
   HEADER
========================= */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #1a1917;
    margin-bottom: var(--space-xl);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px var(--space-sm);
    border: 2px solid #363430;
    border-bottom: none;
    transition: padding 0.3s ease;
}

.header-content a {
    display: flex;
    align-items: center;
}

.header-content img {
    width: 140px;
    height: auto;
    transition: width 0.3s ease;
}

.header-bottom {
    border: 2px solid #363430;
    border-top: none;
    height: 10px;
    transition: height 0.3s ease;
}

header.header--compact .header-content {
    padding-top: 8px;
    padding-bottom: 8px;
}

header.header--compact .header-content img {
    width: 110px;
}

header.header--compact .header-bottom {
    height: 0;
}

.header-nav {
    display: flex;
    gap: var(--space-sm);
}

.header-nav a {
    color: #fffdf5;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 500;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.header-nav a:hover,
.header-nav a.nav--active {
    color: var(--accent);
}

/* hamburger — hidden on desktop */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    height: 2px;
    background: #fffdf5;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease, background 0.2s ease;
    transform-origin: center;
}

.hamburger:hover span {
    background: var(--accent);
}

/* X state */
.hamburger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.is-open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =========================
   HEADINGS
========================= */
h2 {
    font-size: 3.5rem;
    font-weight: 300;
    text-transform: uppercase;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
    padding-left: 100px;
    margin-bottom: var(--space-lg);
}

h3 {
    font-size: 2rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-color: #fffdf5;
    text-decoration-skip-ink: auto;
    margin-top: var(--space-md);
    margin-bottom: var(--space-sm);
}

#bio,
#game,
#film,
#contact {
    margin-top: 140px;
}

/* =========================
   VIDEO
========================= */
.video-container {
    max-width: 900px;
    margin: 0 auto var(--space-xl);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    border: 1px solid #333;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.video-wrapper iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    border: none;
}

/* =========================
   BIO
========================= */
.main-content {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.content {
    flex: 0 0 50%;
    padding: var(--space-md);
    border: 1px solid #333;
    border-radius: 5px;
}

.content p {
    margin-bottom: var(--space-sm);
}

.content p:last-of-type {
    margin-bottom: 0;
}

.content h3 {
    margin-left: 20px;
}

.content h3 + p {
    margin-top: 5px;
}

.cv-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: var(--space-sm);
}

.highlight {
    color: var(--accent);
    text-decoration: none;
}

.highlight:hover {
    text-decoration: underline;
}

.cv-link {
    font-weight: 500;
    letter-spacing: 0.12em;
    text-decoration: none;
    padding: 6px 16px;
    border: 1.5px solid var(--accent);
    color: var(--accent);
    border-radius: 20px;
    font-size: 0.82rem;
    text-transform: uppercase;
    transition: background 0.2s ease, color 0.2s ease;
}

.cv-link:hover {
    background: var(--accent);
    color: #1a1917;
}

.bio-right {
    flex: 0 0 44%;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.bio-right img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    display: block;
}

/* =========================
   GAMES BOX
========================= */
.games-box {
    padding: 10px 20px;
    border: 1px solid #333;
    border-radius: 5px;
    text-align: center;
    width: 100%;
    cursor: pointer;
}

.games-box summary {
    list-style: none;
    font-size: 2rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-color: #fffdf5;
    text-decoration-skip-ink: auto;
    cursor: pointer;
    user-select: none;
    padding: 2px 0;
    transition: color 0.2s ease;
}

.games-box summary::-webkit-details-marker {
    display: none;
}

.games-box summary::after {
    content: ' ↓';
    font-size: 1.3rem;
    opacity: 0.8;
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.2s ease;
}

.games-box[open] summary::after {
    transform: rotate(180deg);
}

.games-box summary:hover {
    color: var(--accent);
}

.games-box p,
.games-box h3 {
    margin-top: var(--space-sm);
}

/* =========================
   PROJECT BLOCKS
========================= */
.project-subsection {
    display: flex;
    align-items: flex-start;
    margin-bottom: 120px;
}

.project-subsection + .project-subsection {
    border-top: 2px solid var(--accent);
    padding-top: var(--space-lg);
}

.subsection-label {
    writing-mode: vertical-lr;
    font-weight: 500;
    font-size: 2rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0;
    padding-right: var(--space-md);
    flex-shrink: 0;
    overflow: hidden;
    white-space: nowrap;
}

.subsection-content {
    flex: 1;
    border-left: 2px solid #363430;
    padding-left: var(--space-md);
    min-width: 0;
    min-height: 60px;
}

.project-block {
    border-top: 2px solid #363430;
    padding-top: calc(var(--space-md) + 12px);
    padding-bottom: calc(var(--space-md) + 12px);
}

.project-block:last-of-type {
    border-bottom: 2px solid #363430;
}

.project-block-row {
    display: flex;
    align-items: center;
    gap: 24px;
}

.project-block-title {
    flex: 0 0 50%;
}

.project-block-heading {
    margin: 0;
    font-size: 2.4rem;
    font-weight: 900;
}

.project-block-text {
    margin-top: var(--space-sm);
}

.award-badge {
    width: 160px;
    height: auto;
    margin-top: var(--space-sm);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.award-badge-wrap {
    text-align: center;
}

.project-block-video {
    flex: 1;
    min-width: 0;
    max-width: 560px;
}

/* =========================
   CONTACT
========================= */
.contact-section {
    display: flex;
    justify-content: center;
}

.contact-inner {
    display: flex;
    align-items: stretch;
    gap: var(--space-md);
    max-width: 80%;
    width: 100%;
}

.contact-img {
    flex: 1.8 1 0;
    width: 0;
    min-width: 0;
    height: auto;
    border-radius: 5px;
    display: block;
    object-fit: cover;
}

.contact-content {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    padding: var(--space-md);
    border: 1px solid #333;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
}

.contact-content p {
    margin-bottom: var(--space-sm);
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: var(--space-md);
}

.contact-form-wrap {
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid #363430;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.form-group label {
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fffdf5;
    opacity: 0.6;
}

.form-group input,
.form-group textarea {
    background: transparent;
    border: 1px solid #363430;
    border-radius: 4px;
    color: #fffdf5;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 100;
    padding: 8px 12px;
    transition: border-color 0.2s ease;
    resize: none;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #fffdf5;
    opacity: 0.3;
}

.contact-submit {
    align-self: flex-start;
    cursor: pointer;
    background: transparent;
}

.form-status {
    font-size: 0.85rem;
    min-height: 1.2em;
    margin: 0;
}

/* =========================
   RESPONSIVE
========================= */

/* tablet */
@media (max-width: 1024px) {
    h2 {
        padding-left: var(--space-md);
    }

    .project-block-title {
        flex: 0 0 45%;
    }

    .contact-inner {
        max-width: 85%;
    }
}

/* mobile */
@media (max-width: 768px) {
    body {
        padding: var(--space-sm);
    }

    h2 {
        font-size: 2rem;
        padding-left: 0;
    }

    h3 {
        font-size: 1.5rem;
    }

    #bio,
    #game,
    #film,
    #contact {
        margin-top: 80px;
    }

    /* header */
    .header-content img {
        width: 100px;
    }

    /* hamburger visible on mobile */
    .hamburger {
        display: flex;
    }

    /* fullscreen nav overlay */
    .header-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #1a1917;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: var(--space-lg);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.25s ease;
        pointer-events: none;
    }

    .header-nav.nav--open {
        display: flex;
        opacity: 1;
        pointer-events: auto;
    }

    .header-nav a {
        font-size: 2.2rem;
        letter-spacing: 0.1em;
    }

    /* bio */
    .main-content {
        flex-direction: column;
    }

    .content {
        flex: 1;
        width: 100%;
    }

    .bio-right {
        flex: 1;
        width: 100%;
    }

    /* project blocks */
    .project-subsection {
        flex-direction: column;
        margin-bottom: 60px;
    }

    .subsection-label {
        display: none;
    }

    .subsection-content {
        border-left: none;
        padding-left: 0;
    }

    .project-block-row {
        flex-direction: column;
    }

    .project-block-title,
    .project-block-video {
        flex: 1;
        width: 100%;
        max-width: 100%;
    }

    /* video container */
    .video-container {
        margin-bottom: var(--space-md);
    }

    /* contact */
    .contact-inner {
        flex-direction: column;
        max-width: 100%;
    }

    .contact-img {
        flex: 1;
        width: 100%;
    }

    .contact-content {
        flex: 1;
        width: 100%;
    }

    .form-row {
        flex-direction: column;
    }
}

/* small mobile */
@media (max-width: 480px) {
    .header-nav a {
        font-size: 0.85rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    .project-block-heading {
        font-size: 1.6rem;
    }
}
