/* ============================================
   MAIN SITE STYLESHEET (COMPLETE FILE)
   Location: css/styles.css
   Theme: BORG COLLECTIVE EDITION

   Includes: theme, nav, sections, homepage,
   galleries + sliders, parent/sub-cards,
   lightbox (+ PDF document viewer), social
   links, THM card, terminal, footer, responsive

   CHANGE LOG (this revision):
   - ADDED .lightbox-iframe rules: fullscreen PDF
     viewer used by the terminal's `open <#>`
     document library command. Rendered natively
     in an <iframe> (browsers show PDFs without
     plugins). White background so dark-themed
     PDFs and light PDFs both read correctly,
     framed with the Borg green border.
   - Responsive block gained a mobile variant of
     the document viewer.

   Previous revisions:
   - Re-themed from purple to Borg green:
     dark mode is now near-black green panels
     with neon Borg green (#00ff41) accents;
     light mode uses a deep forest green.
   - Angular geometry: rounded corners reduced
     to crisp 4px angles (Borg = cubes).
   - Added --glow-color variable: accent text
     (logo, headings, stat values) glows green
     in dark mode only; transparent in light.
   - Slider gradient and hover shadows recolored
     from purple to green.
   - Lightbox keeps 1px border (no box-shadow —
     see LIGHTBOX notes; use var(--accent-color)
     there if you want the Borg green frame).

   BORG PALETTE REFERENCE (dark theme):
     bg        #050a06   near-black, green undertone
     panels    #0c130d   card/nav surfaces
     accent    #00ff41   Borg neon green
     text      #b7cfb7   pale green-grey
   ============================================ */

/* ============================================
   THEME VARIABLES
   Edit these to re-theme the whole site.
   ============================================ */
:root {
    /* LIGHT MODE — clean forest-green theme */
    --bg-color: #eef3ee;
    --text-color: #16211a;
    --card-bg: #ffffff;
    --accent-color: #008c46;
    --accent-glow: transparent;
    --nav-bg: #ffffff;
    --gallery-item-bg: #ffffff;
    --terminal-bg: #04120a;
    --terminal-text: #00ff41;
    --terminal-cursor: #00ff41;
    --terminal-prompt: #58ffa6;
    --terminal-path: #7dffc4;
}

/* Explicit dark theme (manual toggle) — FULL BORG */
[data-theme="dark"] {
    --bg-color: #050a06;
    --text-color: #b7cfb7;
    --card-bg: #0c130d;
    --accent-color: #00ff41;
    --accent-glow: rgba(0, 255, 65, 0.35);
    --nav-bg: #0a110b;
    --gallery-item-bg: #0c130d;
    --terminal-bg: #020803;
}

/* Auto mode: follow OS/browser setting — FULL BORG */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-color: #050a06;
        --text-color: #b7cfb7;
        --card-bg: #0c130d;
        --accent-color: #00ff41;
        --accent-glow: rgba(0, 255, 65, 0.35);
        --nav-bg: #0a110b;
        --gallery-item-bg: #0c130d;
        --terminal-bg: #020803;
    }
}

/* ============================================
   BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
}

/* ============================================
   NAVIGATION
   ============================================ */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--accent-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    transition: background-color 0.3s ease;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 12px var(--accent-glow);
}

.logo-img {
    height: 40px; /* adjust to your logo's proportions */
    width: auto;
    display: block;
    color: var(--accent-color); /* drives currentColor → neon green in dark, forest in light */
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

    .nav-links a {
        text-decoration: none;
        color: var(--text-color);
        font-weight: 500;
        letter-spacing: 0.5px;
        transition: color 0.3s ease, text-shadow 0.3s ease;
    }

        .nav-links a:hover,
        .nav-links a.active {
            color: var(--accent-color);
            text-shadow: 0 0 8px var(--accent-glow);
        }

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: 2px solid var(--accent-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

    .theme-toggle:hover {
        background: var(--accent-color);
        color: #050a06;
        box-shadow: 0 0 10px var(--accent-glow);
    }

/* ============================================
   SECTIONS
   ============================================ */
section {
    display: none;
    min-height: 100vh;
    padding: 8rem 2rem 2rem;
    animation: fadeIn 0.5s ease;
}

    section.active {
        display: block;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--accent-color);
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 0 14px var(--accent-glow);
}

/* ============================================
   HOMEPAGE
   ============================================ */
#homepage {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

    #homepage.active {
        display: flex;
    }

