/* Color Theme Variables */
:root {
    /* Dark Theme - Reactor Core */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a2e;
    --bg-card: #16213e;
    --core-fire: #ff4b00;
    --plasma-heat: #ff9900;
    --fusion-glow: #ff004c;
    --reactor-energy: #00ffe5;
    --text-primary: #e1e5e9;
    --text-secondary: #ccccdd;
    --accent-green: #00ff44;
    --header-bg: rgba(26, 26, 46, 0.95);
    --sidebar-bg: rgba(22, 33, 62, 0.98);
    --grid-color: var(--fusion-glow);
}

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

body {
    font-family: 'Fira Sans', sans-serif;
    background-color: #0a0f1c;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Animated Blueprint Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(0deg, rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 255, 0.05) 0%,
        rgba(0, 255, 255, 0.15) 25%,
        rgba(255, 150, 0, 0.1) 50%,
        rgba(0, 255, 255, 0.05) 75%,
        rgba(0, 255, 255, 0.15) 100%
    );
    background-size: 100% 400%;
    mix-blend-mode: screen;
    animation: waveFlow 8s linear infinite;
    z-index: -1;
}

@keyframes waveFlow {
    from {
        background-position: 0% 100%;
    }
    to {
        background-position: 0% 0%;
    }
}

/* Sideways Ping-Pong Glow Animation */
@keyframes energyGlow {
    0% {
        transform: translateX(-150%);
        opacity: 0;
    }
    25% {
        opacity: 0.8;
    }
    75% {
        opacity: 0.8;
    }
    100% {
        transform: translateX(150%);
        opacity: 0;
    }
}

@keyframes particleFlow {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Header Bar */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--header-bg);
    border-bottom: 2px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 1000;
    transition: transform 0.3s ease;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 255, 229, 0.15) 30%,
        rgba(0, 204, 255, 0.22) 50%,
        rgba(0, 255, 229, 0.15) 70%,
        transparent 100%
    );
    animation: energyGlow 8s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
    filter: blur(1px);
}

.header.hidden {
    transform: translateY(-100%);
}

.header-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--core-fire);
    text-shadow: 0 0 10px rgba(255, 75, 0, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.header-title:hover {
    color: var(--plasma-heat);
    text-shadow: 0 0 15px rgba(255, 153, 0, 0.7);
}

.header-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.sidebar-toggle {
    background: var(--bg-card);
    border: 2px solid var(--reactor-energy);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
}

.sidebar-toggle:hover {
    background: var(--reactor-energy);
    color: var(--bg-primary);
    box-shadow: 0 0 15px rgba(0, 255, 229, 0.5);
}

/* Banner Section */
.banner {
    height: 400px;
    background-image: url('ReactorcoreCollageBanner.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    border-bottom: 2px solid var(--reactor-energy);
    margin-top: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(10, 10, 10, 0.3) 0%,
        rgba(26, 26, 46, 0.2) 50%,
        rgba(22, 33, 62, 0.3) 100%
    );
    z-index: 1;
}

.banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 80%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 136, 255, 0.18) 20%,
        rgba(0, 255, 229, 0.22) 40%,
        rgba(0, 157, 255, 0.2) 60%,
        rgba(0, 255, 229, 0.18) 80%,
        transparent 100%
    );
    animation: energyGlow 12s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: soft-light;
    filter: blur(2px);
}

.banner-content {
    text-align: center;
    z-index: 2;
    background: rgba(22, 33, 62, 0.9);
    padding: 2rem 3rem;
    border-radius: 15px;
    border: 2px solid var(--reactor-energy);
    box-shadow: 0 0 30px rgba(0, 255, 229, 0.3);
    backdrop-filter: blur(10px);
}

.banner h1 {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 900;
    color: var(--core-fire);
    text-shadow: 0 0 20px rgba(255, 75, 0, 0.8);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.banner p {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--reactor-energy);
    text-shadow: 0 0 10px rgba(0, 255, 229, 0.5);
    letter-spacing: 1px;
}

/* Main Content */
.main-content {
    display: flex;
    min-height: calc(100vh - 260px);
}

