/* Swiss Minimalism */
:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --font-family-serif: "Times New Roman", Times, serif;
    --padding-screen: 3vw;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family-serif);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: var(--padding-screen);
    font-size: 14px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 2rem;
    position: relative;
}

.header-left,
.header-center,
.header-right {
    flex: 1;
}

.header-left {
    font-weight: normal;
}

.header-center {
    text-align: center;
}

.header-right {
    text-align: right;
}

/* Desktop nav links */
.header a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.header a:hover {
    opacity: 0.6;
}

/* ========================================
   HAMBURGER MENU (CSS-only, mobile only)
   ======================================== */

/* Hidden checkbox drives the toggle */
.menu-toggle {
    display: none;
}

/* Hamburger icon — hidden on desktop */
.hamburger-label {
    display: none;
    cursor: pointer;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 0;
    top: -6px;
    z-index: 1001;
}

.hamburger-icon {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text-color);
    position: relative;
    transition: background-color 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text-color);
    position: absolute;
    transition: transform 0.3s ease, top 0.3s ease;
}

.hamburger-icon::before {
    top: -7px;
}

.hamburger-icon::after {
    top: 7px;
}

/* Animate hamburger → X when checked */
.menu-toggle:checked + .hamburger-label .hamburger-icon {
    background-color: transparent;
}

.menu-toggle:checked + .hamburger-label .hamburger-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-toggle:checked + .hamburger-label .hamburger-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Mobile nav overlay — hidden by default */
.mobile-nav {
    display: none;
}

/* ========================================
   CENTRAL IMAGE AREA
   ======================================== */

.main-content {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.image-container {
    width: 100%;
    /* Safety padding around the image as requested */
    padding: 2rem 4rem;
    display: flex;
    justify-content: center;
}

.main-image {
    max-width: 100%;
    max-height: 70vh;
    /* Keeps image strictly within viewport mostly */
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

/* ========================================
   LINKS
   ======================================== */

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.6;
}

/* ========================================
   ABOUT PAGE
   ======================================== */

.about-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding-top: 2rem;
}

.page-title {
    margin-bottom: 3rem;
    font-size: 14px;
}

.about-image-container {
    width: 100%;
    max-width: 450px;
    min-height: 200px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.about-image {
    max-width: 100%;
    max-height: 45vh;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

.about-text {
    text-align: center;
    max-width: 600px;
    font-size: 13px;
    line-height: 1.6;
}

.about-text p {
    margin-bottom: 1.5rem;
}

/* ========================================
   PORTFOLIO PAGE
   ======================================== */

.portfolio-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding-top: 2rem;
}

.portfolio-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 4rem;
    /* Generous spacing between stacked images */
    margin-bottom: 4rem;
}

.portfolio-image-container {
    width: 100%;
    max-width: 750px;
    min-height: 300px;
    display: flex;
    justify-content: center;
}

.portfolio-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 2rem;
    font-size: 13px;
    color: #444;
    /* Slightly muted for footer to improve hierarchy */
}

.footer-left {
    text-align: left;
    max-width: 50%;
}

.footer-right {
    text-align: right;
    max-width: 50%;
}

.footer a {
    color: #444;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}

.footer a:hover {
    border-bottom-color: #444;
    opacity: 1;
}

/* ========================================
   RESUME / EXPERIENCE SECTIONS
   ======================================== */

.resume-section {
    width: 100%;
    max-width: 600px;
    margin-bottom: 2rem;
}

.resume-section h2 {
    font-size: 14px;
    font-weight: normal;
    margin-bottom: 1rem;
    border-bottom: 1px solid #000;
    padding-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.resume-item-container {
    margin-bottom: 1.5rem;
}

.resume-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.25rem;
}

.resume-role {
    font-weight: bold;
}

.resume-company {
    font-style: italic;
    color: #444;
}

.resume-date {
    font-size: 13px;
    text-align: right;
    white-space: nowrap;
    margin-left: 1rem;
}

.resume-description {
    font-size: 13px;
    line-height: 1.6;
    color: #444;
    text-align: justify;
}

/* ========================================
   RESPONSIVE — TABLET (≤ 768px)
   ======================================== */

@media (max-width: 768px) {
    .image-container {
        padding: 1rem;
    }

    .footer {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        text-align: center;
    }

    .footer-left,
    .footer-right {
        text-align: center;
        max-width: 100%;
    }

    .header {
        font-size: 12px;
    }
}

/* ========================================
   RESPONSIVE — MOBILE (≤ 600px)
   ======================================== */

@media (max-width: 600px) {

    :root {
        --padding-screen: 5vw;
    }

    body {
        font-size: 15px;
    }

    /* --- Hide desktop nav, show hamburger --- */

    .header-center,
    .header-right {
        display: none;
    }

    .header-left {
        flex: none;
    }

    .header {
        font-size: 14px;
        padding-bottom: 1rem;
        flex-wrap: wrap;
    }

    .hamburger-label {
        display: flex;
    }

    /* --- Mobile nav overlay --- */

    .mobile-nav {
        display: block;
        flex-basis: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, opacity 0.3s ease;
        opacity: 0;
        width: 100%;
        background-color: var(--bg-color);
        border-bottom: 1px solid #e0e0e0;
        order: 10;
    }

    .menu-toggle:checked ~ .mobile-nav {
        max-height: 200px;
        opacity: 1;
        margin-top: 0.5rem;
    }

    .mobile-nav ul {
        list-style: none;
        padding: 0.5rem 0;
    }

    .mobile-nav li {
        border-top: 1px solid #f0f0f0;
    }

    .mobile-nav li:first-child {
        border-top: none;
    }

    .mobile-nav a {
        display: flex;
        align-items: center;
        min-height: 48px;
        padding: 0 0.5rem;
        font-size: 15px;
        color: var(--text-color);
        text-decoration: none;
        transition: background-color 0.15s ease;
    }

    .mobile-nav a:hover {
        background-color: #f5f5f5;
        opacity: 1;
    }

    /* --- Image sizing --- */

    .image-container {
        padding: 0.5rem;
    }

    .main-image {
        max-height: 75vh;
    }

    .about-image {
        max-height: 50vh;
    }

    .about-image-container {
        min-height: 150px;
    }

    /* --- Page title --- */

    .page-title {
        margin-bottom: 2rem;
        font-size: 15px;
    }

    /* --- Resume items: stack role & date vertically --- */

    .resume-section {
        margin-bottom: 2.5rem;
    }

    .resume-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.15rem;
    }

    .resume-date {
        text-align: left;
        margin-left: 0;
        font-size: 12px;
        color: #666;
    }

    .resume-item-container {
        margin-bottom: 2rem;
    }

    .resume-description {
        text-align: left;
        font-size: 13px;
    }

    .resume-section h2 {
        margin-bottom: 1.5rem;
    }

    /* --- Footer mobile --- */

    .footer {
        padding-top: 1.5rem;
        margin-top: 1rem;
        border-top: 1px solid #e0e0e0;
        font-size: 12px;
        gap: 0.75rem;
    }

    /* --- About text --- */

    .about-text {
        font-size: 14px;
        padding: 0 0.5rem;
    }

    /* --- Portfolio gallery --- */

    .portfolio-gallery {
        gap: 2.5rem;
        margin-bottom: 2.5rem;
    }

    .portfolio-image-container {
        min-height: 200px;
    }
}