/* --- Variables & Reset --- */
:root {
    /* Color Palette */
    --clr-dark: #0f1115;
    --clr-light: #f5f5f5;
    
    /* Engineer Vibe */
    --clr-devops-primary: #00ff41; /* Terminal green */
    --clr-devops-bg: #1a1c23;
    --clr-devops-text: #a0aab2;
    --clr-devops-accent: #ff003c;
    
    /* Athlete Vibe */
    --clr-athlete-primary: #ff4500; /* Energetic Orange */
    --clr-athlete-bg: #e6e6e6;
    --clr-athlete-text: #2a2a2a;
    
    /* Typography */
    --font-heading: 'Syncopate', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-code: 'JetBrains Mono', monospace;

    /* Transitions */
    --transition-smooth: 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-fast: 0.3s ease;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--clr-dark);
    color: var(--clr-light);
    overflow: hidden; /* Prevent scrolling, fully contained split screen */
    height: 100vh;
    width: 100vw;
}

/* --- Layout: Split Container --- */
.split-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
}

/* Base Split Styles */
.split {
    position: relative;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: width var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Expand on Hover/Active */
/* On desktop we use hover, on mobile JS will toggle classes */
@media (min-width: 769px) {
    .left-split:hover {
        width: 75%;
    }
    .left-split:hover ~ .right-split {
        width: 25%;
    }
    
    /* Right split hover logic requires wrapping or JS for perfect sibling selection, 
       but standard flex stretch works well here */
    .split-container:has(.right-split:hover) .left-split {
        width: 25%;
    }
    .split-container:has(.right-split:hover) .right-split {
        width: 75%;
    }
}

/* Expanded State Classes (driven by JS for mobile/click) */
.split.active {
    width: 85% !important;
}
.split.inactive {
    width: 15% !important;
    filter: brightness(0.4) grayscale(0.8);
    pointer-events: none;
}


/* --- Backgrounds --- */
.split-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; /* Changed from 100vw so the video fits the panel nicely */
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    transition: transform var(--transition-smooth), filter var(--transition-smooth);
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.devops-overlay {
    background-image: linear-gradient(rgba(26, 28, 35, 0.9), rgba(26, 28, 35, 0.95));
}

.athlete-overlay {
    background-image: linear-gradient(rgba(230, 230, 230, 0.7), rgba(0,0,0,0.8));
    left: auto;
    right: 0;
}

.athlete-bg-video {
    /* Adjust alignment for right side so video stays anchored */
    left: auto;
    right: 0;
}

/* Parallax/Zoom effect on active */
.split.active .split-bg,
.split:hover .split-bg {
    transform: scale(1.05);
}


/* --- Content Formatting --- */
.content {
    position: relative;
    z-index: 2;
    padding: 4rem;
    width: 100%;
    max-width: 800px; /* Limit width even when expanded */
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    opacity: 0.6;
    transition: opacity var(--transition-smooth), transform var(--transition-smooth);
    transform: translateY(20px);
}

.split:hover .content,
.split.active .content {
    opacity: 1;
    transform: translateY(0);
}

.header-intro {
    margin-bottom: 2rem;
}

.overline {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

h1 {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 5vw, 6rem);
    line-height: 1;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

h2 {
    font-weight: 300;
    font-size: clamp(1.5rem, 2vw, 2.5rem);
    opacity: 0.8;
}

.details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity var(--transition-smooth), max-height var(--transition-smooth);
}

/* Only show details when expanded */
.split:hover .details,
.split.active .details {
    opacity: 1;
    max-height: 800px;
    margin-bottom: 2rem;
}

.social-links {
    margin-top: auto;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

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


/* --- Left Side: DevOps Specifics --- */
.left-split {
    color: var(--clr-light);
}

.left-split .overline {
    font-family: var(--font-code);
    color: var(--clr-devops-primary);
}

.glitch {
    position: relative;
    color: white;
}
/* Simple glitch effect pseudo elements */
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}
.glitch::before {
    left: 2px;
    text-shadow: -1px 0 red;
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}
.glitch::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 81px, 0); }
    10% { clip: rect(66px, 9999px, 20px, 0); }
    20% { clip: rect(32px, 9999px, 98px, 0); }
    30% { clip: rect(89px, 9999px, 45px, 0); }
    40% { clip: rect(11px, 9999px, 60px, 0); }
    50% { clip: rect(4px, 9999px, 34px, 0); }
    60% { clip: rect(78px, 9999px, 12px, 0); }
    70% { clip: rect(54px, 9999px, 88px, 0); }
    80% { clip: rect(92px, 9999px, 23px, 0); }
    90% { clip: rect(15px, 9999px, 77px, 0); }
    100% { clip: rect(44px, 9999px, 9px, 0); }
}

