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

:root {
    /* Light theme colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #868e96;
    --border-color: #dee2e6;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --accent-color: #0066cc;
    --accent-hover: #0052a3;
    --card-bg: #ffffff;
    --navbar-bg: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] {
    /* Dark theme colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #404040;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #888888;
    --border-color: #404040;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.4);
    --accent-color: #4da6ff;
    --accent-hover: #66b3ff;
    --card-bg: #2d2d2d;
    --navbar-bg: rgba(45, 45, 45, 0.95);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Header */
.navbar {
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    text-align: center;
    position: relative;
}

.controls {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-switch {
    display: flex;
    align-items: center;
}

.theme-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    background: var(--bg-tertiary);
    transform: scale(1.1);
}

.language-switch {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.lang-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.nav-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.nav-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* Building Principles Section */
.building-principles {
    padding: 4rem 0;
    background: var(--bg-primary);
}

.building-principles h3 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 3rem;
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.principle-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.principle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow-medium);
}

.principle-card h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

/* AI Applications Section */
.ai-applications {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.ai-applications h3 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 3rem;
}

.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.app-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow-medium);
}

.app-card:nth-child(1) {
    border-left: 5px solid var(--accent-color);
}

.app-card:nth-child(2) {
    border-left: 5px solid #28a745;
}

.app-card:nth-child(3) {
    border-left: 5px solid #fd7e14;
}

.app-card:nth-child(4) {
    border-left: 5px solid #6f42c1;
}

.app-card h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

/* Philosophy Section */
.philosophy {
    padding: 4rem 0;
    background: var(--bg-primary);
}

.philosophy h3 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 3rem;
}

.philosophy-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.philosophy-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.philosophy-text:last-child {
    margin-bottom: 0;
    font-weight: 500;
}

/* About Section */
.about {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.about h3 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 3rem;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: 3rem;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.credentials {
    display: grid;
    gap: 1rem;
}

.credential-item {
    background: var(--card-bg);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease;
}

.credential-item:hover {
    transform: translateX(5px);
}

.credential-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

.credential-item {
    color: var(--text-secondary);
}

/* Footer */
footer {
    background: var(--bg-tertiary);
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.social-links {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-links li {
    transition: transform 0.2s ease;
}

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

.social-links img {
    height: 32px;
    border-radius: 4px;
    transition: opacity 0.2s ease;
}

.social-links img:hover {
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .building-principles h3, .ai-applications h3, .philosophy h3, .about h3 {
        font-size: 2rem;
    }
    
    .principles-grid, .applications-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-title {
        font-size: 1.5rem;
    }
    
    .philosophy-text {
        font-size: 1.1rem;
    }
    
    .about-text p {
        font-size: 1rem;
    }
    
    .controls {
        right: 10px;
        gap: 0.5rem;
    }
    
    .lang-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .theme-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .building-principles, .ai-applications, .philosophy, .about {
        padding: 2rem 0;
    }
    
    .principle-card, .app-card {
        padding: 1.5rem;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .philosophy-text {
        font-size: 1rem;
    }
    
    .about-text p {
        font-size: 0.95rem;
    }
    
    .credential-item {
        padding: 0.75rem 1rem;
    }
    
    .controls {
        right: 5px;
        gap: 0.25rem;
    }
    
    .lang-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .theme-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .social-links {
        gap: 0.5rem;
    }
    
    .social-links img {
        height: 28px;
    }
}

/* Smooth transitions for theme switching */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