.content-area {
    flex: 1;
    padding: 2rem;
    transition: margin-right 0.3s ease;
}

.content-area.sidebar-open {
    margin-right: 33.33%;
}

/* Project Cards Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.project-card {
    background: var(--bg-card);
    border: 2px solid var(--reactor-energy);
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 255, 229, 0.16) 40%,
        rgba(0, 30, 255, 0.15) 60%,
        transparent 100%
    );
    animation: energyGlow 15s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
    filter: blur(1px);
}

.project-card:hover {
    border-color: var(--core-fire);
    box-shadow: 0 8px 25px rgba(255, 75, 0, 0.4);
}

.project-card h3 {
    font-family: 'Orbitron', monospace;
    color: var(--core-fire);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 5px rgba(255, 75, 0, 0.5);
    padding-right: 2rem;
    position: relative;
    z-index: 1;
}

.status-dot {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 12px;
    height: 12px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
    box-shadow: 0 0 8px var(--accent-green);
    z-index: 2;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.project-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--reactor-energy);
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.project-hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.card-footer {
    position: relative;
    margin-top: auto;
    height: 60px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 1;
}

.visit-button {
    background: var(--accent-green);
    color: #000;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 8px var(--accent-green);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: pulse-glow 2s ease-in-out infinite;
    position: relative;
}

.project-card:hover .visit-button {
    background: #00cc37;
    box-shadow: 0 0 15px var(--accent-green);
    transform: translateY(-2px);
}


.hashtag {
    background: var(--plasma-heat);
    color: #000;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    border: 1px solid var(--plasma-heat);
    transition: all 0.3s ease;
}

.hashtag:hover {
    background: #ffaa00;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 60px;
    right: -33.33%;
    width: 33.33%;
    height: calc(100vh - 60px);
    background: var(--sidebar-bg);
    border-left: 2px solid var(--border-primary);
    padding: 2rem;
    overflow-y: auto;
    transition: right 0.3s ease;
    backdrop-filter: blur(5px);
    z-index: 999;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 70%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 255, 229, 0.08) 35%,
        rgba(0, 30, 255, 0.06) 65%,
        transparent 100%
    );
    animation: energyGlow 10s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
    filter: blur(1px);
}

.sidebar.open {
    right: 0;
}

.sidebar-section {
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.sidebar-section h3 {
    font-family: 'Orbitron', monospace;
    color: var(--core-fire);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 0 8px rgba(255, 75, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--reactor-energy);
    padding-bottom: 0.5rem;
}

.sidebar-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.sidebar-links a {
    color: #ffffff;
    text-decoration: none;
    display: block;
    padding: 1rem 1.2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #1111eeac;
    border: 2px solid #116dee;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    position: relative;
}

.sidebar-links a:hover {
    background: #1111eeee;
    color: var(--reactor-energy);
    border-color: var(--reactor-energy);
    box-shadow: 0 8px 25px rgba(0, 255, 229, 0.4);
}

.sidebar-links .link-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.4rem;
    font-weight: 400;
    line-height: 1.3;
}

.intro-text {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--reactor-energy);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-family: 'Fira Sans', sans-serif;
}

.intro-text strong {
    font-weight: 700;
    color: var(--reactor-energy);
    text-shadow: 0 0 5px rgba(0, 255, 229, 0.3);
}

.cta-text {
    background: linear-gradient(135deg, var(--core-fire), var(--plasma-heat));
    color: #000;
    padding: 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(255, 75, 0, 0.3);
    font-family: 'Fira Sans', sans-serif;
}

.cta-text strong {
    font-weight: 700;
}

/* Sidebar Tabs */
.sidebar-tabs {
    display: flex;
    border-bottom: 2px solid var(--reactor-energy);
    margin-bottom: 1.5rem;
    gap: 0;
}

.tab-button {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.8rem 0.5rem;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
    text-align: center;
}

.tab-button:hover {
    background: rgba(0, 255, 229, 0.1);
    color: var(--reactor-energy);
}

