/* ========================================
   PEDRO ANDRADE - PORTFOLIO
   responsive.css - Estilos Responsivos
   ======================================== */

/* ========================================
   TABLET (768px - 1024px)
   ======================================== */
@media screen and (max-width: 1024px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 5rem;
    }

    .header {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .header-nav {
        gap: var(--spacing-md);
    }

    .hero-text {
        font-size: clamp(2rem, 5vw, 4rem);
        max-width: 95%;
    }

    /* Works */
    .project-header {
        grid-template-columns: 50px 1fr;
        grid-template-rows: auto auto auto;
        gap: var(--spacing-sm);
    }

    .project-number {
        grid-row: 1 / 2;
    }

    .project-title {
        grid-column: 2 / -1;
        grid-row: 1 / 2;
    }

    .project-tags {
        grid-column: 2 / -1;
        grid-row: 2 / 3;
    }

    .project-meta {
        grid-column: 2 / -1;
        grid-row: 3 / 4;
        gap: var(--spacing-md);
    }

    .gallery-item {
        height: 140px;
    }

    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .about-intro {
        font-size: clamp(1.25rem, 4vw, 2rem);
    }

    .about-details {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .about-image {
        justify-content: center;
        margin-top: var(--spacing-md);
    }

    .profile-photo {
        width: 220px;
    }

    .image-placeholder {
        width: 220px;
        height: 300px;
    }
}

/* ========================================
   MOBILE LANDSCAPE (576px - 768px)
   ======================================== */
@media screen and (max-width: 768px) {
    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
    }

    .header {
        flex-direction: column;
        gap: var(--spacing-sm);
        padding: var(--spacing-sm);
    }

    .header-left {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .contact-link {
        order: 2;
    }

    .header-nav {
        width: 100%;
        justify-content: flex-start;
        gap: var(--spacing-md);
        padding-top: var(--spacing-xs);
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }

    .nav-link {
        font-size: 0.75rem;
    }

    .hero {
        padding: var(--spacing-sm);
        padding-top: 140px;
        padding-bottom: var(--spacing-md);
        align-items: center;
    }

    .hero-text {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
        max-width: 100%;
    }

    .hero-text .parenthesis {
        font-size: 0.55em;
        display: inline;
        white-space: nowrap;
    }

    .hero-text .text-group {
        display: inline;
        white-space: nowrap;
    }

    .hero-text .text-group-break {
        display: inline;
        white-space: normal;
    }

    /* Works */
    .works-container {
        padding-top: 160px;
    }

    .project {
        padding: var(--spacing-sm);
    }

    .project-header {
        grid-template-columns: 40px 1fr;
    }

    .project-title {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
    }

    .project-tags {
        font-size: 0.6875rem;
    }

    .project-meta {
        flex-direction: column;
        gap: var(--spacing-xs);
    }

    .gallery-item {
        height: 120px;
    }

    .view-project {
        opacity: 1;
        font-size: 0.6875rem;
    }

    /* About */
    .about-overlay {
        top: 100px;
        padding: var(--spacing-md) var(--spacing-sm);
    }

    .close-btn {
        top: var(--spacing-sm);
        right: var(--spacing-sm);
        width: 28px;
        height: 28px;
    }

    .close-btn::before,
    .close-btn::after {
        width: 16px;
    }

    .about-intro {
        font-size: clamp(1.125rem, 4vw, 1.5rem);
        line-height: 1.25;
        margin-bottom: var(--spacing-md);
    }

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

    .detail-section h3 {
        font-size: 0.625rem;
    }

    .detail-section p {
        font-size: 0.75rem;
    }

    .profile-photo {
        width: 180px;
    }

    .image-placeholder {
        width: 180px;
        height: 240px;
    }
}

/* ========================================
   MOBILE PORTRAIT (até 576px)
   ======================================== */
@media screen and (max-width: 576px) {
    :root {
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
    }

    html {
        font-size: 15px;
    }

    .header {
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .logo {
        font-size: 0.75rem;
    }

    .contact-link {
        font-size: 0.625rem;
    }

    .header-nav {
        gap: var(--spacing-sm);
        flex-wrap: wrap;
    }

    .nav-link {
        font-size: 0.6875rem;
    }

    .hero {
        padding-top: 130px;
    }

    .hero-text {
        font-size: clamp(1.5rem, 7vw, 2rem);
    }

    .hero-text .italic {
        display: inline;
    }

    .hero-text .parenthesis {
        display: inline;
        font-size: 0.5em;
        white-space: nowrap;
    }

    .hero-text .text-group {
        display: inline;
        white-space: nowrap;
    }

    .hero-text .text-group-break {
        display: inline;
        white-space: normal;
    }

    /* Works */
    .works-container {
        padding-top: 140px;
    }

    .project-header {
        grid-template-columns: 30px 1fr;
        gap: 0.5rem;
    }

    .project-number {
        font-size: 0.75rem;
    }

    .project-title {
        font-size: 1.25rem;
    }

    .project-tags {
        font-size: 0.625rem;
        line-height: 1.4;
    }

    .project-meta {
        font-size: 0.75rem;
    }

    .gallery-item {
        height: 110px;
    }

    /* About */
    .about-overlay {
        top: 90px;
        padding: var(--spacing-sm);
    }

    .close-btn {
        top: 12px;
        right: var(--spacing-sm);
        width: 26px;
        height: 26px;
    }

    .close-btn::before,
    .close-btn::after {
        width: 14px;
    }

    .about-intro {
        font-size: 1.125rem;
        line-height: 1.3;
    }

    .about-bio {
        max-width: 100%;
    }

    .about-bio p {
        font-size: 0.8125rem;
        line-height: 1.6;
    }

    .about-details {
        gap: var(--spacing-sm);
    }

    .about-column {
        gap: var(--spacing-sm);
    }

    .detail-section h3 {
        font-size: 0.5625rem;
        margin-bottom: 0.25rem;
    }

    .detail-section p {
        font-size: 0.6875rem;
        line-height: 1.45;
    }

    .about-image {
        margin-top: var(--spacing-sm);
    }

    .profile-photo {
        width: 100%;
        max-width: 200px;
    }

    .image-placeholder {
        width: 100%;
        max-width: 200px;
        height: 260px;
    }
}

/* ========================================
   TELAS MUITO PEQUENAS (até 360px)
   ======================================== */
@media screen and (max-width: 360px) {
    html {
        font-size: 14px;
    }

    .header-nav {
        gap: 0.75rem;
    }

    .hero-text {
        font-size: 1.375rem;
    }

    .hero-text .text-group {
        display: inline;
        white-space: nowrap;
    }

    .hero-text .text-group-break {
        display: inline;
        white-space: normal;
    }

    .hero-text .parenthesis {
        display: inline;
        white-space: nowrap;
    }

    .project-title {
        font-size: 1.125rem;
    }

    .gallery-item {
        height: 95px;
    }

    .about-intro {
        font-size: 1rem;
    }
}

/* ========================================
   TELAS GRANDES (1440px+)
   ======================================== */
@media screen and (min-width: 1440px) {
    :root {
        --spacing-lg: 5rem;
        --spacing-xl: 10rem;
    }

    .header {
        padding: var(--spacing-md) var(--spacing-lg);
    }

    .hero {
        padding: var(--spacing-lg);
        padding-bottom: var(--spacing-xl);
    }

    .hero-text {
        font-size: 5.5rem;
        max-width: 85%;
    }

    .works-container {
        max-width: 1600px;
        margin: 0 auto;
    }

    .project {
        padding: var(--spacing-md) var(--spacing-lg);
    }

    .gallery-item {
        height: 200px;
    }

    .about-overlay {
        padding: var(--spacing-xl) var(--spacing-lg);
    }

    .about-intro {
        font-size: 3.5rem;
    }

    .profile-photo {
        width: 350px;
    }

    .image-placeholder {
        width: 350px;
        height: 470px;
    }
}

/* ========================================
   TELAS ULTRA WIDE (1920px+)
   ======================================== */
@media screen and (min-width: 1920px) {
    .hero-text {
        font-size: 6rem;
        max-width: 80%;
    }

    .project-title {
        font-size: 3rem;
    }

    .gallery-item {
        height: 240px;
    }

    .about-intro {
        font-size: 4rem;
    }
}

/* ========================================
   PREFERÊNCIAS DO USUÁRIO
   ======================================== */

/* Redução de movimento */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .cursor,
    .cursor-follower {
        display: none !important;
    }
}

/* Modo escuro (se preferir) */
@media (prefers-color-scheme: dark) {
    /* Descomente se quiser suporte automático a modo escuro */
    /*
    :root {
        --color-bg: #0A0A0A;
        --color-text: #FFFFFF;
        --color-text-light: #999999;
        --color-overlay: rgba(10, 10, 10, 0.98);
    }
    
    .gallery-item {
        background-color: #1a1a1a;
    }
    
    .image-placeholder {
        background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    }
    */
}

/* Alto contraste */
@media (prefers-contrast: high) {
    :root {
        --color-text-light: #333333;
    }

    .nav-link.active::after {
        height: 2px;
    }

    .project {
        border-bottom-width: 2px;
    }
}

/* ========================================
   ORIENTAÇÃO DE TELA
   ======================================== */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: var(--spacing-md);
    }

    .hero-text {
        font-size: clamp(1.25rem, 4vw, 2rem);
    }

    .about-overlay {
        padding-top: var(--spacing-md);
    }

    .about-intro {
        font-size: clamp(1rem, 3vw, 1.5rem);
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .header,
    .cursor,
    .cursor-follower,
    .about-overlay {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .hero {
        min-height: auto;
        padding: 2cm;
    }

    .hero-text {
        font-size: 24pt;
    }

    .project {
        page-break-inside: avoid;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }
}