*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Basic Styles & Dark Theme */
body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
    color: #f4f4f4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Blueprint grid background */
    background-image: 
        linear-gradient(rgba(51, 51, 51, 0.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(51, 51, 51, 0.5) 1px, transparent 1px);
    background-size: 25px 25px;
    z-index: 1001;
    cursor: pointer;
}

.container {
    width: 80%;
    margin: 0 auto;
    max-width: 1200px;
}

/* Unconventional Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header-content {
    padding: 1.5rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    pointer-events: auto;
    font-size: 1.5rem;
    font-weight: bold;
    color: #f4f4f4;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    z-index: 1001; /* Above side panel */
}

.logo-svg:hover .logo-text {
    fill: #ffa500;
}

/* Side Panel */
.side-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-left: 1px solid #444;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}
.side-panel.is-open {
    transform: translateX(0);
    right: 0;
}
.side-panel nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}
.side-panel nav a, .side-panel nav button {
    font-size: 1.2rem;
    color: #f4f4f4;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
}
.side-panel nav .side-panel-button {
    background-color: #ff6600;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    display: inline-block;
}

/* Menu Toggle Button */
.menu-toggle {
    width: 30px;
    height: 22px;
    position: relative;
    cursor: pointer;
    background: transparent;
    border: none;
    z-index: 1001; /* Above side panel */
}
.menu-toggle span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #f4f4f4;
    border-radius: 3px;
    left: 0;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
.menu-toggle span:nth-child(1) { top: 0px; }
.menu-toggle span:nth-child(2) { top: 9px; }
.menu-toggle span:nth-child(3) { top: 18px; }

.menu-toggle.is-active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}
.menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.is-active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Hero Section */
.hero {
    background-image: url('assets/5.png');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 150px 0 120px 0;
    position: relative;
    /* Parallax is handled by JS */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 70%, rgba(26,26,26,1) 100%);
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 1200px;
}

.hero-title {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    overflow: hidden; /* Important for animation */
}

.hero-title span {
    display: block;
    opacity: 0; /* Start hidden */
    animation: slide-in 0.8s forwards ease-out;
}

.hero-title .hero-title-line {
    font-size: 2.8rem;
    line-height: 1.2;
    transform: translateX(-100%); /* Start off-screen to the left */
}

.hero-title .hero-title-line:nth-of-type(2) {
    transform: translateX(100%); /* Start off-screen to the right */
    animation-delay: 0.2s;
}

.hero-title .and-separator {
    font-size: 2rem;
    transform: translateY(50%);
    animation-delay: 0.8s;
}

.hero-title .hero-title-line-highlight {
    font-size: 4rem;
    line-height: 1.1;
    color: #ffa500;
    transform: scale(0.5); /* Start small */
}

.hero-title .hero-title-line-highlight:nth-of-type(3) {
    animation-delay: 0.4s;
}
.hero-title .hero-title-line-highlight:nth-of-type(5) {
    animation-delay: 0.6s;
}

@keyframes slide-in {
    to {
        transform: translateX(0) translateY(0) scale(1);
        opacity: 1;
    }
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.9);
}

/* General Section Styling */
section {
    padding: 20px 0; /* Reduced padding for the frame effect */
    background-color: transparent; /* Sections are now transparent */
    position: relative;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: bold;
    font-family: 'Courier New', Courier, monospace;
    color: #ff6600;
}

h3 {
    font-size: 1.5rem;
    color: #f4f4f4;
    margin-top: 0;
    margin-bottom: 1rem;
    font-family: 'Segoe UI', sans-serif;
}

/* Section Frame (HUD Style) */
.section-frame {
    border: 1px solid #444;
    padding: 3rem;
    position: relative;
    background-color: rgba(26, 26, 26, 0.9); /* Slight background to make text readable over grid */
}

