/* ============================================================
   Ioana Petcu Portfolio — main.css
   ============================================================ */

/* ── ABC Favorit Edu — @font-face ─────────────────────────── */
@font-face {
    font-family: 'ABCFavoritEdu';
    src: url('../fonts/ABCFavoritEdu-Regular.woff2') format('woff2'),
         url('../fonts/ABCFavoritEdu-Regular.woff')  format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: block;
}
@font-face {
    font-family: 'ABCFavoritEdu';
    src: url('../fonts/ABCFavoritEdu-RegularItalic.woff2') format('woff2'),
         url('../fonts/ABCFavoritEdu-RegularItalic.woff')  format('woff');
    font-weight: 400;
    font-style: italic;
    font-display: block;
}
@font-face {
    font-family: 'ABCFavoritEdu';
    src: url('../fonts/ABCFavoritEdu-Medium.woff2') format('woff2'),
         url('../fonts/ABCFavoritEdu-Medium.woff')  format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: block;
}
@font-face {
    font-family: 'ABCFavoritEdu';
    src: url('../fonts/ABCFavoritEdu-Bold.woff2') format('woff2'),
         url('../fonts/ABCFavoritEdu-Bold.woff')  format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: block;
}
@font-face {
    font-family: 'ABCFavoritEdu';
    src: url('../fonts/ABCFavoritEdu-Extrabold.woff2') format('woff2'),
         url('../fonts/ABCFavoritEdu-Extrabold.woff')  format('woff');
    font-weight: 800;
    font-style: normal;
    font-display: block;
}
@font-face {
    font-family: 'ABCFavoritEdu';
    src: url('../fonts/ABCFavoritEdu-Black.woff2') format('woff2'),
         url('../fonts/ABCFavoritEdu-Black.woff')  format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: block;
}
@font-face {
    font-family: 'ABCFavoritEdu';
    src: url('../fonts/ABCFavoritEdu-Book.woff2') format('woff2'),
         url('../fonts/ABCFavoritEdu-Book.woff')  format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: block;
}
@font-face {
    font-family: 'ABCFavoritEdu';
    src: url('../fonts/ABCFavoritEdu-Light.woff2') format('woff2'),
         url('../fonts/ABCFavoritEdu-Light.woff')  format('woff');
    font-weight: 200;
    font-style: normal;
    font-display: block;
}

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

html, body {
    width: 100%;
    background: #000;
    color: #fff;
    font-family: 'ABCFavoritEdu', Helvetica, Arial, sans-serif;
    font-weight: 400;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* ── Nav bar ───────────────────────────────────────────────── */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 44px;
    z-index: 100;
    background: #000;
    display: flex;
    align-items: center;
}

.site-nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.4rem;
}

.nav-primary {
    list-style: none;
    display: flex;
    gap: clamp(0.8rem, 1.5vw, 2rem);
}

.nav-primary a,
.nav-languages {
    font-family: 'ABCFavoritEdu', Helvetica, Arial, sans-serif;
    font-size: clamp(13px, 1.2vw, 18px);
    font-weight: 400;
    color: #fff;
    text-decoration: none;
}

.nav-primary a:hover,
.nav-primary a.current-menu-item { opacity: 0.45; }

.nav-languages { display: flex; align-items: center; }
.nav-languages a:hover { opacity: 0.45; }
.lang-sep { opacity: 0.4; margin: 0 0.05em; }

/* Hamburger — hidden on desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Site main ─────────────────────────────────────────────── */
.site-main {
    padding-top: 44px; /* clear the fixed nav on all pages */
}

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
    padding: 2rem 1.5rem;
    font-size: 14px;
    opacity: 0.3;
}

/* ============================================================
   SECTION 1 — BIO
   Full viewport height. Bio text pinned to bottom.
   ============================================================ */

.bio-section {
    height: calc(100dvh - 44px); /* full screen minus nav (site-main adds the 44px) */
    padding-left: 10mm;          /* match grid exterior margin */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 2rem;
    overflow: hidden;
}

