/*
Theme Name: Modern Portfolio Theme
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: A modern, responsive portfolio theme with dark/light mode switching
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: modern-portfolio
*/

/* CSS Variables for Theme Colors */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --accent-color: #007bff;
    --accent-hover: #0056b3;
    --border-color: #dee2e6;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #f8f9fa;
    --text-secondary: #adb5bd;
    --accent-color: #4dabf7;
    --accent-hover: #339af0;
    --border-color: #495057;
    --card-shadow: rgba(0, 0, 0, 0.3);
}

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

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);
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* Header Styles */
.site-header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color var(--transition-speed);
}

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

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.nav-menu a {
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color var(--transition-speed);
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
    border-bottom-color: var(--accent-color);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-speed);
}

.theme-toggle:hover {
    transform: scale(1.05);
}

.theme-toggle-icon {
    font-size: 1.2rem;
}

/* Hero Section */
.hero-section {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero-section p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

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

.project-card {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px var(--card-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px var(--card-shadow);
}

.project-thumbnail {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.project-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-tag {
    background-color: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.read-more {
    display: inline-block;
    color: var(--accent-color);
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--accent-color);
    border-radius: 25px;
    transition: all var(--transition-speed);
}

.read-more:hover {
    background-color: var(--accent-color);
    color: white;
}

/* Single Project Page */
.single-project {
    max-width: 900px;
    margin: 3rem auto;
    padding: 2rem;
    background-color: var(--bg-secondary);
    border-radius: 12px;
}

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

.project-featured-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.project-content-full {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

/* Footer */
.site-footer {
    background-color: var(--bg-secondary);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-content {
    color: var(--text-secondary);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.social-link {
    font-size: 1.5rem;
    color: var(--text-primary);
    transition: color var(--transition-speed);
}

.social-link:hover {
    color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-primary);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

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

    .main-navigation {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-section {
        padding: 2rem 0;
    }

    .project-content {
        padding: 1rem;
    }

    .single-project {
        padding: 1rem;
    }
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-color);
    color: white;
    padding: 8px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