.section-frame .corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: #ff6600;
    border-style: solid;
    opacity: 0;
    transition: opacity 0.5s ease-in-out, width 0.5s ease-in-out, height 0.5s ease-in-out;
}
.visible .section-frame .corner {
    opacity: 1;
    width: 40px;
    height: 40px;
}
.corner.top-left { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.corner.top-right { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.corner.bottom-left { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.corner.bottom-right { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

/* Scroll Animation */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Line Drawing Animation */
.section-divider {
    height: 50px;
    background-color: transparent;
}
.line-drawing path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 2s ease-in-out;
}

/* Advantages Section: Timeline Style */
.advantages-timeline {
    position: relative;
    padding: 2rem 0;
}
/* The central timeline bar */
.advantages-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background-color: #444;
}

.timeline-item {
    padding: 1rem 0;
    width: 50%;
    position: relative;
}
/* Position cards left and right */
.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 3rem;
    text-align: right;
}
.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 3rem;
}

/* Connector line from timeline to card */
.timeline-item::after {
    content: '';
    position: absolute;
    top: calc(50% - 1px);
    width: 2rem;
    height: 2px;
    background-color: #444;
    transition: background-color 0.3s ease;
}
.timeline-item:nth-child(odd)::after {
    right: 1rem;
}
.timeline-item:nth-child(even)::after {
    left: 1rem;
}
/* Connector dot on the timeline */
.timeline-item::before {
    content: '';
    position: absolute;
    top: calc(50% - 6px);
    width: 12px;
    height: 12px;
    background-color: #1a1a1a;
    border: 2px solid #444;
    border-radius: 50%;
    z-index: 1;
    transition: border-color 0.3s ease;
}
.timeline-item:nth-child(odd)::before {
    right: -7px;
}
.timeline-item:nth-child(even)::before {
    left: -7px;
}
/* Hover effects */
.timeline-item:hover::before {
    border-color: #ff6600;
}
.timeline-item:hover::after {
    background-color: #ff6600;
}
.timeline-item .advantage-card {
    background: transparent;
    border: none;
    padding: 0;
}
.timeline-item .advantage-card h3 {
    margin: 0 0 0.5rem 0;
}
.timeline-item:hover .advantage-card h3 {
    color: #ff6600;
}
.timeline-item .advantage-card .icon-placeholder {
    display: none; /* Icons don't fit well in this layout */
}

.document-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    border: 1px solid #ff6600;
    color: #ff6600;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
    font-size: 0.9rem;
}

.document-link:hover {
    background-color: #ff6600;
    color: #1a1a1a;
    font-weight: bold;
}

/* Projects Section: Dossier Style */
.projects .project-card {
    background: rgba(17, 17, 17, 0.8) url('assets/7.png');
    background-blend-mode: overlay;
    background-size: cover;
    border: 1px solid #555;
    padding: 0; /* Remove padding for header */
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden; /* To contain header */
}
.project-card-header {
    display: flex;
    justify-content: space-between;
    background-color: rgba(0,0,0,0.4);
    padding: 0.5rem 1.5rem;
    font-family: 'Courier New', Courier, monospace;
    color: #ff6600;
    border-bottom: 1px solid #555;
}
.projects .project-card h3, .projects .project-card p {
    padding: 0 1.5rem;
}
.projects .project-card h3 {
    margin-top: 1.5rem;
}
.projects .project-card p:last-child {
    padding-bottom: 1.5rem;
}

