
:root {
    --black: #000000;
    --bg-darkest: #101011;  
    --bg-dark: #191a1b;      
    --bg-medium: #1f1f1f;   
    --accent-white: #f5f5f5;   
    --accent-white-bright: #ffffff; 
    --text-light: #dbd3d3;   
    --text-muted: #bdbdbd;  
    --accent-gold: #d9d9d9; 
    --text-dark: #333333; 
    --presentation-card: #bfaa8c;
    --member-bg: #c09a6b;
    --member-bg-gradient: linear-gradient(135deg, #fdfcfb, #e2d1c3, #f5f7fa, #c3cfe2);
    --bg-bubble: #894a28;
    --socials-bg-gradient: linear-gradient(135deg, #e6b980 0%, #7a4a2b 100%);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
    --project-bg-gradient: linear-gradient(180deg, #a58a53 0%, #ac4b12 100%);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text-light);
    line-height: 1.6;
    background-color: var(--bg-dark);
}

h1, h2, h3, h4 { 
    font-family: var(--font-heading); 
    font-weight: 700; 
    letter-spacing: 1px; 
}

.container { 
    max-width: 1100px; 
    width: 92%; 
    margin: 0 auto; 
    padding: 0 2%; 
}


.navbar {
    background: var(--bg-darkest);
    padding: 1.5% 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--accent-white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    transition: transform 0.28s ease;
}

/* Auto-hide while scrolling down, reveal when scrolling up.
   The .nav-hidden class is toggled by js/nav.js (shared on every page).
   Because .navbar is position:sticky, it keeps its layout slot reserved,
   so sliding away never shifts the page content underneath it. */
.navbar.nav-hidden {
    transform: translateY(-101%); /* 101% so the drop shadow also leaves view */
}

/* Accessibility: bring the header straight back if anything inside it
   receives keyboard focus while it is hidden. */
.navbar:focus-within {
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    /* Respect users who disable animations: still hide/show, just instantly. */
    .navbar { transition: none; }
}


.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 4%; 
    margin-left: 0;
}


.nav-logo-img {
    height: auto;
    width: 12%;
    min-width: 42px;
    max-width: 60px;
}

.logo-text {
    color: var(--accent-white);
    font-size: clamp(1rem, 2vw, 1.5rem);
    letter-spacing: 0.2em;
    margin: 0; 
}

.nav-links { 
    display: flex; 
    list-style: none; 
    align-items: center; 
    flex-wrap: wrap; 
}

.nav-links li { margin-left: 3vw; }

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--accent-white); }


.nav-links .nav-btn-download {
    background-color: transparent;
    border: 1px solid var(--accent-white);
    padding: 12% 15.5%;
    border-radius: 2px;
    color: var(--accent-white);
    transition: all 0.3s ease;
}

.nav-links .nav-btn-download:hover {
    background-color: var(--accent-white);
    color: var(--black);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}


