/* LB-Epidemiology - Main CSS - Mobile First Optimized */

:root {
    --primary-dark: #1a4c5c;      /* Deep teal from logo */
    --primary-medium: #2d7a5f;    /* Medium teal-green */
    --primary-light: #4db373;     /* Light green */
    --accent-yellow: #a8d446;     /* Bright lime from logo */
    --accent-bright: #c8e853;     /* Bright yellow-green */
    
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --background: #ffffff;
    --background-secondary: #f7fafc;
    --background-dark: #1a202c;
    
    --gradient-primary: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 25%, var(--primary-light) 50%, var(--accent-yellow) 75%, var(--accent-bright) 100%);
    --gradient-secondary: linear-gradient(45deg, var(--primary-medium), var(--accent-yellow));
    --gradient-overlay: linear-gradient(135deg, rgba(26, 76, 92, 0.9), rgba(77, 179, 115, 0.8));
    
    /* Mobile-first viewport variables */
    --nav-height-mobile: 70px;
    --nav-height-desktop: 100px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container - Mobile First */
.section__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation - Mobile First Design */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 0.25rem 0;
}

.nav__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
}

.nav__logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    z-index: 1001;
}

/* Mobile Logo Sizes - Exact as requested */
.nav__logo img {
    height: 40px; /* Mobile: 40px as requested */
    width: auto;
    transition: all 0.3s ease;
    max-width: 200px;
}

.nav.scrolled .nav__logo img {
    height: 30px; /* Mobile scrolled: even smaller */
}

/* Mobile Navigation Menu */
.nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.3s ease;
    z-index: 1000;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    list-style: none;
}

.nav__menu.active {
    right: 0;
}

.nav__link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    font-size: 1.2rem;
    padding: 1rem;
    width: 100%;
    text-align: center;
}

.nav__link:hover {
    color: var(--primary-medium);
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-secondary);
    transition: width 0.3s ease;
}

.nav__link:hover::after {
    width: 80%;
}

/* Mobile Navigation Toggle */
.nav__toggle {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    background: none;
    border: none;
    position: relative;
    z-index: 1001;
}

.nav__hamburger {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.nav__toggle.active .nav__hamburger:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle.active .nav__hamburger:nth-child(2) {
    opacity: 0;
}

.nav__toggle.active .nav__hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.nav__overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav__overlay.active {
    display: block;
    opacity: 1;
}

/* Hero Section - Mobile First */
.hero {
    min-height: 100vh;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 100px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    animation: moveGrid 20s linear infinite;
}

.hero__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.hero__content {
    max-width: 600px;
    color: white;
}

.hero__tagline {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero__title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero__description {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    line-height: 1.6;
    animation: fadeInUp 1s ease 0.6s both;
}

/* DNA Animation - Hidden on mobile for performance */
.dna-animation {
    display: none;
}

/* Floating Metrics - Mobile Optimized */
.metrics {
    position: static;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    padding: 0 1rem;
}

.metric-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    padding: 1.25rem;
    border-radius: 16px;
    text-align: center;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: float 3s ease-in-out infinite;
    width: 100%;
    max-width: 200px;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.metric-card:nth-child(2) {
    animation-delay: 1s;
}

.metric-card:nth-child(3) {
    animation-delay: 2s;
}

.metric-card__number {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: white; /* Fallback */
}

.metric-card__label {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.3;
}

/* Sections - Mobile First */
.platforms {
    padding: 4rem 0;
}

.bioinfo {
    padding: 4rem 0;
    background: var(--background-secondary);
}

.projects {
    padding: 4rem 0;
}

.section__header {
    text-align: center;
    margin-bottom: 3rem;
}

.section__title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.3;
}

.section__description {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Platforms Grid - Mobile First */
.platforms-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.platform-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.platform-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-secondary);
}

.platform-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.platform-card__icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-secondary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    color: white;
}

.platform-card__title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.platform-card__description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.platform-card__features {
    list-style: none;
}

.platform-card__features li {
    padding: 0.4rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.platform-card__features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-yellow);
    font-weight: bold;
}

/* Terminal - Mobile Optimized */
.terminal-window {
    background: var(--background-dark);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.terminal-header {
    background: rgba(51, 65, 85, 0.8);
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-body {
    padding: 1rem;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.8rem;
    min-height: 250px;
    overflow-y: auto;
    max-height: 400px;
}

.terminal-content {
    color: rgba(255, 255, 255, 0.8);
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.4;
}

.terminal-content .command {
    color: var(--primary-medium);
}

.terminal-content .success {
    color: var(--accent-yellow);
}

.terminal-content .sequence {
    color: var(--primary-light);
    font-weight: bold;
}

.terminal-content .warning {
    color: #f59e0b;
}

/* Projects - Mobile Optimized */
.project-list {
    list-style: none;
    max-width: 800px;
    margin: 0 auto;
}

.project-list li {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
    font-size: 0.95rem;
    line-height: 1.6;
}

.project-list li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-secondary);
}

.project-list li:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Footer - Mobile First */
.footer {
    background: var(--background-dark);
    color: white;
    padding: 2rem 0 1rem;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer__section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: white; /* Fallback */
}

