/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --secondary-color: #6c757d;
    --secondary-hover: #545b62;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-bg: #f8f9fa;
    --dark-text: #333;
    --light-text: #666;
    --border-color: #ddd;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    background: #0a0a0a;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(0,100,200,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0,200,100,0.08) 0%, transparent 50%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-feature-settings: 'liga' 1, 'calt' 1; /* Enable ligatures for Inter */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: var(--dark-text);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.navbar .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 0;  /* Removed top padding since navbar is gone */
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    opacity: 0.9;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--dark-text);
}

.page-header .subtitle {
    color: var(--light-text);
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.project-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tech-badge {
    background-color: var(--light-bg);
    color: var(--dark-text);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 20px;  /* Moved up since navbar is removed */
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

.flash {
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.flash-success {
    background-color: var(--success-color);
    color: white;
}

.flash-error {
    background-color: var(--error-color);
    color: white;
}

.flash-warning {
    background-color: var(--warning-color);
    color: var(--dark-text);
}

.flash-info {
    background-color: var(--info-color);
    color: white;
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    margin-left: 1rem;
    line-height: 1;
}

/* Error Pages */
.error-page {
    text-align: center;
    padding: 4rem 2rem;
}

.error-content {
    max-width: 600px;
    margin: 0 auto;
}

.error-code {
    font-size: 6rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.2rem;
    color: var(--light-text);
    margin-bottom: 2rem;
}

.error-actions {
    margin-top: 2rem;
}

/* Back Link */
.back-link {
    margin-top: 2rem;
}

.back-link a {
    color: var(--primary-color);
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

/* Desktop Footer - bottom right corner with legal links */
.desktop-footer {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    z-index: 100;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.desktop-footer a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.3s ease;
}

.desktop-footer a:hover {
    color: rgba(0, 170, 255, 0.8);
    text-decoration: underline;
}

.desktop-footer .footer-divider {
    color: rgba(255, 255, 255, 0.2);
    user-select: none;
}

.desktop-footer .copyright-text {
    color: rgba(255, 255, 255, 0.3);
    user-select: none;
}

/* Mobile Footer Nav - only visible on mobile */
.mobile-footer-nav {
    display: none;
}

@media (max-width: 768px) {
    /* Hide desktop footer on mobile */
    .desktop-footer {
        display: none;
    }

    /* Show mobile footer nav */
    .mobile-footer-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(15, 15, 15, 0.95);
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 0.75rem 1rem;
        justify-content: space-around;
        align-items: center;
        z-index: 1000;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.5);
    }

    .mobile-footer-nav a {
        font-family: 'Space Grotesk', sans-serif;
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.7);
        text-decoration: none;
        padding: 0.5rem 1rem;
        transition: color 0.3s ease;
    }

    .mobile-footer-nav a:hover,
    .mobile-footer-nav a:active {
        color: #ffffff;
    }

    .mobile-footer-divider {
        width: 1px;
        height: 20px;
        background: rgba(255, 255, 255, 0.2);
    }

    /* Add bottom padding to landing container to prevent content hiding under footer */
    .landing-container {
        padding-bottom: 4rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

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

    .flash-messages {
        top: 20px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}
