/* ===== RESPONSIVE STYLES ===== */

/* Large desktop */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

/* Tablet landscape */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px 0;
    }

    .services-grid,
    .projects-grid,
    .life-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .life-grid > :last-child {
        grid-column: 1 / -1;
        max-width: 400px;
        margin: 0 auto;
    }

    .hero-content {
        gap: 40px;
    }

    .hero-photo {
        width: 240px;
        height: 240px;
    }

    .about-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    .stack-column {
        flex: 0 1 calc(50% - 10px);
    }
}

/* Tablet portrait */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
        --nav-height: 64px;
    }

    /* Nav */
    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 8px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all var(--transition);
        z-index: 999;
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-link {
        font-size: 1.2rem;
        padding: 12px 24px;
    }

    .nav-burger {
        display: flex;
    }

    /* Hero */
    .hero-content {
        flex-direction: column;
        text-align: center;
        padding: 60px 24px 40px;
    }

    .hero-photo {
        width: 200px;
        height: 200px;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-description {
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-socials {
        justify-content: center;
    }

    .hero .hero-photo-wrap.animate-on-scroll {
        transform: translateY(-20px);
    }

    .hero .hero-text.animate-on-scroll {
        transform: translateY(20px);
    }

    /* Stats */
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        margin-bottom: 60px;
    }

    /* Services/Projects */
    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    /* Life */
    .life-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto 40px;
    }

    .life-grid > :last-child {
        grid-column: auto;
        max-width: none;
    }

    /* Timeline */
    .timeline {
        padding-left: 50px;
    }

    .timeline::before {
        left: 18px;
    }

    .timeline-icon {
        left: -50px;
        width: 40px;
        height: 40px;
    }

    .timeline-icon svg {
        width: 20px;
        height: 20px;
    }

    /* Section text */
    .section-subtitle {
        margin-bottom: 40px;
        font-size: 1rem;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .footer-left {
        flex-direction: column;
        gap: 8px;
    }

    /* Contact */
    .contact-cta {
        padding: 36px 24px;
    }

    .contact-links {
        gap: 8px;
    }

    .contact-link {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .product-links {
        flex-wrap: wrap;
        gap: 12px;
    }

    /* Stack */
    .stack-column {
        flex: 0 1 calc(50% - 10px);
    }
}

/* Mobile */
@media (max-width: 480px) {
    :root {
        --section-padding: 50px 0;
    }

    .container {
        padding: 0 16px;
    }

    /* Hero */
    .hero-photo {
        width: 160px;
        height: 160px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Stats */
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 20px 12px;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-suffix {
        font-size: 1rem;
    }

    /* Cards */
    .service-card,
    .life-card {
        padding: 30px 20px;
    }

    .project-card {
        padding: 24px 20px;
    }

    .project-metrics {
        gap: 8px;
    }

    .metric-value {
        font-size: 1.1rem;
    }

    /* Contact */
    .contact-cta {
        padding: 28px 20px;
    }

    .contact-cta h3 {
        font-size: 1.3rem;
    }

    .btn-lg {
        padding: 16px 28px;
        font-size: 1rem;
    }

    /* Stack */
    .stack-column {
        flex: 0 1 100%;
    }

    .stack-column {
        padding: 16px;
    }

    /* Timeline */
    .timeline {
        padding-left: 44px;
    }

    .timeline::before {
        left: 14px;
    }

    .timeline-icon {
        left: -44px;
        width: 32px;
        height: 32px;
    }

    .timeline-icon svg {
        width: 16px;
        height: 16px;
    }

    .timeline-content {
        padding: 18px;
    }

    .timeline-content h3 {
        font-size: 1.05rem;
    }
}

/* Small mobile */
@media (max-width: 360px) {
    .hero-photo {
        width: 140px;
        height: 140px;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
    }

    .project-metrics {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .contact-links {
        flex-direction: column;
    }

    .contact-link {
        justify-content: center;
    }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 0 40px;
    }

    .hero-content {
        flex-direction: row;
    }

    .hero-photo {
        width: 150px;
        height: 150px;
    }

    .hero-scroll-indicator {
        display: none;
    }
}
