/* ====================================
   Responsive Design - Media Queries
   ==================================== */

/* ====================================
   Tablet and Below (768px)
   ==================================== */

@media (max-width: 768px) {
    /* Hero Section Adjustments */
    .hero-stack {
        min-height: 60vh;
        margin-top: 56px;
        flex-direction: column;
        padding: 2rem 1rem;
    }

    /* Profile Picture - Smaller on Tablet */
    .profile-container {
        width: 160px;
        height: 210px;
        margin-bottom: 1.5rem;
    }

    .profile-picture {
        width: 160px;
        height: 210px;
        border-radius: 12px;
        object-fit: cover;
        object-position: center top;
    }

    /* Hero Content - Better spacing on tablet */
    .hero-content {
        padding: 0 1rem;
        max-width: 100%;
    }

    .hero-subtitle {
        font-size: clamp(0.95rem, 3vw, 1.2rem);
        line-height: 1.6;
        word-spacing: 0.1em;
    }

    /* Navigation - Horizontal Scroll on Mobile */
    .glass-nav {
        gap: 2rem;
        padding: 0.875rem 1.5rem;
        overflow-x: auto;
        justify-content: flex-start;
    }

    .nav-link {
        font-size: 0.825rem;
        white-space: nowrap;
    }

    /* Section Padding */
    .about-section,
    .portfolio-bento,
    .cv-compact,
    .contact-section {
        padding: 3rem 1.5rem;
    }

    /* About Section */
    .about-text {
        padding: 2rem;
    }

    /* Portfolio Grid - Single Column */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .portfolio-card.featured {
        grid-column: span 1;
    }

    /* CV Timeline */
    .cv-timeline {
        padding-left: 40px;
    }

    .cv-timeline::before {
        left: 15px;
    }

    .cv-item::before {
        left: -34px;
        width: 14px;
        height: 14px;
    }

    .cv-header {
        padding: 1.2rem;
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .cv-header::after {
        right: 1.2rem;
    }

    .cv-duration {
        white-space: normal;
    }

    .cv-role {
        font-size: 1.2rem;
    }

    .cv-company {
        font-size: 1rem;
    }

    /* Contact Section */
    .contact-content {
        padding: 2rem;
    }
}

/* ====================================
   Mobile (480px and below)
   ==================================== */

@media (max-width: 480px) {
    /* Hero Section */
    .hero-stack {
        min-height: 50vh;
        padding: 1.5rem 1rem;
        flex-direction: column;
    }

    .profile-container {
        width: 140px;
        height: 180px;
        margin-bottom: 1.25rem;
    }

    .profile-picture {
        width: 140px;
        height: 180px;
        border-radius: 10px;
        object-fit: cover;
        object-position: center top;
    }

    /* Hero Content - Optimized for mobile */
    .hero-content {
        padding: 0 0.75rem;
        max-width: 100%;
    }

    .hero-title {
        font-size: clamp(2rem, 6vw, 2.5rem);
        margin-bottom: 0.75rem;
    }

    .hero-subtitle {
        font-size: clamp(0.875rem, 3.5vw, 1.1rem);
        line-height: 1.7;
        word-spacing: 0.15em;
        padding: 0 0.5rem;
    }

    /* Navigation */
    .glass-nav {
        padding: 0.75rem 1rem;
        gap: 1.5rem;
    }

    /* All Sections */
    .about-section,
    .portfolio-bento,
    .cv-compact,
    .contact-section {
        padding: 2.5rem 1rem;
    }

    /* About Section */
    .about-text {
        padding: 1.5rem;
    }

    /* Portfolio */
    .portfolio-grid {
        gap: 1rem;
    }

    .project-overlay {
        padding: 1.25rem;
    }

    /* CV Timeline */
    .cv-timeline {
        padding-left: 35px;
    }

    .cv-timeline::before {
        left: 12px;
        width: 2px;
    }

    .cv-item {
        margin-bottom: 1.5rem;
    }

    .cv-item::before {
        left: -31px;
        width: 12px;
        height: 12px;
        border: 2px solid var(--bg-dark-1);
    }

    .cv-header {
        padding: 1rem;
    }

    .cv-header::after {
        right: 1rem;
        font-size: 0.7rem;
    }

    .cv-role {
        font-size: 1.1rem;
    }

    .cv-company {
        font-size: 0.9rem;
    }

    .cv-duration {
        font-size: 0.8rem;
    }

    .cv-details {
        padding: 0 1rem;
    }

    .cv-item.expanded .cv-details {
        padding: 0.8rem 1rem 1.2rem;
    }

    .cv-details li {
        font-size: 0.9rem;
        padding-left: 1.2rem;
    }

    .skill-pill {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }

    /* Contact Section */
    .contact-content {
        padding: 1.5rem;
    }

    .contact-content p {
        font-size: 1rem;
    }

    .contact-link {
        padding: 0.8rem 1.5rem;
    }

    /* Footer */
    .wave-footer {
        padding: 2rem 1.5rem;
    }
}

/* ====================================
   Very Small Mobile (360px and below)
   ==================================== */

@media (max-width: 360px) {
    .hero-stack {
        padding: 1rem 0.75rem;
        min-height: 45vh;
    }

    .profile-container {
        width: 120px;
        height: 155px;
        margin-bottom: 1rem;
    }

    .profile-picture {
        width: 120px;
        height: 155px;
    }

    .hero-content {
        padding: 0 0.5rem;
    }

    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: 0.875rem;
        line-height: 1.8;
        padding: 0;
    }
}