.hero-text {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 0 18px var(--accent-glow);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    opacity: 0.8;
    letter-spacing: 1px;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.nav-card {
    background: var(--card-bg);
    padding: 2rem;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    text-align: center;
}

    .nav-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 255, 65, 0.2);
    }

    .nav-card h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        color: var(--accent-color);
        letter-spacing: 1px;
    }

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 3rem;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

    .about-content p {
        line-height: 1.8;
        margin-bottom: 1.5rem;
    }

/* ============================================
   SOCIAL LINKS (homepage hero, About block,
   and footer icon strip)

   TO ADD A NEW PROFILE:
   1. Grab an SVG icon for it (e.g. from
      https://simpleicons.org or
      https://feathericons.com)
   2. Copy any existing <a class="social-link">
     (or social-pill) block and swap the href
     and the inner <svg>
   ============================================ */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Icon-only squares (hero + footer) */
.social-link {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    background: var(--card-bg);
    border: 2px solid var(--accent-color);
    transition: all 0.3s ease;
}

    .social-link:hover {
        background: var(--accent-color);
        color: #050a06;
        box-shadow: 0 0 12px var(--accent-glow);
        transform: translateY(-3px);
    }

    .social-link svg {
        width: 20px;
        height: 20px;
    }

/* Hero positioning: sits between subtitle and cards */
.hero-socials {
    margin-bottom: 3rem;
}

/* Square buttons with icon + label (About block) */
.social-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.3rem;
    border-radius: 4px;
    background: var(--card-bg);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    border: 2px solid var(--accent-color);
    transition: all 0.3s ease;
}

    .social-pill:hover {
        background: var(--accent-color);
        color: #050a06;
        box-shadow: 0 0 12px var(--accent-glow);
        transform: translateY(-2px);
    }

    .social-pill svg {
        width: 18px;
        height: 18px;
    }

/* About section: "Let's Connect" block */
.connect-block {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--accent-color);
}

