:root {
    /* Color Variables */
    --primary-color: hsl(344, 100%, 60%);
    --secondary-color: #000; 
    --accent-color: hsl(204, 70%, 53%);
    --background-color: hsl(0, 0%, 10%);
    --text-color: hsl(0, 0%, 100%);
    --text-secondary: hsl(0, 0%, 80%);
    --header-bg-color: #111; 
    --why-section-bg-color: #000; 
    --background-line-color: hsla(0, 0%, 50%, 0.2);
    
    /* Spacing Variables */
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    
    /* Container Width */
    --container-width: 1200px;
}

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

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    position: relative;
}

main {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    height: 100vh;
}

main section {
    scroll-snap-align: center;
    max-width: 1100px;
    margin: 0 auto;
}

.legal-links {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.legal-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-links a:hover {
    color: var(--primary-color);
}

.tagline {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-top: var(--spacing-sm);
}

.brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: var(--spacing-md);
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--primary-color);
}


.glitch-text {
    font-weight: bold;
    color: var(--primary-color);
    text-transform: uppercase;
    position: relative;
    animation: glitch 3s infinite;
}
/* Mobile Responsiveness Base */
@media (min-width: 768px) {
    .glitch-text {
        font-size: 4rem;
    }
    
    .tagline {
        font-size: 1.5rem;
    }
    
    nav a {
        margin-left: var(--spacing-md);
    }
    .legal-links {
        font-size: 0.75rem;
    }
}
@media (max-width: 768px) {
    .glitch-text {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1.2rem;
    }
    
    nav a {
        margin-left: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .glitch-text {
        font-size: 2rem;
    }
    
    .brand {
        font-size: 1.2rem;
    }
    
    nav a {
        font-size: 0.9rem;
    }

    .legal-links {
        font-size: 0.7rem;
    }
}

/* Background Words */
.background-words {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.background-line {
    position: absolute;
    left: 0;
    width: 100%;
    color: var(--background-line-color); 
    font-size: 0.6rem;
    white-space: nowrap;
    user-select: none;
    font-family: monospace;
    line-height: 1.2;
}

/* Toolbar Styles */
.toolbar {
    background: var(--header-bg-color); 
    padding: var(--spacing-sm) 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.toolbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

section {
    height: 90vh;
}
/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 60px;
    background: transparent;
    position: relative;
}

/* Why Section with Swiper */
.why-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-color: var(--why-section-bg-color);
    padding: var(--spacing-lg) 0;
    position: relative;
}

.main-swiper {
    width: 100%;
    height: 80vh;
}

.swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-content {
    width: 90%;
    max-width: 1000px;
    padding: 2rem;
}

.first-slide {
    text-align: center;
}

.first-slide h2 {
    font-size: 3rem;
    color: white; 
    margin-bottom: 2rem;
}

.first-slide p {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.slide-flex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

/* Ensure proper spacing when subtitle is above SVG */
.subtitle-container + .slide-flex {
    margin-top: 0;
}

.slide-flex .slide-svg {
    width: 50rem;
    height: 28rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    transition: transform 0.3s ease;
}

.slide-flex .slide-svg:hover {
    transform: scale(1.02);
}

.slide-flex p {
    flex: 1;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Slide Bullets */
.slide-bullets {
    flex: 1;
    list-style: none;
    padding-left: 1.5rem;
}

.slide-bullets li {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    position: relative;
}

.slide-bullets li:before {
    content: "•";
    color: var(--primary-color);
    font-size: 1.6rem;
    position: absolute;
    left: -1.5rem;
    top: -0.2rem;
}

.slide-bullets li:last-child {
    margin-bottom: 0;
}

/* Swiper Navigation */
.swiper-button-next,
.swiper-button-prev {
    color: var(--primary-color);
    background: rgba(0, 0, 0, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 1.5rem;
}

.swiper-pagination-bullet {
    background: var(--text-secondary);
}

.swiper-pagination-bullet-active {
    background: var(--primary-color);
}

/* Projects Section */
.projects {
    padding: var(--spacing-lg) 0;
    background-color: var(--secondary-color);
    position: relative;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.project {
    background-color: var(--background-color);
    padding: var(--spacing-md);
    border-radius: 8px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.project:hover {
    transform: translateY(-5px);
}

.project h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.project .organization {
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.project .description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.project .more-link {
    color: var(--primary-color);
    text-decoration: underline;
    font-size: 0.9rem;
}

.project-details {
    margin-top: var(--spacing-md);
}

.project-detail {
    background-color: var(--background-color);
    padding: var(--spacing-md);
    border-radius: 8px;
    margin-bottom: var(--spacing-md);
}

.project-detail h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.project-detail .organization {
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 1rem;
}

.detail-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.detail-section h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.detail-section p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.detail-section:empty {
    display: none;
}

.detail-section:last-of-type {
    margin-bottom: 2rem;
}

.project-detail button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.project-detail button:hover {
    background-color: var(--accent-color);
}

/* Testimonials Section */
.testimonials {
    padding: var(--spacing-lg) 0;
    background-color: var(--background-color);
    position: relative;
}

.testimonial-slider {
    margin-top: var(--spacing-md);
}

.testimonial {
    background-color: var(--background-color);
    padding: var(--spacing-md);
    border-radius: 8px;
    margin-bottom: var(--spacing-md);
}

blockquote {
    font-style: italic;
    color: var(--text-secondary);
}

cite {
    display: block;
    margin-top: var(--spacing-sm);
    color: var(--primary-color);
}

/* Footer Styles */
.footer {
    background-color: var(--background-color);
    padding: var(--spacing-sm) 0;
    text-align: center;
    position: relative;
    z-index: 1000;
}

.separator {
    margin: 0 var(--spacing-sm);
    opacity: 0.5;
}

/* Subtitle Container */
.subtitle-container {
    text-align: center;
    width: 100%;
    min-height: 60px;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    opacity: 1 !important;
    z-index: 1;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}
#bad-engineering-container{
    color: yellow;
} 
.swiper-slide .subtitle-container,
.swiper-slide-duplicate .subtitle-container {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Slide Content Title */
.slide-content h2 {
    text-align: center;
    width: 100%;
    font-size: 3rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    position: relative;
}

@keyframes colorOscillate {
    0% { background: linear-gradient(90deg, var(--primary-color), var(--accent-color)); }
    33% { background: linear-gradient(90deg, var(--accent-color), var(--primary-color)); }
    66% { background: linear-gradient(90deg, var(--primary-color), var(--accent-color)); }
    100% { background: linear-gradient(90deg, var(--accent-color), var(--primary-color)); }
}

.slide-content h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

/* Special animation for "Some years later" slide */
.years-later::after {
    animation: colorOscillate 2s infinite !important;
}

/* Mobile Portrait Mode */
@media (orientation: portrait) {
    .first-slide p {
        font-size: 0.8rem;
    }
    .slide-flex {
        flex-direction: column;
        text-align: center;
    }

    .slide-content h2,
    .slide-content .subtitle-container,
    .first-slide h2 {
        font-size: 1.5rem;
    }
    .slide-bullets li {
        font-size: 1rem;
        margin-bottom: 0.6rem;
        position: relative;
    }

    .slide-flex img {
        width: 100%;
        max-height: 15rem;
    }

    .slide-bullets {
        padding-left: 0;
        text-align: left;
        margin: 0 auto;
        max-width: 80%;
    }

    .slide-bullets li {
        font-size: 1rem;
        color: white;
    }
    .slide-bullets li:before {
        top: -0.6rem;
    }
}

/* Early Stage SVG Styles */
.early-stage .node {
    fill: var(--primary-color);
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

.early-stage .connection {
    stroke: var(--text-secondary);
    stroke-width: 2;
    stroke-linecap: round;
    opacity: 0;
    animation: drawLine 1s ease-out forwards;
}

/* Bad Engineering SVG Styles */
.bad-engineering .node {
    fill: #ff4444;
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

.bad-engineering .connection {
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 1;
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

.bad-engineering line.connection {
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 1;
}

/* Good Engineering SVG Styles */
.good-engineering .node {
    fill: var(--accent-color);
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

.good-engineering .cluster-boundary {
    fill: none;
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 1.5;
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

.good-engineering .node {
    fill: var(--accent-color);
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

.good-engineering .connection {
    stroke: rgba(255, 255, 255, 0.8);
    stroke-width: 1.5;
    opacity: 0;
    animation: drawLine 1s ease-out forwards;
}

.good-engineering .cluster-connection {
    stroke-width: 2;
    stroke-linecap: round;
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
    pointer-events: none;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.2));
}

.good-engineering path.cluster-connection {
    stroke-opacity: 0.9;
}

/* Bloody Good Engineering SVG Styles */
.bloody-good .core-service {
    fill: var(--primary-color);
    animation: pulse 2s infinite;
}

.bloody-good .micro-service {
    fill: var(--accent-color);
}

.bloody-good .service-connections path {
    stroke: var(--text-secondary);
    stroke-width: 2;
    stroke-dasharray: 10,5;
    animation: flowLine 2s linear infinite;
}

/* Animation Keyframes */
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes drawLine {
    from { 
        opacity: 0;
        stroke-dasharray: 0 1000; 
    }
    to { 
        opacity: 1;
        stroke-dasharray: 1000 0; 
    }
}

@keyframes flowLine {
    to { stroke-dashoffset: -30; }
}

@keyframes braidedFlow {
    0% {
        stroke-dasharray: 5,10;
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dasharray: 5,10;
        stroke-dashoffset: -30;
    }
}

@keyframes fadeInPath {
    from { opacity: 0; }
    to { opacity: 0.6; }
}

@keyframes dynamicPathAppear {
    0% {
        opacity: 0;
        stroke-dasharray: 0,25;
    }
    100% {
        opacity: 0.4;
        stroke-dasharray: 10,15;
    }
}

@keyframes codetype {
    0% { stroke-dasharray: 0 100; }
    50% { stroke-dasharray: 100 0; }
    100% { stroke-dasharray: 0 100; }
}

