/* ================================================================
   style.css — Main Stylesheet for Home Server Project Site
   Dark cyberpunk/space aesthetic with cyan accent color.
   No JavaScript used — all interactivity via CSS only
   (:target for lightboxes/modals, :hover for transitions).
   ================================================================ */

/* ----------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   All colors and shadow values are defined here for easy theming
   ---------------------------------------------------------------- */
:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #111633;
    --bg-card: #1a1f3a;
    --text-primary: #e8e9f3;
    --text-secondary: #8b92b8;
    --accent-primary: #00d9ff;
    --accent-secondary: #8e2de2;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-glow: 0 8px 32px rgba(0, 217, 255, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    overscroll-behavior-y: none;
}


/* Animated radial gradient background overlay — purely decorative,
   pointer-events disabled so it doesn't block clicks */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(
            circle at 20% 50%,
            rgba(102, 126, 234, 0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 80%,
            rgba(118, 75, 162, 0.1) 0%,
            transparent 50%
        );
    pointer-events: none;
    z-index: 0;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 40px 60px;
    position: relative;
    z-index: 1;
}


/* ----------------------------------------------------------------
   Hero Section — Page header with title, subtitle, and action buttons
   ---------------------------------------------------------------- */
.hero {
    text-align: center;
    margin-bottom: 80px;
    animation: fadeInUp 1.4s ease backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-family: sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 20px;
    background: linear-gradient(
        135deg,
        var(--accent-primary) 0%,
        var(--accent-secondary) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    animation: fadeInUp 1.4s ease backwards;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-weight: 300;
    animation: fadeInUp 1.4s ease backwards;
}


/* General-purpose button style used in hero section links */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(0, 217, 255, 0.1);
    color: var(--accent-primary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    border: 2px solid var(--accent-primary);
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 217, 255, 0.2);
}

.btn:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 217, 255, 0.4);
}

.version-switch,
.source-code {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    margin-top: 30px;
    animation: fadeInUp 1.4s ease backwards;
}


/* ----------------------------------------------------------------
   Story Section — Card with a colored top border accent line
   ---------------------------------------------------------------- */
.story-section {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 50px 60px;
    margin-bottom: 80px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 217, 255, 0.1);
    animation: fadeInUp 1.4s ease backwards;
    position: relative;
    overflow: hidden;
}

.story-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--accent-primary),
        var(--accent-secondary)
    );
}

.section-title {
    font-family: sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 25px;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--accent-primary);
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}

.story-section p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 20px;
}


.easter-egg-section {
    margin-top: 30px;
    text-align: center;
}

.easter-egg-btn {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.easter-egg-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 48px rgba(102, 126, 234, 0.5);
}


/* ----------------------------------------------------------------
   Pros & Cons Cards
   Green border for pros card, red border for cons card
   ---------------------------------------------------------------- */
.pros-cons-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
    animation: fadeInUp 1.4s ease backwards;
}

.pros-card,
.cons-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: var(--shadow-card);
    border: 2px solid;
    transition: all 0.4s ease;
}

.pros-card {
    border-color: #10b981;
}

.pros-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(16, 185, 129, 0.3);
}

.cons-card {
    border-color: #ef4444;
}

.cons-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(239, 68, 68, 0.3);
}

.pros-cons-title {
    font-family: sans-serif;
    font-size: 1.6rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pros-card .pros-cons-title {
    color: #10b981;
}

.cons-card .pros-cons-title {
    color: #ef4444;
}

.pros-cons-list {
    list-style: none;
    padding: 0;
}

.pros-cons-list li {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
}

.pros-cons-list li::before {
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

.pros-card .pros-cons-list li::before {
    content: "✓";
    color: #10b981;
}

.cons-card .pros-cons-list li::before {
    content: "✗";
    color: #ef4444;
}


/* ----------------------------------------------------------------
   Services Section — Grid of service cards (Nextcloud, Jellyfin, etc.)
   Each card has a hover gradient overlay effect
   ---------------------------------------------------------------- */
.services-section {
    margin-bottom: 80px;
}

.services-intro {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInUp 1.4s ease backwards;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.service-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 217, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1.4s ease backwards;
}


.service-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.1) 0%,
        rgba(118, 75, 162, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 217, 255, 0.2);
    border-color: var(--accent-primary);
}