.hero {
    background-color: var(--black);
    background: radial-gradient(circle, #d9d9d9 0%, var(--black) 60%);
    background-size: 100% 100%;
    background-position: center center;
    animation: heartbeat 2s ease-in-out infinite;

    /* Fill the whole first window (no scroll): the sticky navbar sits above
       the hero in normal flow, so subtract its runtime-measured height
       (--site-nav-h, set by js/nav.js on every page). */
    min-height: calc(100vh - var(--site-nav-h, 0px));
    min-height: calc(100dvh - var(--site-nav-h, 0px));
    height: auto;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 8% 0;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, transparent 0%, var(--black) 90%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content { 
    text-align: center; 
    z-index: 2; 
    width: 90%; 
    margin: 0 auto; 
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 10px;
    color: var(--accent-white);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hero-tagline { font-size: clamp(1.1rem, 2.4vw, 1.5rem); 
    margin-bottom: 20px; 
    color: var(--text-light); 
    font-weight: 300; 
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5); 
}

.hero-description { max-width: 60%; 
    min-width: 240px; 
    margin: 0 auto 30px auto; 
    color: var(--text-dark); 
}


.btn {
    display: inline-block;
    padding: 2% 6%;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: clamp(0.72rem, 1.2vw, 0.9rem);
    font-weight: bold;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-red {
    background-color: var(--accent-white);
    color: var(--black);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}

.btn-red:hover {
    background-color: var(--accent-white-bright);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.section { padding: 8% 0; }
/* Homepage: the two content sections below the hero each fill the whole
   window, like the hero does. They sit below the fold, where the sticky
   navbar overlays content and auto-hides on scroll-down — so unlike .hero
   no navbar offset is subtracted here (that would leave a band of the next
   section visible at the bottom). Content stays centered until more is added. */
.section-fill {
    box-sizing: border-box;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-title { 
    font-size: clamp(2rem, 4vw, 2.5rem); 
    text-align: center; 
    margin-bottom: 50px; 
    position: relative; 
    padding-bottom: 15px; 
}

.section-title::after {
    content: ''; 
    position: absolute; 
    bottom: 0; 
    left: 50%;
    transform: translateX(-50%); 
    width: 60px; 
    height: 3px;
    background-color: var(--accent-white);
}

.section-dark { 
    background-color: 
    var(--bg-dark); 
}

.section-medium { 
    background-color: 
    var(--bg-medium); 
}

.lead-text { font-size: 1.2rem; 
    text-align: center; 
    max-width: 800px; 
    margin: 0 auto; 
    color: var(--text-muted); 
}


.grid-2 { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 40px; 
}

.phase-card {
    background: var(--member-bg); padding: 40px; border-radius: 4px;
    border: 1px solid var(--bg-bubble); position: relative; overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
}
.phase-card:hover { 
    border-color: var(--accent-white); 
    transform: translateY(-5px); 
}

.phase-card h4 { font-size: 1.5rem; 
    margin-bottom: 15px; 
    color: var(--text-light); 
}

.card-accent {
    position: absolute; top: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, transparent, var(--member-bg), transparent);
}

.text-page-content {
    background: var(--bg-dark);
    padding: 80px 0; 
    min-height: 80vh; 
}

.content-block { 
    margin-bottom: 40px; 
    border-left: 3px solid var(--member-bg); 
    padding-left: 20px; 
}

.content-block h3 { 
    color: var(--text-light); 
    margin-bottom: 10px; 
    font-size: 1.5rem; 
}

.content-block p { 
    color: var(--text-muted); 
    margin-bottom: 10px; 
}

footer { 
    background: var(--bg-darkest); 
    padding: 30px 0; 
    text-align: center; 
    color: var(--text-muted); 
    font-size: 0.8rem; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
}

.member-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4%;

    padding: 4%;
    margin-bottom: 2rem;
    color: var(--text-light);

    background: var(--member-bg-gradient);

    border: 1px solid var(--accent-white);
    border-radius: 12px;

    overflow: hidden;
}

/* Subtle scrim over the banner so the content stays readable on any image */
.member-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(16, 16, 17, 0.85);
    pointer-events: none;
}

.member-card > * {
    position: relative;
    z-index: 1;
}

/* Letter relief: keeps the text readable against any banner image.
   A dark drop-shadow only (no white highlight/glow). */
.member-card h3,
.member-card p,
.members-projects h4 {
    text-shadow: 1px 1px 2px rgba(16, 16, 17, 0.5);
    color: var(--text-light);
}

.members-projects li,
.members-projects li a {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.member-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.member-info img {
    width: 55%;
    max-width: 150px;
    height: auto;
    aspect-ratio: 1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    object-fit: cover;
    border-radius: 50%;
}

.member-info h3 {
    margin-top: 1rem;
}

.member-info a {
    text-decoration: none;
}

.member-description {
    align-self: center;
    text-align: center;
}

.member-description p {
    margin-bottom: 1rem;
}

.member-bigger-description {
    margin-right: auto;
    margin-top: 2rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

/* Clickable dropdown marker */
.member-section {
    border: 1px solid var(--bg-bubble);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(16, 16, 17, 0.35);
}

.member-section-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 1.1rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 1px;
    text-align: left;
    transition: color 0.2s ease;
}

.member-section-toggle:hover {
    color: var(--accent-white);
}

.member-section-caret {
    flex-shrink: 0;
    transition: transform 0.25s ease;
    line-height: 1;
}

.member-section-toggle[aria-expanded="true"] .member-section-caret {
    transform: rotate(180deg);
}

.member-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.member-section-content.open {
    max-height: 600px;
}

.member-section-content p {
    margin: 0;
    padding: 0 1.1rem 1rem;
    color: var(--text-light);
}

/* ---- Project detail page (projects/{slug}/) ---- */
.project-page {
    margin: 0;
    padding: 0;
    width: 100%;
}

/* Hero: full width, covering the entire first viewport. Two columns.
   Left (wider): banner image ABOVE the title, both aligned left.
   Right (narrower): a "portrait" image filling the full hero height. */
.project-hero {
    position: relative;
    display: grid;
    grid-template-columns: 7fr 5fr;
    /* Lock the single implicit row to exactly the available height.
       Without this, an auto-sized row grows to fit the banner <img>'s
       INTRINSIC size (e.g. YTBot's tall square icon), pushing the title
       band below the first screen. minmax(0, 1fr) makes the row
       height-definite, so percentage/flex sizing resolves correctly
       no matter how large the source image is. */
    grid-template-rows: minmax(0, 1fr);
    /* Fill the first screen minus whatever sits above the hero
       (sticky navbar etc.), measured at runtime via
       --project-nav-offset (set in js/project.js). */
    height: calc(100vh - var(--project-nav-offset, 0px));
    overflow: hidden;
}

.project-hero-left {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg-darkest);
    min-height: 0;
    overflow: hidden;
}

/* The banner image sits on top of the left column, above the title.
   It flexes to fill all space ABOVE the fixed 33% caption band. Using
   flex: 1 1 0 + min-height: 0 means the image can never grow past its
   share — object-fit: cover crops it, regardless of intrinsic pixels. */
.project-hero-img {
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
    object-fit: cover;
    display: block;
}

/* Title caption: occupies 33% of the left column, with the text pinned
   to the top-right of this imageless area. */
.project-hero-caption {
    flex: 0 0 33%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-end;
    text-align: right;
    padding: 1.5rem 2rem;
}

.project-hero-right {
    position: relative;
    background: var(--bg-darkest);
}

/* Dark fallback (used when the banner/portrait image is missing/empty). */
.project-hero-dark {
    background: var(--bg-darkest) !important;
}

/* Hero title ONLY — scoped to the hero caption so this display size never
   leaks onto other elements sharing the .project-title class name
   (the compact project cards on member profile pages reuse it). */
.project-hero-caption .project-title {
    margin: 0;
    color: var(--accent-white);
    font-size: clamp(1.8rem, 5vw, 3.6rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.05;
}

.project-status {
    margin: 0.35rem 0 0;
    color: var(--accent-white);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.85rem;
}

/* Full-width dropdown sections below the hero, with no gap between them. */
.project-sections {
    width: 100%;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.project-section {
    background: rgba(16, 16, 17, 0.35);
}

.project-section-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    background: var(--bg-darkest);
    border: none;
    border-bottom: 1px solid var(--bg-bubble);
    cursor: pointer;
    color: var(--accent-white);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: clamp(1rem, 2vw, 1.35rem);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
}

.project-section-caret {
    flex-shrink: 0;
    transition: transform 0.25s ease;
    line-height: 1;
}

.project-section-toggle[aria-expanded="true"] .project-section-caret {
    transform: rotate(180deg);
}

.project-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.project-section-content.open {
    max-height: 900px;
}

/* Expanded content: text on the left, image on the right (adamwolf-style).
   When no image is set, drop the image column so text spans full width. */
.project-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem 2rem;
}

.project-section-grid.no-image {
    grid-template-columns: 1fr;
}

.project-section-text p {
    margin: 0;
    color: var(--text-light);
}

.project-section-image img {
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: cover;
    display: block;
}

/* Mobile: stack both hero columns and the dropdown text/image columns. */
@media (max-width: 768px) {
    .project-hero {
        grid-template-columns: 1fr;
        min-height: 0;
        height: auto;
    }
    .project-hero-left {
        min-height: 0;
    }
    .project-hero-img {
        flex: none;
        height: 40vh;      /* fixed band: crops tall icons instead of inflating */
        width: 100%;
        object-fit: cover;
        min-height: 0;
    }
    .project-hero-right {
        min-height: 30vh;
    }
    .project-section-grid {
        grid-template-columns: 1fr;
    }
}

.member-socials {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--accent-white);
}

.member-socials a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 1.2rem;
    transition: color 0.3s;
}

