@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400;1,500&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Tokens ── */
:root {
    --bg:      #f7f3ed;
    --surface: #eee8de;
    --ink:     #1c1916;
    --ink-mid: #5a5046;
    --ink-dim: #9a8f82;
    --copper:  #b07540;
    --border:  #ddd5c6;
    --white:   #fdfaf6;
    --nav-scrolled: rgba(247, 243, 237, 0.9);
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans:  'DM Sans', system-ui, sans-serif;
}

/* ── Dark theme ── */
body.dark {
    --bg:      #16120e;
    --surface: #1f1a15;
    --ink:     #ede6da;
    --ink-mid: #a89a88;
    --ink-dim: #6b5e50;
    --copper:  #c98a4e;
    --border:  #2e2620;
    --white:   #1c1813;
    --nav-scrolled: rgba(22, 18, 14, 0.9);
}
body.dark ::selection { background: #3a2e1e; }

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-weight: 300; line-height: 1.65; overflow-x: hidden; -webkit-font-smoothing: antialiased; transition: background 0.3s, color 0.3s; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
::selection { background: #e8d9c4; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 2rem; }

/* ── Label ── */
.label {
    display: inline-block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--copper);
    font-weight: 400;
    margin-bottom: 1.25rem;
}

/* ── Buttons ── */
.btn-primary {
    display: inline-block;
    background: var(--ink);
    color: var(--white);
    padding: 0.8rem 2rem;
    border-radius: 6px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    font-weight: 400;
    transition: background 0.25s;
}
.btn-primary:hover { background: var(--copper); }

.btn-text {
    font-size: 0.85rem;
    color: var(--ink-mid);
    transition: color 0.2s;
}
.btn-text:hover { color: var(--copper); }

/* ══════════════════════════════
   NAV
══════════════════════════════ */
#navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 1.25rem 0;
    transition: background 0.3s, box-shadow 0.3s, padding 0.3s;
}
#navbar.scrolled {
    background: var(--nav-scrolled);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--border);
    padding: 0.85rem 0;
}

.nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.logo-mark {
    width: 32px;
    height: 32px;
    background: var(--ink);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.logo-mark img { width: 20px; height: 20px; object-fit: contain; }
.logo-fallback {
    display: none;
    font-family: var(--serif);
    font-style: italic;
    color: #c8965a;
    font-size: 1rem;
    line-height: 1;
}

.logo-name {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: 0.01em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.25rem;
}
.nav-links a {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ink-mid);
    font-weight: 400;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }

.nav-apply {
    background: var(--ink);
    color: var(--white) !important;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    transition: background 0.2s !important;
}
.nav-apply:hover { background: var(--copper) !important; }

#theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ink-mid);
    transition: border-color 0.2s, color 0.2s;
    flex-shrink: 0;
}
#theme-toggle:hover { border-color: var(--copper); color: var(--copper); }

#menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink);
}

#mobile-menu {
    display: flex;           
    position: fixed;
    inset: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    z-index: 1000;

    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}
.mobile-link {
    font-family: var(--serif);
    font-size: 1.8rem;
    font-style: italic;
    color: var(--ink-mid);
    transition: color 0.2s;
}
.mobile-link:hover { color: var(--copper); }
.mobile-apply {
    font-family: var(--sans);
    font-size: 0.8rem !important;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    background: var(--ink);
    color: var(--white);
    padding: 0.7rem 2rem;
    border-radius: 6px;
}

/* ══════════════════════════════
   HERO
══════════════════════════════ */
.hero {
    padding: 14rem 0 7rem;
    background: var(--white);
}

.hero h1 {
    font-family: var(--serif);
    font-size: clamp(3.5rem, 8vw, 6rem);
    font-weight: 400;
    line-height: 1.0;
    letter-spacing: -0.02em;
    margin-bottom: 1.75rem;
    color: var(--ink);
}
.hero h1 em { font-style: italic; color: var(--copper); }

.hero-sub {
    font-size: 1.05rem;
    color: var(--ink-mid);
    max-width: 560px;
    line-height: 1.8;
    font-weight: 300;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

/* ══════════════════════════════
   PILLARS
══════════════════════════════ */
.pillars { padding: 4rem 0; background: var(--bg); border-top: 1px solid var(--border); }

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
}

.pillar {
    padding: 2.5rem 2rem;
    border-right: 1px solid var(--border);
}
.pillar:last-child { border-right: none; }

.pillar-num {
    display: block;
    font-family: var(--serif);
    font-size: 1.5rem;
    color: var(--border);
    font-weight: 400;
    margin-bottom: 1rem;
    line-height: 1;
}

.pillar h3 {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 0.65rem;
}

.pillar p {
    font-size: 0.85rem;
    color: var(--ink-mid);
    line-height: 1.75;
}

/* ══════════════════════════════
   ARCHIVE
══════════════════════════════ */
.archive { padding: 5rem 0; background: var(--bg); }

