/* ── Tokens ─────────────────────────────────────────────────── */
:root {
    --amber: #d7b864;
    --dark: #212121;
    --light: #f7f7f7;
    --section-dark: #2e3820;
    --card-radius: 10px;
    --nav-h: 60px;
}

/* ── Reset / Base ────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html {
    scroll-behavior: smooth;
}
body {
    background: var(--light);
    color: var(--dark);
    font-family: "Public Sans", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    background: var(--amber);
    color: var(--dark);
    font-family: "Inter", sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    padding: 0.55rem 1.3rem;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}
.btn:hover {
    opacity: 0.82;
}

/* ── Header ──────────────────────────────────────────────────── */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2.5rem;
}

.logo-box img {
    width: clamp(2rem, 16vw, 12rem);
}

.site-nav {
    display: flex;
    gap: 2rem;
    list-style: none;
}
.site-nav a {
    color: var(--light);
    text-decoration: none;
    font-family: "Inter", sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.82rem;
    transition: opacity 0.2s;
}
.site-nav a:hover {
    opacity: 0.72;
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem 4rem;
    background-image: url("img/SoWi_hero_bg_1.png");
    background-size: cover;
    background-position: top;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(18, 28, 10, 0.64);
}
.hero-content {
    position: relative;
    max-width: 640px;
}
.hero h1 {
    font-family: "Inter", sans-serif;
    font-weight: 400;
    font-size: clamp(1.9rem, 5vw, 3.1rem);
    color: var(--light);
    line-height: 1.15;
    margin-bottom: 1rem;
}
.hero p {
    color: var(--light);
    font-size: 1rem;
    max-width: 460px;
    margin: 0 auto 1.8rem;
    opacity: 0.9;
}

/* ── Dark section wrapper ─────────────────────────────────────── */
.dark-section#about {
    /*background: var(--section-dark);*/
    padding: 0 3rem 1.5rem 3rem;
    margin-top: -3rem;
}

/* ── Carousel shared ─────────────────────────────────────────── */
.carousel-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.carousel-track-wrap {
    flex: 1;
    overflow: hidden;
}

.carousel-arrow {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--amber);
    color: var(--dark);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
    transition: opacity 0.2s;
}
.carousel-arrow:hover:not(:disabled) {
    opacity: 0.8;
}
.carousel-arrow:disabled {
    opacity: 0.3;
    cursor: default;
}

/* ── Icon carousel ───────────────────────────────────────────── */
.icon-track {
    display: flex;
    transition: transform 0.35s ease;
}

.icon-item {
    flex: 0 0 25%; /* exact 1/4 — no gap needed */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem 0.5rem;
    /*opacity: 0.6;*/
    transition: opacity 0.3s;
}
/*.icon-item.active {
    opacity: 1;
}*/

.icon-circle {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 2px solid rgba(215, 184, 100, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    background: var(--light);
}

.icon-label {
    color: var(--amber);
    font-family: "Inter", sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.72rem;
    text-align: center;
    line-height: 1.4;
}

/* ── Cards carousel ──────────────────────────────────────────── */
.cards-track {
    display: flex;
    transition: transform 0.35s ease;
}

/* Each card takes exactly 1/3 of the track-wrap width.
   Inner padding creates the visual gutter. */
.project-card {
    flex: 0 0 33.333%;
    padding: 0 1.6rem;
}

.card-inner {
    background: var(--light);
    border-radius: var(--card-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 2.8px 5.6px 5.6px hsl(0deg 0% 0% / 0.41);
}

.card-img-placeholder {
    width: 100%;
    height: 155px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.card-body {
    padding: 1rem 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1;
}
.card-title {
    font-family: "Inter", sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--dark);
    line-height: 1.25;
}
.card-desc {
    font-size: 0.78rem;
    color: #555;
    flex: 1;
}
.card-body .btn {
    margin-top: 0.5rem;
}

/* ── Mobile bottom nav ───────────────────────────────────────── */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--dark);
    list-style: none;
}

.mobile-nav li {
    flex: 1;
}
.mobile-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--nav-h);
    color: var(--amber);
    text-decoration: none;
    font-family: "Inter", sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.72rem;
    padding: 0 0.4rem;
    text-align: center;
    border-top: 1px solid rgba(215, 184, 100, 0.15);
    transition: background 0.18s;
}
.mobile-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ── Resources page ──────────────────────────────────────────── */
.res-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem 2rem 4rem;
}

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

.res-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 2px solid var(--amber);
    cursor: pointer;
    user-select: none;
}

.res-section-header h2 {
    font-family: "Inter", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
}

.res-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    opacity: 0.55;
    transition: opacity 0.2s;
}
.res-toggle-btn:hover { opacity: 1; }
.res-toggle-btn img { width: 24px; height: 24px; }

.res-body {
    padding-top: 1rem;
}
.res-body.collapsed { display: none; }

.res-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.res-card {
    background: #fff;
    border: 1px solid #e0e5ed;
    border-radius: 8px;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.res-card-name {
    font-family: "Inter", sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--dark);
    margin-bottom: 0.15rem;
}

.res-card-field {
    font-size: 0.82rem;
    color: #444;
    line-height: 1.5;
}

.res-field-key {
    font-family: "Inter", sans-serif;
    font-weight: 500;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.72rem;
}

.res-card-field a {
    color: #1a5fa8;
    word-break: break-all;
}

.res-loading {
    color: #888;
    font-size: 0.85rem;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
    .project-card {
        flex: 0 0 50%;
    }
}

@media (max-width: 767px) {
    .site-nav {
        display: none;
    }
    .mobile-nav {
        display: flex;
    }

    body {
        padding-bottom: var(--nav-h);
    }

    .site-header {
        padding: 1rem 1.25rem;
    }

    .hero {
        min-height: 70vh;
        padding: 5rem 1.25rem 3rem;
    }

    /* Icon: 2 visible */
    .icon-item {
        flex: 0 0 50%;
    }

    /* Cards: 1 visible */
    .project-card {
        flex: 0 0 100%;
    }

    .dark-section {
        padding: 2.5rem 1rem;
    }
}