.connect-title {
    font-size: 1.4rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.connect-blurb {
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.connect-block .social-links {
    justify-content: flex-start;
}

/* ============================================
   GALLERY SECTIONS (HOBBIES & PROJECTS)
   ============================================ */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

.gallery-item {
    background: var(--gallery-item-bg);
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

    .gallery-item:hover {
        transform: scale(1.02);
        box-shadow: 0 8px 22px rgba(0, 255, 65, 0.15);
    }

.gallery-content {
    padding: 1.5rem;
}

    .gallery-content h3 {
        margin-bottom: 1rem;
        color: var(--accent-color);
        letter-spacing: 1px;
    }

    .gallery-content h4 {
        font-size: 1.05rem;
        color: var(--accent-color);
        margin-bottom: 0.6rem;
        letter-spacing: 1px;
    }

    .gallery-content p {
        line-height: 1.6;
    }

/* ============================================
   PARENT / SUB-CARDS
   A .gallery-item.parent spans the full grid
   width and contains a .sub-gallery grid of
   smaller cards. The expand button toggles it.
   ============================================ */
/* Parent card occupies the full row (spans all columns) */
.gallery-item.parent {
    grid-column: 1 / -1;
}

/* Card header row: title left, expand button right */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

    .card-header h3 {
        margin-bottom: 0;
    }

/* Expand / collapse button */
.expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.1rem;
    border-radius: 4px;
    border: 2px solid var(--accent-color);
    background: transparent;
    color: var(--accent-color);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

    .expand-btn:hover {
        background: var(--accent-color);
        color: #050a06;
        box-shadow: 0 0 10px var(--accent-glow);
    }

    .expand-btn .chev {
        display: inline-block;
        transition: transform 0.3s ease;
        font-size: 1rem;
    }

/* Chevron flips up when expanded */
.gallery-item.parent.expanded .chev {
    transform: rotate(180deg);
}

/* Sub-card grid: indented and visually separated */
.sub-gallery {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    padding: 0 1.5rem 1.5rem;
    border-top: 2px dashed var(--accent-color);
    margin-top: 1rem;
}

/* Expanded state */
.gallery-item.parent.expanded .sub-gallery {
    display: grid;
}

/* Indentation communicates hierarchy */
.gallery-item.sub {
    margin-left: 1.5rem;
    margin-right: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

    /* Sub-card sliders are slightly shorter */
    .gallery-item.sub .image-slider {
        height: 160px;
    }

/* Parent sliders are taller since the card is wider */
.gallery-item.parent > .image-slider {
    height: 320px;
}

/* ============================================
   IMAGE SLIDER (multi-image gallery cards)
   Arrows, dots, and counter are injected by
   js/script.js. A slider with one image hides
   the controls automatically.

   Layout of overlays on the image:
   - top-left:     dots
   - top-right:    counter
   - side centers: prev/next arrows
   - bottom strip: caption
   All four zones are kept separate so nothing
   overlaps.

   IMPORTANT: all slides are absolutely stacked.
   They must NOT capture clicks themselves — the
   click is handled at the slider level, which
   opens the lightbox on the CURRENTLY ACTIVE
   slide. Hence pointer-events: none below.
   ============================================ */
.image-slider {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--accent-color), #1a8f4a);
    cursor: pointer;
}

.slider-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none; /* invisible stacked slides must not eat clicks */
}

    .slider-img.active {
        opacity: 1;
    }

/* Caption bar at the bottom of each slide */
.slider-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem 2.8rem 0.5rem 1rem;
    background: rgba(2, 8, 3, 0.75);
    color: #b7f5c6;
    font-size: 0.8rem;
    text-align: left;
    pointer-events: none; /* don't block clicks */
}

/* Prev / Next arrows */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    background: rgba(2, 8, 3, 0.65);
    color: #00ff41;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 5;
}

    .slider-btn:hover {
        background: var(--accent-color);
        color: #050a06;
    }

    .slider-btn.prev {
        left: 8px;
    }

    .slider-btn.next {
        right: 8px;
    }

/* Single-image sliders: hide the controls */
.image-slider.single .slider-btn,
.image-slider.single .slider-dots,
.image-slider.single .slider-counter {
    display: none;
}

/* Dot indicators — TOP-LEFT, away from the caption */
.slider-dots {
    position: absolute;
    top: 8px;
    left: 10px;
    display: flex;
    gap: 5px;
    z-index: 5;
}

.slider-dot {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
}

    .slider-dot.active {
        background: #00ff41;
        transform: scale(1.25);
    }

/* Image counter e.g. "2 / 4" — top-right */
.slider-counter {
    position: absolute;
    top: 8px;
    right: 10px;
    background: rgba(2, 8, 3, 0.65);
    color: #00ff41;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    z-index: 5;
}

/* ============================================
   LIGHTBOX (fullscreen popout)
   Built entirely by js/script.js — nothing
   to configure here except appearance.

   Two modes:
   - IMAGE MODE (.lightbox-img): fullscreen
     picture with prev/next arrows.
   - DOCUMENT MODE (.lightbox-iframe): PDF
     viewer used by the terminal's `open <#>`
     command. Rendered in a native <iframe> —
     browsers display PDFs without plugins.
     White background so documents read
     correctly against the dark backdrop, with
     the Borg green frame for consistency.

   The backdrop is 0.97 opaque: any translucency
   lets dark page content underneath bleed
   through as faint lines across the picture.

   NOTE: the image element deliberately has NO
   box-shadow — the shadow's anti-aliased seam
   against the dark backdrop rendered as a faint
   hairline across the image (confirmed via
   DevTools testing). Edge definition comes from
   a crisp 1px border instead, which cannot
   produce that artifact. It currently uses the
   Borg green accent; switch to
   rgba(255,255,255,0.15) for a neutral frame.
   ============================================ */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 8, 3, 0.97);
    z-index: 5000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

    .lightbox.open {
        display: flex;
        animation: lightboxFade 0.25s ease;
    }