.member-socials a:hover {
    color: var(--text-dark);
}

.member-socials ul {
    display: flex;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.member-socials li {
    position: relative;
    z-index: 0;
    background-color: var(--bg-bubble);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 110%;
    height: 110%;
    border-radius: 10%;
    overflow: hidden;
    transition: color 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.member-socials li::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--bg-bubble);
    background-image: var(--socials-bg-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.member-socials li span {
    position: relative;
    z-index: 1;
}

.member-socials li:hover {
    color: var(--black);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}

.member-socials li:hover::before {
    opacity: 1;
}

.members-projects {
    grid-column: 1 / -1;

    border-top: 1px solid var(--accent-white);
    padding-top: 1rem;
}
.members-projects h4 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    color: var(--accent-white);
}

.members-projects ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;

    list-style: none;
    padding: 0;
}

.members-projects li {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: var(--bg-bubble);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.member-projects {
    grid-column: 1 / -1;
    text-align: center;
    border-top: 1px solid var(--accent-white);
    padding-top: 1rem;
}
.member-projects h4 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    color: var(--accent-white);
}

.member-projects ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;

    list-style: none;
    padding: 0;
}

.member-projects li {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background-image: var(--project-bg-gradient);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.member-projects li .project-title {
    /* Compact card typography: explicit size/case/spacing so any display-scale
       styles cascading from shared class names cannot inflate these cards.
       Keeps the cards visually small on desktop and mobile alike. */
    margin-bottom: 0.25rem;
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 700;
    text-transform: none;
    letter-spacing: normal;
}

.member-projects li .project-quote {
    margin-top: 0.25rem;
}

.member-page {
    position: relative;
    background: var(--member-bg-gradient);
    padding: 80px 0;
    padding: 3%; 
    min-height: 80vh; 
}

/* Subtle scrim over the banner so the content stays readable on any image */
.member-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(16, 16, 17, 0.85);
    pointer-events: none;
}