.terminal-window {
    background: rgba(10, 10, 15, 0.85);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    font-family: var(--font-code);
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.terminal-header {
    background: rgba(255,255,255,0.05);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-header .title {
    margin-left: auto;
    margin-right: auto;
    color: #888;
    font-size: 0.8rem;
}

.terminal-body {
    padding: 20px;
    color: var(--clr-devops-text);
    font-size: 0.9rem;
    line-height: 1.6;
    max-height: 50vh; /* Allow it to take up to half the screen height */
    overflow-y: auto; /* Enable vertical scrolling */
}

/* Custom scrollbar for the terminal to keep the sleek look */
.terminal-body::-webkit-scrollbar {
    width: 6px;
}
.terminal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2); 
}
.terminal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1); 
    border-radius: 3px;
}
.terminal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2); 
}

.prompt {
    color: var(--clr-devops-primary);
    font-weight: bold;
}

.terminal-body .output {
    margin-bottom: 1.5rem;
    color: #cbd5e1;
}

.project-card h3 {
    color: var(--clr-devops-primary);
    font-size: 1rem;
    margin-bottom: 0.2rem;
}
.project-card p {
    font-size: 0.85rem;
    color: #888;
}

.code-btn {
    background: rgba(0, 255, 65, 0.1);
    color: var(--clr-devops-primary);
    border: 1px solid var(--clr-devops-primary);
}
.code-btn:hover {
    background: var(--clr-devops-primary);
    color: var(--clr-devops-bg);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
}

/* --- Right Side: Athlete Specifics --- */
.right-split {
    color: var(--clr-light); /* Make white on dark bg image */
    text-align: right;
    align-items: flex-end;
}

.right-split .content {
    align-items: flex-end;
}

.right-split .overline {
    color: var(--clr-athlete-primary);
    font-weight: bold;
}

.bold-header {
    font-family: var(--font-heading);
    font-weight: 800;
    font-style: italic;
    letter-spacing: -2px;
    color: transparent;
    -webkit-text-stroke: 1px white;
    transition: all 0.3s ease;
}

.split.active .bold-header,
.split:hover .bold-header {
    color: white;
    -webkit-text-stroke: 0px white;
    text-shadow: 4px 4px 0px var(--clr-athlete-primary);
}

.athlete-stats {
    width: 100%;
    margin-bottom: 2rem;
}

.stat-card {
    text-align: left;
    margin-bottom: 1rem;
}

.stat-card h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.stat-detail {
    font-family: var(--font-code);
    font-size: 0.95rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 0.25rem;
}

.stat-detail strong {
    color: var(--clr-athlete-primary);
    font-weight: 700;
}

.stat-detail.sub {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
    margin-top: 0.5rem;
}

.bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    overflow: hidden;
}

.bar {
    height: 100%;
    background: var(--clr-athlete-primary);
    width: 0;
    transition: width 1.5s cubic-bezier(0.1, 0.5, 0.1, 1);
}

.split:hover .strength-bar, .split.active .strength-bar { width: 90%; }
.split:hover .endurance-bar, .split.active .endurance-bar { width: 85%; }

.philosophy p {
    font-size: 1.25rem;
    font-style: italic;
    border-right: 4px solid var(--clr-athlete-primary);
    padding-right: 1rem;
    color: rgba(255,255,255,0.9);
}

.sport-btn {
    background: var(--clr-athlete-primary);
    color: white;
    border: none;
}
.sport-btn:hover {
    box-shadow: 0 10px 20px rgba(255, 69, 0, 0.3);
}

/* --- Branding --- */
.center-brand {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    pointer-events: none;
    background: var(--clr-dark);
    padding: 1rem 2rem;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-radius: 4px;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.split-container:has(.split:hover) .center-brand,
.split-container:has(.split.active) .center-brand {
    opacity: 0;
    transform: translate(-50%, -60%);
}

.name-logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 4px;
    margin: 0;
    white-space: nowrap;
}

.center-quote {
    font-size: 0.8rem;
    line-height: 1.4;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.8rem;
    max-width: 350px;
    font-style: italic;
    white-space: pre-wrap;
}

/* --- Mobile Specifics --- */
.mobile-nav {
    display: none;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: rgba(0,0,0,0.7);
    padding: 5px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.mobile-nav button {
    background: transparent;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
}

.mobile-nav button.active {
    background: white;
    color: black;
    font-weight: bold;
}

@media (max-width: 768px) {
    /* Stack them vertically or manage states differently */
    .split-container {
        flex-direction: column;
    }
    .split {
        width: 100%;
        height: 50%; /* Default 50/50 split */
        transition: height var(--transition-smooth);
    }
    
    .split.active {
        height: 80% !important;
        width: 100% !important;
    }
    
    .split.inactive {
        height: 20% !important;
        width: 100% !important;
    }

    .split-bg, .bg-overlay {
        height: 100% !important;
    }

    /* Reset width transitions inherited from desktop */
    .left-split:hover { width: 100%; }
    .split-container:has(.right-split:hover) .left-split { width: 100%; }
    .split-container:has(.right-split:hover) .right-split { width: 100%; }

    .content {
        padding: 2rem;
    }
    
    .center-brand {
        display: none; /* Hide center logo on small screens to save space */
    }

    .mobile-nav {
         display: flex;
    }

    /* Adjust typography */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.2rem; }
    
    /* Make details scrollable if needed */
    .details {
        overflow-y: auto;
        padding-bottom: 2rem;
    }
}