@keyframes lightboxFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.lightbox-img {
    max-width: 90vw;
    max-height: 78vh;
    object-fit: contain;
    background: #000; /* hides subpixel edge artifacts */
    border: 1px solid var(--accent-color); /* Borg green frame */
}

/* PDF / document viewer (document mode) */
.lightbox-iframe {
    display: none; /* script shows it when opening a document */
    width: 90vw;
    height: 84vh;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    background: #ffffff; /* documents are usually light — keep them readable */
}

.lightbox-caption {
    margin-top: 1.2rem;
    max-width: 80vw;
    color: #b7f5c6;
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
}

.lightbox-counter {
    position: absolute;
    top: 16px;
    right: 60px;
    color: #00ff41;
    font-size: 0.9rem;
    background: rgba(0, 255, 65, 0.1);
    padding: 4px 12px;
    border-radius: 4px;
}

/* Big prev/next arrows at the screen edges */
.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 4px;
    background: rgba(0, 255, 65, 0.08);
    color: #00ff41;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

    .lightbox-btn:hover {
        background: rgba(0, 255, 65, 0.25);
    }

    .lightbox-btn.prev {
        left: 24px;
    }

    .lightbox-btn.next {
        right: 24px;
    }

/* Close button, top right */
.lightbox-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 4px;
    background: rgba(0, 255, 65, 0.08);
    color: #00ff41;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

    .lightbox-close:hover {
        background: rgba(255, 60, 60, 0.3);
        border-color: rgba(255, 60, 60, 0.6);
        color: #ff6b6b;
    }

/* ============================================
   TRYHACKME STATS CARD
   ============================================ */
.thm-card-wrapper {
    margin-bottom: 2.5rem;
}

.thm-card {
    background: var(--card-bg);
    border: 2px solid var(--accent-color);
    border-radius: 4px;
    padding: 1.5rem 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.thm-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.thm-avatar {
    width: 64px;
    height: 64px;
    border-radius: 4px;
    object-fit: cover;
    border: 2px solid var(--accent-color);
}

.thm-title-block {
    flex: 1;
}

.thm-title {
    font-size: 1.3rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px var(--accent-glow);
}

.thm-username {
    font-size: 0.95rem;
    opacity: 0.7;
}

.thm-status {
    font-size: 0.8rem;
    opacity: 0.6;
    font-style: italic;
}

.thm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.thm-stat {
    background: var(--bg-color);
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    padding: 1rem;
    text-align: center;
}

.thm-stat-value {
    display: block;
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--accent-glow);
}

