/**
 * Main Styles
 *
 * This file depends on design-system.css being loaded first.
 * Contains base styles, resets, and component styles.
 *
 * Responsive breakpoints (from design-system.css):
 * - Mobile (xs): 480px and below
 * - Tablet (md): 768px and below
 * - Desktop (lg): 1024px and above
 */

/* Legacy variable mappings for backward compatibility */
:root {
    --font-family: var(--font-family-base);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Account for sticky navigation height */
    overflow-x: hidden;
    width: 100%;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

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

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

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

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
    background: var(--color-bg-primary);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, 60px);
    grid-template-rows: repeat(auto-fill, 60px);
    gap: 8px;
    padding: 8px;
    z-index: 1;
    justify-content: center;
    align-content: center;
}

.hero-grid-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.hero-content {
    position: relative;
    z-index: 10;
    color: var(--color-text-primary);
    max-width: 800px;
    padding: 2rem;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.hero-name {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
    letter-spacing: 1px;
}

.hero-tagline {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--color-text-secondary);
    line-height: 1.8;
}

/* Sections */
section {
    padding: 4rem 0;
    min-height: 50vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-primary);
}

section p {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
}

/* About Section */
.about-section {
    background: var(--gradient-bg-dark);
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.about-heading {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--color-text-primary);
    position: relative;
}

.about-heading::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient-accent);
    margin: 1rem auto 0;
    border-radius: 2px;
}

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

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

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

.about-skills {
    background: var(--color-surface-elevated);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-accent);
    border: var(--border-accent);
}

.skills-heading {
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 2rem;
    text-align: center;
}

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

.skill-category h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-accent-blue);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
}

.skill-count {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text-tertiary);
    opacity: 0.7;
}

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

.skill-category li {
    font-size: 1rem;
    color: var(--color-text-tertiary);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.skill-category li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--color-accent-purple);
    font-weight: bold;
}

.skill-item-hidden {
    display: none;
}

.skill-category.expanded .skill-item-hidden {
    display: block;
}

.skill-expand-btn {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--color-accent-blue);
    border: 1px solid var(--color-accent-blue);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.skill-expand-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.2);
}

.skill-expand-btn:focus {
    outline: 2px solid var(--color-accent-blue);
    outline-offset: 2px;
}

.skill-category.expanded .skill-expand-btn::before {
    content: 'Show less';
}

.skill-expand-btn::before {
    content: 'Show more';
}

/* Responsive */

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: repeat(auto-fill, 50px);
        grid-template-rows: repeat(auto-fill, 50px);
        gap: 7px;
        padding: 7px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .hero-name {
        font-size: 2.5rem;
    }

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

    .hero-tagline {
        font-size: 1rem;
    }

    .hero-grid {
        grid-template-columns: repeat(auto-fill, 40px);
        grid-template-rows: repeat(auto-fill, 40px);
        gap: 6px;
        padding: 6px;
    }

    section h2 {
        font-size: 1.5rem;
    }

    section p {
        font-size: 1rem;
    }

    .about-heading {
        font-size: 2rem;
    }

    .about-bio p {
        font-size: 1.125rem;
    }

    .about-skills {
        padding: 1.5rem;
    }

    .skills-heading {
        font-size: 1.5rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
