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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f8fafc;
}

/* Color Scheme Variables */
:root {
    --primary-color: #2c3e50;     /* Dark blue-gray for headers/footer */
    --secondary-color: #f8fafc;   /* Light gray for main content background */
    --text-primary: #2c3e50;
    --text-secondary: #64748b;
    --accent: #3b82f6;
    --white: #ffffff;
    --border: #e2e8f0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Layout Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: var(--primary-color);
}

/* Header */
.header {
    background-color: var(--primary-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.nav-brand h1 {
    color: var(--white);
    font-size: 1.5rem;
}

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

.nav-menu a {
    color: var(--white);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a:hover {
    color: var(--white);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--white);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Main Content */
.main {
    margin-top: 80px; /* Account for fixed header */
}

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

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

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

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

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

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

/* About Section */
.about {
    background-color: var(--white);
    padding: 5rem 0;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.7;
}

.about-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-card {
    background-color: var(--secondary-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
}

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

.detail-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Skills Section */
.skills {
    background-color: var(--secondary-color);
    padding: 5rem 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-align: center;
}

.skill-category ul {
    list-style: none;
}

.skill-category li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.skill-category li:last-child {
    border-bottom: none;
}

/* Projects Section */
.projects {
    background-color: var(--white);
    padding: 5rem 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--secondary-color);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.project-card[style*="cursor: pointer"]:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.15);
    border-left: 4px solid #3b82f6;
}

.project-link {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

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

.project-card p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

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

.project-tech span {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Interests Section */
.interests {
    background-color: var(--secondary-color);
    padding: 5rem 0;
}

.interests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.interest-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
}

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

.interest-card p {
    color: var(--text-secondary);
    margin: 0;
}

/* Contact Section */
.contact {
    background-color: var(--white);
    padding: 5rem 0;
}

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

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

.contact-info > p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.contact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--secondary-color);
    border-radius: 0.5rem;
}

.contact-item strong {
    color: var(--primary-color);
    min-width: 100px;
}

.contact-item a {
    color: var(--accent);
    font-weight: 500;
}

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

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    color: var(--white);
    margin: 0.25rem 0;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .main {
        margin-top: 120px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .interests-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-details {
        text-align: center;
    }
    
    .contact-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus states for accessibility */
a:focus,
.btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .header,
    .footer {
        background: white !important;
        color: black !important;
    }
    
    .nav-menu {
        display: none;
    }
    
    .main {
        margin-top: 0;
    }
    
    .project-card,
    .interest-card,
    .skill-category {
        break-inside: avoid;
    }
}