.tab-button.active {
    color: var(--reactor-energy);
    border-bottom-color: var(--reactor-energy);
    background: rgba(0, 255, 229, 0.15);
    text-shadow: 0 0 8px rgba(0, 255, 229, 0.5);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Quick Intro Styling */
.quick-intro {
    background: linear-gradient(135deg, rgba(0, 255, 229, 0.1), rgba(255, 75, 0, 0.1));
    padding: 0.8rem;
    border-radius: 12px;
    border: 2px solid var(--reactor-energy);
    margin-bottom: 0.5rem;
    text-align: center;
}

.quick-intro p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

.cta-highlight {
    background: var(--reactor-energy);
    color: var(--bg-primary);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 255, 229, 0.4);
    transition: all 0.3s ease;
}

.cta-highlight:hover {
    box-shadow: 0 6px 20px rgba(0, 255, 229, 0.6);
}

/* Accordion Sections */
.accordion-section {
    margin-bottom: 1rem;
    border: 2px solid rgba(0, 255, 229, 0.3);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
    transition: all 0.3s ease;
}

.accordion-section:hover {
    border-color: var(--reactor-energy);
    box-shadow: 0 4px 15px rgba(0, 255, 229, 0.2);
}

.accordion-header {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1rem 1.2rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    text-align: left;
}

.accordion-header:hover {
    background: rgba(0, 255, 229, 0.1);
    color: var(--reactor-energy);
}

.accordion-header.active {
    background: rgba(0, 255, 229, 0.15);
    color: var(--reactor-energy);
    border-bottom: 1px solid rgba(0, 255, 229, 0.3);
}

.accordion-icon {
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s ease;
    color: var(--reactor-energy);
}

.accordion-header.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
}

.accordion-content.active {
    max-height: 1000px;
    padding: 1.2rem;
}

.accordion-content p {
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.accordion-content p:last-child {
    margin-bottom: 0;
}

.accordion-content strong {
    color: var(--reactor-energy);
    font-weight: 600;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
    border-top: 2px solid var(--reactor-energy);
    padding: 3rem 2rem 2rem;
    text-align: center;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 90%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 51, 255, 0.17) 25%,
        rgba(0, 255, 229, 0.19) 50%,
        rgba(0, 21, 255, 0.16) 75%,
        transparent 100%
    );
    animation: energyGlow 14s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
    filter: blur(2px);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--core-fire), var(--plasma-heat), var(--reactor-energy), var(--fusion-glow));
    animation: footer-glow 3s ease-in-out infinite;
}

@keyframes footer-glow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.footer-links a {
    color: var(--reactor-energy);
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--reactor-energy);
    border-radius: 25px;
    background: rgba(0, 255, 229, 0.1);
}

.footer-links a:hover {
    background: var(--reactor-energy);
    color: var(--bg-primary);
    box-shadow: 0 6px 20px rgba(0, 255, 229, 0.4);
}

.footer p {
    color: var(--text-secondary);
    font-family: 'Fira Sans', sans-serif;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.footer p:first-of-type {
    font-family: 'Orbitron', monospace;
    color: var(--core-fire);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 8px rgba(255, 75, 0, 0.5);
}

.footer p:last-of-type {
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
    background: rgba(22, 33, 62, 0.6);
    border-radius: 10px;
    border: 1px solid var(--reactor-energy);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        right: -100%;
    }

    .content-area.sidebar-open {
        margin-right: 0;
    }

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

    .header {
        padding: 0 1rem;
    }

    .header-title {
        font-size: 1.2rem;
    }

    .content-area {
        padding: 1rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    /* Mobile adjustments for project cards */

    .visit-button {
        font-size: 0.9rem;
        padding: 0.8rem 1.5rem;
    }

    .status-dot {
        width: 10px;
        height: 10px;
        top: 1rem;
        right: 1rem;
    }

    .card-footer {
        height: 50px;
    }
}

/* Additional responsive adjustments for smaller cards when sidebar is open */
@media (min-width: 769px) and (max-width: 1200px) {

    .content-area.sidebar-open .visit-button {
        font-size: 0.9rem;
        padding: 0.8rem 1.5rem;
    }
}