.thm-stat-label {
    display: block;
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.thm-link {
    display: inline-block;
    margin-top: 1.25rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

    .thm-link:hover {
        text-decoration: underline;
    }

/* ============================================
   TERMINAL / CYBERSECURITY SECTION
   The terminal was already green — now the
   whole site matches it.
   ============================================ */
#cybersecurity {
    background: var(--bg-color);
}

.terminal-container {
    max-width: 1000px;
    margin: 0 auto;
}

.terminal-window {
    background: var(--terminal-bg);
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    font-family: 'Courier New', monospace;
}

.terminal-header {
    background: rgba(0, 255, 65, 0.08);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

    .terminal-dot.red {
        background: #ff5f56;
    }

    .terminal-dot.yellow {
        background: #ffbd2e;
    }

    .terminal-dot.green {
        background: #00ff41;
    }

.terminal-title {
    color: #7fae8b;
    margin-left: 1rem;
    font-size: 0.9rem;
}

.terminal-body {
    padding: 1.5rem;
    min-height: 500px;
    color: var(--terminal-text);
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.4); /* phosphor glow */
}

.terminal-line {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.prompt {
    color: var(--terminal-prompt);
    margin-right: 0.5rem;
}

.path {
    color: var(--terminal-path);
}

.command {
    color: #eafff0;
}

.output {
    color: #8fce9e;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.input-line {
    display: flex;
    align-items: center;
}

.terminal-input {
    background: transparent;
    border: none;
    color: #eafff0;
    font-family: inherit;
    font-size: inherit;
    flex: 1;
    outline: none;
}

.cursor {
    width: 8px;
    height: 18px;
    background: var(--terminal-cursor);
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }

    51%, 100% {
        opacity: 0;
    }
}

.help-text {
    color: #7dffc4;
}

.success {
    color: #00ff41;
}

.error {
    color: #ff5555;
}

.info {
    color: #58ffa6;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    text-align: center;
    padding: 2rem;
    background: var(--nav-bg);
    border-top: 1px solid var(--accent-color);
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.footer-socials .social-link {
    background: transparent;
    border-color: transparent;
    width: 38px;
    height: 38px;
}

    .footer-socials .social-link:hover {
        border-color: var(--accent-color);
        background: transparent;
        color: var(--accent-color);
        transform: translateY(-2px);
    }

/* ---- PROJECT STATUS SECTIONS (In Progress / Completed) ---- */
.projects-subsection {
    margin-top: 2.5rem;
}

    .projects-subsection:first-of-type {
        margin-top: 0;
    }

.status-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

    .status-header h3 {
        margin: 0;
        color: var(--accent-color);
        text-shadow: var(--accent-glow);
    }

    .status-header::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--accent-color);
        opacity: 0.3;
    }

.status-count {
    font-size: 0.85rem;
    color: var(--text-secondary, inherit);
    opacity: 0.7;
}
/* ---- PROJECT STATUS SECTIONS: LAYOUT FIX ---- */
/* The subsections live inside the page's 3-column
   .gallery-grid, so each one must first span the
   FULL row, then lay out its own cards with flexbox
   (centered, so a partial last row looks intentional). */

.projects-subsection {
    grid-column: 1 / -1; /* escape the outer grid's columns */
    display: flex; /* become the card container itself */
    flex-wrap: wrap;
    justify-content: center; /* centers a partial last row */
    gap: 1.5rem;
    align-items: flex-start;
}

    .projects-subsection .gallery-item {
        flex: 0 1 calc((100% - 3rem) / 3); /* 3 per row incl. gaps */
        min-width: 280px; /* wraps gracefully on small screens */
        max-width: 100%;
        margin: 0; /* ← add this: kills stray margins that inflate the row */
    }

        /* Parent cards (and expanded ones) take the full row */
        .projects-subsection .gallery-item.parent {
            flex: 0 0 100%;
        }

    /* The status header must occupy its own full row —
   otherwise it becomes a flex item sharing the row
   with the cards, shrinking the space available and
   forcing cards to wrap prematurely. */
    .projects-subsection .status-header {
        flex: 0 0 100%;
    }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .hero-text {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-content {
        padding: 2rem;
    }

    .thm-header {
        flex-wrap: wrap;
    }

    .thm-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .social-link {
        width: 40px;
        height: 40px;
    }

    .social-pill {
        width: 100%;
        justify-content: center;
    }

    .lightbox-img {
        max-width: 95vw;
        max-height: 72vh;
    }

    /* Document viewer fills more of a phone screen */
    .lightbox-iframe {
        width: 96vw;
        height: 80vh;
    }

    .lightbox-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

        .lightbox-btn.prev {
            left: 8px;
        }

        .lightbox-btn.next {
            right: 8px;
        }

    /* Sub-cards lose indentation on mobile */
    .gallery-item.sub {
        margin-left: 0;
        margin-right: 0;
    }

    .gallery-item.parent > .image-slider {
        height: 220px;
    }
}