.service-card:hover::before {
    opacity: 1;
}


.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(
        135deg,
        var(--accent-primary),
        var(--accent-secondary)
    );
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 24px rgba(0, 217, 255, 0.2);
}

.service-icon img {
    position: relative;
    z-index: 1;
}

.service-card h3 {
    font-family: sans-serif;
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.service-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #10b981;
    position: relative;
    z-index: 1;
}

.service-status.inactive {
    color: #ef4444;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s ease infinite;
}

.service-status.inactive .status-dot {
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
    animation: none;
}

.service-status.on-demand {
    color: #a855f7;
}

.service-status.on-demand .status-dot {
    background: #a855f7;
    box-shadow: 0 0 10px #a855f7;
    animation: pulse-purple 2s ease-in-out infinite;
}


/* ----------------------------------------------------------------
   Gallery Section — 3-column CSS grid with hover zoom effect.
   Switches to 2 columns on tablet, 1 column on mobile.
   ---------------------------------------------------------------- */
.gallery-section {
    margin-bottom: 80px;
    animation: fadeInUp 1.4s ease backwards;
}

.gallery-note {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: -10px;
    margin-bottom: 30px;
    animation: fadeInUp 1.4s ease backwards;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: 100%;
    animation: fadeInUp 1.4s ease backwards;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 217, 255, 0.2);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}


.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.08);
}

.caption {
    padding: 18px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    background: var(--bg-card);
}


.gallery-item:hover .caption {
    transform: none;
}