.section-header { margin-bottom: 2.5rem; }
.section-header h2 {
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 400;
    color: var(--ink);
    line-height: 1.1;
}

.projects { display: flex; flex-direction: column; gap: 1.25rem; }

.project-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.25s, border-color 0.25s;
}
.project-card:hover {
    box-shadow: 0 8px 32px rgba(28,25,22,0.07);
    border-color: #ccc0b0;
}

.project-img {
    position: relative;
    background: var(--surface);
    min-height: 220px;
    overflow: hidden;
}
.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    transition: transform 0.4s ease;
}
.project-card:hover .project-img img { transform: scale(1.03); }

.project-img--dark {
    background: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b5a45;
}

.project-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--white);
    background: rgba(28,25,22,0.65);
    backdrop-filter: blur(4px);
    padding: 0.3rem 0.65rem;
    border-radius: 4px;
}

.project-info {
    padding: 2rem 2.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.9rem;
}

.project-info h3 {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--ink);
    line-height: 1.15;
}

.project-info p {
    font-size: 0.875rem;
    color: var(--ink-mid);
    line-height: 1.75;
    font-weight: 300;
}

.tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.tags span {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-dim);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
}

.project-link {
    font-size: 0.78rem;
    color: var(--copper);
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: opacity 0.2s;
}
.project-link:hover { opacity: 0.7; }

/* ══════════════════════════════
   FOUNDERS
══════════════════════════════ */
.founders { padding: 5rem 0; background: var(--white); border-top: 1px solid var(--border); }

.founders-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.founder-card {
    display: flex;
    gap: 1.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    align-items: flex-start;
    transition: box-shadow 0.25s;
}
.founder-card:hover { box-shadow: 0 6px 24px rgba(28,25,22,0.06); }

.founder-photo {
    width: 88px;
    height: 104px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface);
    flex-shrink: 0;
}
.founder-photo img { width: 100%; height: 100%; object-fit: cover; }

.founder-info { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }

.founder-role {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--copper);
}

.founder-info h3 {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--ink);
    line-height: 1.1;
}

.founder-info p {
    font-size: 0.85rem;
    color: var(--ink-mid);
    font-style: italic;
    font-family: var(--serif);
    line-height: 1.65;
}

/* ══════════════════════════════
   RECRUITMENT
══════════════════════════════ */
.recruitment {
    padding: 5rem 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.recruitment h2 {
    font-family: var(--serif);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 400;
    color: var(--ink);
    line-height: 1.05;
    margin-bottom: 1.25rem;
}
.recruitment h2 em { font-style: italic; color: var(--copper); }

.recruit-sub {
    font-size: 0.95rem;
    color: var(--ink-mid);
    max-width: 580px;
    line-height: 1.8;
    font-weight: 300;
    margin-bottom: 2.5rem;
}

.req-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    max-width: 640px;
    margin-bottom: 2.5rem;
}

.req-block {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
}

.req-block h4 {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ink-dim);
    margin-bottom: 1rem;
    font-weight: 400;
}

.req-block li {
    font-size: 0.85rem;
    color: var(--ink-mid);
    line-height: 1.7;
    padding-left: 0.85rem;
    position: relative;
}
.req-block li::before { content: '–'; position: absolute; left: 0; color: var(--copper); }
.req-block li + li { margin-top: 0.4rem; }

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
.footer {
    padding: 2rem 0;
    background: var(--white);
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    font-family: var(--serif);
    font-size: 1rem;
    font-style: italic;
    color: var(--ink-mid);
}

.footer-copy {
    font-size: 0.7rem;
    color: var(--ink-dim);
    letter-spacing: 0.08em;
}

/* ══════════════════════════════
   POPUP
══════════════════════════════ */
.mobile-popup {
    position: fixed;
    inset: 0;
    background: rgba(28, 25, 22, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.mobile-popup.hidden { display: none; }

.popup-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 2.25rem 2rem;
    width: 88%;
    max-width: 340px;
    text-align: center;
    position: relative;
}

.popup-card h3 {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--ink);
    margin-bottom: 0.6rem;
}

.popup-card p {
    font-size: 0.85rem;
    color: var(--ink-mid);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

#popup-close {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    background: none;
    border: none;
    color: var(--ink-dim);
    cursor: pointer;
    display: flex;
    transition: color 0.2s;
}
#popup-close:hover { color: var(--ink); }

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 768px) {
    .nav-links { display: none; }
    #menu-toggle { display: flex; }
    #mobile-menu { display: flex; }

    .hero { padding: 9rem 0 5rem; }

    .pillars-grid { grid-template-columns: 1fr; }
    .pillar { border-right: none; border-bottom: 1px solid var(--border); }
    .pillar:last-child { border-bottom: none; }

    .project-card { grid-template-columns: 1fr; }
    .project-img { min-height: 180px; }

    .founders-grid { grid-template-columns: 1fr; }

    .req-grid { grid-template-columns: 1fr; max-width: 100%; }

    .footer-inner { flex-direction: column; gap: 0.5rem; text-align: center; }
}
