/* static/css/main.css */

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font: clamp(1rem, 2.5vw, 1.125rem)/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #334155;
    background: #f8fafc;
    transition: background-color 0.3s ease;
}

/* ===== CONTAINERS & TYPOGRAPHY ===== */
.container {
    max-width: min(1200px, 90vw);
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===== LAYOUT ===== */
section {
    padding: 4rem 0;
}

section + section {
    margin-top: 2rem;
}

/* ===== HEADER & NAV ===== */
.header {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 44px;
}

.nav__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.25rem;
    color: #0f172a;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.nav__brand:hover {
    background: #f1f5f9;
}

.nav__brand-icon {
    font-size: 1.5rem;
}

/* ===== MOBILE NAV ===== */
.nav__links {
    display: none;
}

.mobile-menu-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
}

.mobile-menu-btn:hover {
    background: #f1f5f9;
    color: #3b82f6;
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
    z-index: 1000;
}

.mobile-nav.show {
    display: block;
}

.mobile-nav-links {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-links .nav-link {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem;
    border-radius: 0.5rem;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.mobile-nav-links .nav-link:hover {
    background: #f1f5f9;
    color: #3b82f6;
}

/* ===== DESKTOP NAV ===== */
@media (min-width: 768px) {
    .nav__links {
        display: flex;
        gap: 1rem;
        align-items: center;
    }
    
    .mobile-menu-btn,
    .mobile-nav {
        display: none !important;
    }
    
    .nav__links .nav-link {
        color: #64748b;
        text-decoration: none;
        font-weight: 500;
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .nav__links .nav-link:hover {
        color: #3b82f6;
        background: #f1f5f9;
    }
}

/* ===== DARK MODE TOGGLE ===== */
.dark-mode-toggle {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 2rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    margin-top: 0.5rem;
}

.dark-mode-toggle:hover {
    border-color: #3b82f6;
    transform: translateY(-1px);
}

@media (min-width: 768px) {
    .dark-mode-toggle {
        margin-top: 0;
    }
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
}

.hero__title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero__stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0;
}

.hero__stat {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.hero__stat-icon {
    font-size: 1.1rem;
}

.hero__availability {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    padding: 1rem 2rem;
    border-radius: 2rem;
    margin-top: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.hero__availability-icon {
    font-size: 1.25rem;
}

/* ===== ABOUT SECTION ===== */
.about {
    background: #ffffff;
}

.about__header,
.skills__header,
.portfolio__header,
.contact__header {
    text-align: center;
    margin-bottom: 2rem;
}

.about__title,
.skills__title,
.portfolio__title,
.contact__title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #0f172a;
}

.about__subtitle,
.skills__subtitle,
.portfolio__subtitle,
.contact__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: #64748b;
    max-width: 50ch;
    margin-left: auto;
    margin-right: auto;
}

.about__text {
    max-width: 65ch;
    margin: 0 auto;
}

.about__text p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: #475569;
}

.about__text p:last-child {
    margin-bottom: 0;
}

/* ===== SKILLS SECTION ===== */
.skills {
    background: #f8fafc;
}

.skills__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.skills__category {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.skills__category:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.skills__category-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.skills__category-icon {
    font-size: 1.5rem;
}

.skills__category-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
}

.skills__list {
    list-style: none;
}

.skills__list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    line-height: 1.5;
}

.skills__list li:last-child {
    border-bottom: none;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio {
    background: #ffffff;
}

.portfolio__intro {
    text-align: center;
    margin-bottom: 2rem;
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
}

.portfolio__link {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
}

.portfolio__link:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.portfolio__note {
    background: #f8fafc;
    border-radius: 0.5rem;
    border-left: 3px solid #60a5fa;
    padding: 1rem;
    margin-top: 1rem;
}

.portfolio__note em {
    color: #64748b;
    font-style: italic;
}

.portfolio__projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.portfolio__project {
    display: flex;
    gap: 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.portfolio__project:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.portfolio__project-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.portfolio__project-info {
    flex: 1;
}

.portfolio__project-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #0f172a;
}

.portfolio__project-desc {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.portfolio__project-tech {
    font-size: 0.8rem;
    color: #60a5fa;
    font-weight: 500;
}

/* ===== CONTACT SECTION ===== */
.contact {
    background: #0f172a;
    color: white;
}

.contact__title,
.contact__subtitle {
    color: white;
}

.contact__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.contact__item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact__icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.contact__details strong {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: white;
}

.contact__link {
    color: #60a5fa;
    text-decoration: none;
}

.contact__link:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.contact__cta {
    text-align: center;
}

.contact__cta-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.contact__cta-content p {
    max-width: 50ch;
    margin: 0 auto 2rem;
    color: #cbd5e1;
    line-height: 1.6;
}

.contact__cta-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact__cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    min-width: 120px;
    justify-content: center;
    transition: all 0.3s ease;
}

.contact__cta-button--primary {
    background: #60a5fa;
    color: white;
}

.contact__cta-button--primary:hover {
    background: #3b82f6;
    transform: translateY(-1px);
}

.contact__cta-button--secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.contact__cta-button--secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* ===== FOOTER ===== */
.footer {
    background: #0f172a;
    color: #94a3b8;
    text-align: center;
    padding: 2rem 0;
}

.footer__content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer__link {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
}

.footer__link:hover {
    color: #93c5fd;
}

/* ===== ACCESSIBILITY & PERFORMANCE ===== */
.skip-link {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    position: static;
    width: auto;
    height: auto;
    background: #3b82f6;
    color: white;
    padding: 0.5rem;
    z-index: 1000;
}

/* ===== SMOOTH SCROLLING ===== */
html {
    scroll-behavior: smooth;
}

/* ===== FOCUS & TRANSITIONS ===== */
*:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

* {
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }
    
    .hero__stats {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .skills__grid,
    .portfolio__projects {
        grid-template-columns: 1fr;
    }
    
    .contact__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact__cta-links {
        flex-direction: column;
        align-items: center;
    }
    
    .contact__cta-button {
        width: 100%;
        max-width: 250px;
    }
}