/* ----------------------------------------------------------------
   CSS-only Lightbox
   Hidden by default (opacity:0, visibility:hidden).
   Becomes visible when targeted via URL anchor (:target).
   No JavaScript needed — pure CSS trick.
   ---------------------------------------------------------------- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox:target {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    text-decoration: none;
    line-height: 1;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    color: var(--accent-primary);
    transform: rotate(90deg);
}

.lightbox-container {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 217, 255, 0.3);
}


/* ----------------------------------------------------------------
   Easter Egg Modal Overlay
   Same CSS :target technique as lightbox.
   Backdrop-filter blur adds frosted glass effect behind the modal.
   ---------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal-overlay:target {
    opacity: 1;
    visibility: visible;
}

.modal-overlay-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.modal-content {
    background: var(--bg-card);
    padding: 50px 40px;
    border-radius: 24px;
    box-shadow: 0 20px 80px rgba(0, 217, 255, 0.3);
    text-align: center;
    max-width: 450px;
    border: 2px solid var(--accent-primary);
    animation: zoomIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 1000;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h2 {
    font-family: sans-serif;
    margin-bottom: 30px;
    color: var(--accent-primary);
    font-size: 1.8rem;
}

.modal-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.modal-btn {
    padding: 14px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    text-decoration: none;
    display: inline-block;
}

.modal-btn:hover {
    transform: translateY(-2px);
}

.modal-btn-yes {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.modal-btn-yes:hover {
    box-shadow: 0 12px 36px rgba(16, 185, 129, 0.5);
}

.modal-btn-no {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

.modal-btn-no:hover {
    box-shadow: 0 12px 36px rgba(239, 68, 68, 0.5);
}


/* Footer layout */
.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.source-link {
    color: var(--text-secondary);
    text-decoration: underline;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.source-link:hover {
    color: var(--accent-primary);
}

/* Button inside footer — gap controls spacing */
.footer .btn {
    margin-top: 0;
}


/* ----------------------------------------------------------------
   Table of Contents (Static)
   Responsive grid of anchor links.
   Left-side accent bar animates in on hover via scaleY transform.
   ---------------------------------------------------------------- */
.table-of-contents-static {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px 40px;
    margin-bottom: 60px;
    box-shadow: var(--shadow-card);
    border: 2px solid var(--accent-primary);
    animation: fadeInUp 1.4s ease backwards;
}

.table-of-contents-static h3 {
    font-family: sans-serif;
    font-size: 1.5rem;
    color: var(--accent-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-of-contents-static h3::before {
    content: "☰";
    font-size: 1.3rem;
}

.table-of-contents-static .toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.table-of-contents-static .toc-list li {
    margin: 0;
}

.table-of-contents-static .toc-list a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 217, 255, 0.1);
}

.table-of-contents-static .toc-list a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.table-of-contents-static .toc-list a:hover {
    background: rgba(0, 217, 255, 0.1);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    padding-left: 24px;
}

.table-of-contents-static .toc-list a:hover::before {
    transform: scaleY(1);
}

.specs-section {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 50px 60px;
    margin-bottom: 80px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 217, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.specs-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

.specs-section .section-title {
    color: var(--accent-primary);
    font-size: clamp(1.6rem, 3.5vw, 2.1rem);
    margin-bottom: 35px;
    text-align: center;
}

/* Specs grid layout */
.specs-grid {
    display: grid;
    grid-template-columns: minmax(0, 460px) 1.85fr;
    gap: 50px;
    align-items: start;
}

/* Photo column — desktop only */
.specs-photo-desktop {
    display: block;
    max-width: 460px;
    margin: 0 auto;
}

.specs-photo-desktop img {
    width: 100%;
    max-width: 460px;
    height: auto;
    display: block;
}

.specs-photo-mobile {
    display: none;
    margin-bottom: 35px;
    margin-top: 12px;
    text-align: center;
}

.specs-photo-mobile img {
    width: 100%;
    max-width: 520px;
    height: auto;
    display: block;
}


.specs-info h3 {
    font-family: sans-serif;
    font-size: 1.65rem;
    color: var(--accent-primary);
    margin-bottom: 25px;
}

.specs-list {
    list-style: none;
    padding: 0;
}

.specs-list li {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 16px;
    padding-left: 34px;
    position: relative;
}

.specs-list li strong {
    color: var(--text-primary);
}

.specs-list li::before {
    content: "•";
    position: absolute;
    left: 8px;
    color: var(--accent-primary);
    font-size: 1.5rem;
}

.faq-section h3,
.story-section h3 {
    color: #00d9ff;
    margin-top: 35px;
    margin-bottom: 12px;
    font-size: 1.35rem;
}


/* ----------------------------------------------------------------
   Responsive Breakpoints
   992px: tablet — gallery switches to 2 columns
   768px: mobile — reduced padding, story card loses background
   600px: small mobile — gallery collapses to single column
   ---------------------------------------------------------------- */
@media (max-width: 992px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-item img,
    .gallery-item video {
        height: 250px;
    }
    .specs-grid {
        grid-template-columns: 1fr;
    }

    .specs-photo-desktop {
        display: none;
    }

    .specs-photo-mobile {
        display: block !important;
    }

    .specs-info {
        padding-top: 10px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 80px 15px 40px;
    }

    .story-section {
        background: transparent;
        box-shadow: none;
        border: none;
        padding: 20px 10px;
    }

    .specs-section {
        padding: 40px 25px;
    }

    .specs-photo-mobile img {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .gallery {
        grid-template-columns: 1fr;
    }
    .specs-section {
        padding: 30px 18px;
    }

    .specs-info h3 {
        font-size: 1.45rem;
        margin-bottom: 18px;
    }

    .specs-list li {
        font-size: 1rem;
        line-height: 1.65;
        margin-bottom: 12px;
    }

    .specs-note {
        font-size: 0.9rem;
        padding: 14px 16px;
    }

    .photo-caption {
        font-size: 0.9rem;
    }
}


@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}


/* ----------------------------------------------------------------
   Back to Top Button
   Fixed circle button in bottom-right corner.
   Links to #hero anchor — no JavaScript required.
   ---------------------------------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;


    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-radius: 50%;
    text-decoration: none;
    box-shadow: var(--shadow-glow);
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

.back-to-top svg {
    display: block;
}


html {
    scroll-behavior: smooth;
}