/* ====================================
   Large Desktop (1440px and above)
   ==================================== */

@media (min-width: 1440px) {
    /* Larger profile on big screens */
    .profile-container {
        width: 240px;
        height: 310px;
    }

    .profile-picture {
        width: 240px;
        height: 310px;
        border-radius: 20px;
        object-fit: cover;
        object-position: center top;
    }

    /* Wider content containers */
    .portfolio-grid {
        max-width: 1600px;
    }

    .cv-timeline {
        max-width: 1000px;
    }
}

/* ====================================
   Landscape Orientation on Mobile
   ==================================== */

@media (max-height: 600px) and (orientation: landscape) {
    .hero-stack {
        height: auto;
        min-height: 100vh;
        padding: 2rem 0;
    }

    .profile-container {
        width: 130px;
        height: 170px;
    }

    .profile-picture {
        width: 130px;
        height: 170px;
        border-radius: 10px;
    }

    .hero-content {
        position: relative;
        bottom: auto;
        margin-top: 2rem;
    }

    .glass-nav {
        position: relative;
        top: auto;
        margin: 1rem auto;
    }
}

/* ====================================
   Hover Effects Disabled on Touch Devices
   ==================================== */

@media (hover: none) and (pointer: coarse) {
    /* Disable hover effects on touch devices */
    .portfolio-card:hover {
        transform: none;
    }

    .portfolio-card:active {
        transform: scale(0.98);
    }

    .cv-header:hover {
        transform: none;
    }

    /* Make overlay always visible on touch */
    .project-overlay {
        opacity: 1;
    }

    /* Disable 3D tilt effect on touch devices */
    .portfolio-card.tilt-active {
        transform: none !important;
    }
}

/* ====================================
   Print Styles
   ==================================== */

@media print {
    .glass-nav,
    .scroll-progress {
        display: none;
    }

    .hero-stack {
        height: auto;
        page-break-after: always;
    }

    .cv-details {
        max-height: none !important;
        padding: 1rem 1.5rem !important;
    }

    body {
        background: white;
        color: black;
    }

    .glass,
    .glass-card,
    .cv-header,
    .portfolio-card {
        background: white;
        border: 1px solid #ccc;
        box-shadow: none;
    }
}