.member-page > * {
    position: relative;
    z-index: 1;
}

/* Letter relief: keeps the text readable against any banner image.
   A dark drop-shadow only (no white highlight/glow). */
.member-page h3,
.member-page p,
.member-projects h4 {
    text-shadow: 1px 1px 2px rgba(16, 16, 17, 0.5);
    color: var(--text-light);
}

.member-projects li,
.member-projects li a {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.member-page h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-light);
}

.member-page p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.member-page .member-card {
    max-width: 800px;
    margin: 0 auto;
}

.member-card h3 {
    color: var(--text-light);
}

.member-card p {
    color: var(--text-light);
}

.member-projects li .project-image {
    width: 100%;
    max-width: 220px;
    height: auto;
    aspect-ratio: 1.4;
    object-fit: cover;
    border-radius: 10px;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.project-card {
    display: flex;

    gap: 4%;

    padding: 4%;
    margin-bottom: 2rem;

    border: 1px solid var(--bg-bubble);
    border-radius: 12px;

    background-color: var(--black);

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.project-card > img {
    width: 32%;
    max-width: 250px;
    height: auto;
    aspect-ratio: 1.4;

    object-fit: cover;

    border-radius: 10px;

    flex-shrink: 0;
}

.project-content {
    flex: 1;
}

.project-content h3 {
    margin-top: 0;
}

.project-technologies {
    display: flex;
    flex-wrap: wrap;

    gap: 0.5rem;

    margin: 1rem 0;
}

.technology {
    padding: 0.4rem 0.7rem;

    border-radius: 6px;

    background-color: var(--bg-bubble);
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        justify-content: center;
        gap: 0.5rem 1rem;
    }

    .nav-links li {
        margin-left: 0;
    }

    .hero {
        /* Same full-first-screen rule as desktop (see .hero above). */
        min-height: calc(100vh - var(--site-nav-h, 0px));
        min-height: calc(100dvh - var(--site-nav-h, 0px));
        padding: 12% 0;
    }

    .hero-description {
        max-width: 85%;
    }

    .member-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        flex-direction: column;
    }

    .project-card > img {
        width: 100%;
        max-width: 100%;
        height: auto;
    }
}

@keyframes heartbeat {
    0% {
        background-size: 100% 100%;
    }
    10% {
        background-size: 130% 130%;
    }
    30% {
        background-size: 110% 110%;
    }
    50% {
        background-size: 180% 180%;
    }
    80% {
        background-size: 110% 110%;
    }
    100% {
        background-size: 100% 100%;
    }
}