/* Equipment Section: Terminal Style v2 */
.equipment .section-frame {
    position: relative;
    /* Scanlines effect */
    background: linear-gradient(rgba(26, 26, 26, 0.9), rgba(26, 26, 26, 0.9)),
                repeating-linear-gradient(0deg, rgba(0,0,0,0.2), rgba(0,0,0,0.2) 1px, transparent 1px, transparent 3px);
}
.equipment-grid {
    gap: 3rem;
}
.equipment-list, .personnel-info {
    font-family: 'Courier New', Courier, monospace;
}
.equipment-list ul, .personnel-info ul {
    list-style: none;
    padding-left: 0;
    counter-reset: line;
}
.equipment-list li, .personnel-info li {
    background: transparent;
    padding: 0.25rem 1rem 0.25rem 3rem; /* Space for line number */
    margin-bottom: 0.5rem;
    position: relative;
    min-height: 1.2em; /* Ensure space for text to appear */
}
.equipment-list li::before, .personnel-info li::before {
    counter-increment: line;
    content: counter(line, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0.25rem;
    color: #888;
}
/* Blinking cursor at the end of the line */
.equipment-list li.visible, .personnel-info li.visible {
    animation: add-cursor 0.5s 1s forwards; /* Add cursor after typing delay */
}
@keyframes add-cursor {
    to {
        border-right: 2px solid #ff6600;
        animation: blink 1s step-end infinite;
    }
}
@keyframes blink {
    from, to { border-right-color: #ff6600; }
    50% { border-right-color: transparent; }
}
.equipment h3 { color: #ff6600; font-family: 'Courier New', Courier, monospace; }

/* Staggered List Animation */
.equipment-list li, .personnel-info li {
    transition-property: opacity, transform;
    transition-duration: 0.5s;
    transition-timing-function: ease-out;
}

/* CTA Section: "Energy Hub" Style */
.cta .section-frame {
    padding-bottom: 5rem; /* Extra space for the radial layout */
}
.values-grid {
    position: relative;
    width: 100%;
    min-height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}
/* Central Hub */
.values-grid::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #ff6600;
    border-radius: 50%;
    box-shadow: 0 0 15px #ff6600, 0 0 30px #ff6600;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(0.9); }
    70% { transform: scale(1.1); }
    100% { transform: scale(0.9); }
}
.cta .value-item {
    position: absolute;
    width: 200px; /* Width of the container */
    height: 100px; /* Height of the container */
    opacity: 0;
    transform-origin: center;
    transition: opacity 0.5s ease, transform 0.5s ease;
    /* Remove background and border from the rotating container */
    background: transparent;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
}
.value-item-content {
    background: rgba(42, 42, 42, 0.8);
    padding: 1rem 1.5rem;
    border: 1px solid #444;
    text-align: center;
    width: 100%;
    height: 100%; /* Make all boxes the same height */
    transition: border-color 0.3s ease;
    /* Center the text inside */
    display: flex;
    justify-content: center;
    align-items: center;
}
.value-item:hover .value-item-content {
    border-color: #ff6600;
}
/* Position items in a circle */
.cta.visible .value-item:nth-child(1) { transform: rotate(0deg)   translate(220px); transition-delay: 0.1s; opacity: 1; }
.cta.visible .value-item:nth-child(2) { transform: rotate(60deg)  translate(220px); transition-delay: 0.2s; opacity: 1; }
.cta.visible .value-item:nth-child(3) { transform: rotate(120deg) translate(220px); transition-delay: 0.3s; opacity: 1; }
.cta.visible .value-item:nth-child(4) { transform: rotate(180deg) translate(220px); transition-delay: 0.4s; opacity: 1; }
.cta.visible .value-item:nth-child(5) { transform: rotate(240deg) translate(220px); transition-delay: 0.5s; opacity: 1; }
.cta.visible .value-item:nth-child(6) { transform: rotate(300deg) translate(220px); transition-delay: 0.6s; opacity: 1; }

/* Counter-rotate the text content */
.cta.visible .value-item:nth-child(1) .value-item-content { transform: rotate(0deg); }
.cta.visible .value-item:nth-child(2) .value-item-content { transform: rotate(-60deg); }
.cta.visible .value-item:nth-child(3) .value-item-content { transform: rotate(-120deg); }
.cta.visible .value-item:nth-child(4) .value-item-content { transform: rotate(-180deg); }
.cta.visible .value-item:nth-child(5) .value-item-content { transform: rotate(-240deg); }
.cta.visible .value-item:nth-child(6) .value-item-content { transform: rotate(-300deg); }

/* Connector Lines */
.value-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -120px;
    width: 120px;
    height: 1px;
    background: #444;
    transform-origin: right;
    transform: scaleX(0);
    transition: transform 0.5s ease, background-color 0.3s ease;
}
.cta.visible .value-item::before {
    transform: scaleX(1);
}
/* Adjust connector delay to match item */
.cta.visible .value-item:nth-child(1)::before { transition-delay: 0.1s; }
.cta.visible .value-item:nth-child(2)::before { transition-delay: 0.2s; }
.cta.visible .value-item:nth-child(3)::before { transition-delay: 0.3s; }
.cta.visible .value-item:nth-child(4)::before { transition-delay: 0.4s; }
.cta.visible .value-item:nth-child(5)::before { transition-delay: 0.5s; }
.cta.visible .value-item:nth-child(6)::before { transition-delay: 0.6s; }

.value-item:hover::before {
    background-color: #ff6600;
}

/* Blueprint Footer */
footer {
    background: #111;
    color: #aaa;
    padding: 40px 0;
    font-family: 'Courier New', Courier, monospace;
}
.footer-blueprint {
    border: 1px solid #444;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.bp-col {
    border-left: 1px solid #444;
    padding-left: 1rem;
}
.bp-col p { margin: 0 0 0.5rem 0; font-size: 0.9rem; }
.bp-col strong { color: #ff6600; }
.copyright {
    text-align: center;
    color: #666;
    font-family: 'Segoe UI', sans-serif;
    font-size: 0.8rem;
}

/* === Responsive Design === */
@media (max-width: 768px) {
    .container {
        width: 90%;
    }

    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }

    /* Hero Text on Mobile */
    .hero .hero-title {
        line-height: 1.3;
    }
    .hero-title .hero-title-line {
        font-size: 1.8rem;
    }
    .hero-title .hero-title-line-highlight {
        font-size: 2.2rem;
    }
    .hero-title .and-separator {
        font-size: 1.5rem;
    }
    .hero p {
        font-size: 1rem;
    }

    /* Advantages Timeline on Mobile */
    .advantages-timeline::before {
        left: 10px; /* Move line further to the left */
    }
    .timeline-item, .timeline-item:nth-child(even) {
        width: 100%;
        left: 0;
        padding-left: 45px; /* Increase space for content */
        padding-right: 0;
        text-align: left;
    }
    .timeline-item:nth-child(odd) {
        text-align: left;
    }
    .timeline-item::before, .timeline-item:nth-child(even)::before {
        left: 4px; /* Align dot with the new line position */
        right: auto; /* Override desktop styles */
    }
    .timeline-item::after, .timeline-item:nth-child(even)::after {
        left: 16px; /* Start connector from the dot */
        width: 20px; /* Shorten the connector */
        right: auto; /* Override desktop styles */
    }
    .timeline-item .advantage-card h3 {
        font-size: 1.1rem;
    }
    .timeline-item .advantage-card p {
        font-size: 0.9rem;
        color: #ccc;
    }
    
    /* Equipment Grid on Mobile */
    .equipment-grid {
        grid-template-columns: 1fr;
    }

    /* CTA "Energy Hub" on Mobile */
    .values-grid {
        display: block; /* Change to block layout */
        min-height: auto;
    }
    .values-grid::after { /* Hide central hub */
        display: none;
    }
    .cta .value-item {
        position: static;
        width: 100%;
        margin-bottom: 1rem;
        opacity: 1; /* Make them visible by default */
        transform: none !important; /* Override inline transform */
        clip-path: polygon(0% 15%, 100% 0%, 100% 85%, 0% 100%); /* Simpler shape */
    }
    .cta .value-item::before { /* Hide connector lines */
        display: none;
    }
    .value-item-content { /* Remove counter-rotation */
        transform: none !important;
    }

    /* Footer on Mobile */
    .footer-blueprint {
        grid-template-columns: 1fr;
    }
    .bp-col {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid #444;
        padding-top: 1rem;
    }
    .bp-col:first-child {
        border-top: none;
        padding-top: 0;
    }

    .project-card h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
        color: #ffa500;
    }

    .project-card p {
        font-size: 0.9rem;
        color: #ccc;
        flex-grow: 1;
    }

    .project-card .project-file-info {
        font-family: 'Courier New', Courier, monospace;
        font-size: 0.8rem;
        border: 1px solid #444;
        padding: 5px 10px;
        margin-top: 15px;
        display: inline-block;
        background-color: rgba(0,0,0,0.3);
    }

    /* Projects Grid on Mobile */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: none; /* Allow grid to fill the screen width */
    }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 36px;
    color: #fff;
    cursor: pointer;
    line-height: 1;
}

.side-panel .side-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    z-index: 1001; /* Ensure logo is above other elements */
}

.logo-svg:hover .logo-text {
    fill: #ffa500;
}

.menu-toggle {
    z-index: 1001;
    cursor: pointer;
}

#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: #ff6600;
    color: white;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.4s, visibility 0.4s, transform 0.4s;
}

#scrollTopBtn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#scrollTopBtn:hover {
    background-color: #e65c00;
} 