/* Bio text */
.bio-para {
    width: 100%;
    font-size: clamp(16px, 2.2vw, 44px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.01em;
}

/* Space between the two paragraphs */
.bio-para--gap {
    margin-top: 5em;
}

/* One row — chunks never wrap */
.bio-line {
    position: relative;
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    width: 100%;
    overflow: hidden;
}

/* Each word chunk — margin-left driven by main.js */
.chunk {
    display: inline-block;
    white-space: nowrap;
    flex-shrink: 0;
    transition: none;
}

/* ============================================================
   SECTION 2 — PROJECT GRID
   3 columns, flows below the bio section.
   ============================================================ */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 10mm;
    row-gap: 1mm;
    padding: 2rem 8mm 1rem;
}

.project-cell {
    background: #000;
}

.project-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* Image area */
.project-thumb {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #d5d5d5;
}

.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

.project-link:hover .project-thumb img { opacity: 0.75; }

/* Placeholder */
.thumb-placeholder {
    width: 100%;
    height: 100%;
    background: #d5d5d5;
}

/* Slideshow */
.project-thumb--slideshow {
    position: relative;
}

.project-thumb--slideshow .slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.project-thumb--slideshow .slide.is-active {
    opacity: 1;
}

/* Caption — always visible below image */
.project-caption {
    padding: 0.55rem 0 1.8rem;
}

.project-title {
    font-size: clamp(11px, 1vw, 14px);
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.3;
    color: #fff;
}

.project-excerpt {
    font-size: 12px;
    opacity: 0.5;
    margin-top: 0.2rem;
}

.no-projects {
    padding: 4rem 1.5rem;
    font-size: 14px;
    opacity: 0.4;
}

/* ============================================================
   SINGLE PROJECT PAGE
   ============================================================ */

.project-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem 6rem;
}

.project-header { margin-bottom: 3rem; }

.project-single .project-title {
    font-size: 80px;
    font-weight: 700;
    line-height: 1.0;
    margin-bottom: 1rem;
}

.project-subtitle {
    font-size: 18px;
    opacity: 0.6;
    font-weight: 400;
}

.project-subtitle p { margin: 0; }

.project-content img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 0.5rem;
}

.project-content p {
    font-size: 18px;
    line-height: 1.6;
    max-width: 60ch;
    opacity: 0.85;
    margin-bottom: 1.5rem;
}

.project-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.12);
    font-size: 14px;
}

.project-nav a { opacity: 0.5; }
.project-nav a:hover { opacity: 1; }

/* ============================================================
   GENERIC PAGE (Contact, About)
   ============================================================ */

.page-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 4rem 1.5rem 6rem;
}

.page-title {
    font-size: 60px;
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.0;
}

.page-body {
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.85;
}

.page-body a { border-bottom: 1px solid rgba(255,255,255,0.4); }
.page-body a:hover { border-bottom-color: #fff; }

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

/* ── Tablet (≤ 1024px) ── */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 15mm;
        padding: 2rem 12mm 4rem;
    }
}

/* ── Mobile (≤ 600px) ── */
@media (max-width: 600px) {

    .nav-toggle { display: flex; }

    .nav-primary {
        display: none;
        position: fixed;
        top: 44px;
        left: 0; right: 0;
        background: #000;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 1rem 1.5rem 1.5rem;
        z-index: 99;
    }

    .nav-primary.is-open { display: flex; }

    .nav-primary li {
        width: 100%;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .nav-primary a { font-size: clamp(16px, 5vw, 22px); }

    .nav-languages { font-size: clamp(13px, 3.5vw, 16px); }

    /* Bio adjustments on mobile */
    .bio-section {
        padding-left: 3mm;
        padding-right: 3mm;
        justify-content: flex-end;
    }

    .bio-para {
        font-size: clamp(20px, 5.5vw, 32px);
    }

    .bio-para--gap {
        margin-top: 2em;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        column-gap: 0;
        padding: 1rem 5mm 3rem;
    }

    .project-single,
    .page-content { padding: 2rem 1rem 4rem; }

    .project-single .project-title { font-size: clamp(28px, 8vw, 60px); }

    .page-title { font-size: clamp(24px, 7vw, 48px); }
}