.footer__links {
    list-style: none;
}

.footer__links li {
    margin-bottom: 0.5rem;
}

.footer__links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer__links a:hover {
    color: var(--accent-yellow);
}

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

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

@keyframes moveGrid {
    0% { transform: translate(0, 0); }
    100% { transform: translate(10px, 10px); }
}

@keyframes rotateDNA {
    0% { transform: translateY(-50%) rotateY(0deg); }
    100% { transform: translateY(-50%) rotateY(360deg); }
}

@keyframes pulseStrand {
    0%, 100% { 
        opacity: 1;
        stroke-width: 4;
    }
    50% { 
        opacity: 0.6;
        stroke-width: 6;
    }
}

@keyframes pulsePairs {
    0%, 100% { 
        opacity: 0.7;
    }
    50% { 
        opacity: 0.3;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Touch Improvements */
.platform-card,
.metric-card,
.project-list li {
    -webkit-tap-highlight-color: rgba(45, 122, 95, 0.1);
    touch-action: manipulation;
}

/* Tablet Responsive Design */
@media (min-width: 768px) {
    .section__container {
        padding: 0 2rem;
    }
    
    .nav__container {
        padding: 0 2rem;
    }
    
    .nav__logo img {
        height: 80px; /* Tablet: zwischen mobile und desktop */
    }
    
    .nav.scrolled .nav__logo img {
        height: 50px; /* Tablet scrolled */
    }
    
    .nav__menu {
        position: static;
        width: auto;
        height: auto;
        background: none;
        backdrop-filter: none;
        flex-direction: row;
        justify-content: flex-end;
        box-shadow: none;
        gap: 2rem;
    }
    
    .nav__toggle {
        display: none;
    }
    
    .nav__link {
        font-size: 1.1rem;
        padding: 0;
        width: auto;
        text-align: left;
    }
    
    .nav__link::after {
        bottom: -5px;
        left: 0;
        transform: none;
    }
    
    .nav__link:hover::after {
        width: 100%;
    }
    
    .hero__title {
        font-size: 2.8rem;
    }
    
    .hero__description {
        font-size: 1.2rem;
    }
    
    .section__title {
        font-size: 2.3rem;
    }
    
    .section__description {
        font-size: 1.1rem;
    }
    
    .platforms-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 2rem;
    }
    
    .platform-card {
        padding: 2rem;
    }
    
    .platform-card__icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .platform-card__title {
        font-size: 1.5rem;
    }
    
    .platform-card__description {
        font-size: 1rem;
    }
    
    .platform-card__features li {
        font-size: 0.95rem;
    }
    
    .terminal-body {
        padding: 2rem;
        font-size: 0.9rem;
        min-height: 300px;
    }
    
    .project-list li {
        padding: 2rem;
        font-size: 1rem;
    }
    
    .metrics {
        flex-direction: row;
        justify-content: center;
        gap: 2rem;
    }
    
    .metric-card {
        width: auto;
        min-width: 150px;
    }
    
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop Responsive Design */
@media (min-width: 1024px) {
    .nav__logo img {
        height: 200px !important; /* Desktop: 200px as requested */
    }
    
    .nav.scrolled .nav__logo img {
        height: 100px !important; /* Desktop scrolled: 100px */
    }
    
    .hero {
        padding-top: 120px;
    }
    
    .hero__title {
        font-size: 3.5rem;
    }
    
    .hero__description {
        font-size: 1.25rem;
    }
    
    .section__title {
        font-size: 2.5rem;
    }
    
    .dna-animation {
        display: block;
        position: absolute;
        right: 10%;
        top: 50%;
        transform: translateY(-50%);
        width: 200px;
        height: 400px;
        opacity: 0.8;
    }
    
    .dna-animation svg {
        width: 100%;
        height: 100%;
        animation: rotateDNA 15s linear infinite;
    }
    
    .dna-strand-1 {
        animation: pulseStrand 4s ease-in-out infinite;
    }
    
    .dna-strand-2 {
        animation: pulseStrand 4s ease-in-out infinite 2s;
    }
    
    .base-pairs line {
        animation: pulsePairs 3s ease-in-out infinite;
    }
    
    .base-pairs line:nth-child(even) {
        animation-delay: 1.5s;
    }
    
    .metrics {
        position: absolute;
        bottom: 10%;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
        margin-top: 0;
    }
    
    .metric-card__number {
        font-size: 2rem;
    }
    
    .platforms {
        padding: 6rem 0;
    }
    
    .bioinfo {
        padding: 6rem 0;
    }
    
    .projects {
        padding: 6rem 0;
    }
    
    .section__header {
        margin-bottom: 4rem;
    }
    
    .footer__grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .footer {
        padding: 3rem 0 2rem;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .dna-animation {
        right: 15%;
        width: 250px;
        height: 450px;
    }
}

/* iOS Specific Fixes */
@supports (-webkit-touch-callout: none) {
    .hero {
        min-height: -webkit-fill-available;
    }
    
    .nav__menu {
        padding-bottom: env(safe-area-inset-bottom);
    }
}