/* 
   OSCAR REGO PORTFOLIO 2026 - MOBILE RESPONSIVE OVERRIDES
   Targeting <= 1100px only. Preserving all desktop/laptop styles.
*/

/* 1. Global Overflow Fixes */
@media (max-width: 1100px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
        width: 100%;
    }

    /* Target only actual overflow-causers, not everything */
    img, canvas {
        max-width: 100%;
    }

    video {
        max-width: 100%;
    }

    iframe {
        max-width: 100%;
    }

    /* Small Landscape / Laptop Overrides */
    .project-showcase {
        padding: 80px 5%;
    }

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

    .project-media-wrapper {
        order: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 10;
        max-height: 60vh;
        border-radius: 12px;
        margin: 0 auto;
    }

    /* Fix: was scale(0.3) — incorrect, videos were tiny */
    .project-video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transform: none;
    }

    .project-info {
        order: 2 !important;
        text-align: left;
        align-items: flex-start;
    }

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

    .project-features {
        align-items: flex-start;
    }

    .timeline-item {
        grid-template-columns: 1fr 1.5fr;
        gap: 40px;
    }

    .timeline-year {
        display: none;
    }

    .timeline-left {
        text-align: right;
    }
}

/* 2. Tablet Overrides */
@media (max-width: 900px) {
    .hero {
        padding: 0 5%;
        min-height: 100vh;
        min-height: 100svh;
        display: flex;
        align-items: flex-start;
        margin-bottom: -100px; /* Separation before first project card */

        
    }

    .hero-content {
        width: 100%;
        min-height: 100vh;
        min-height: 100svh;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 1vh; /* Pushes intro text higher */
    }

    .hero-intro {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
        align-items: center;
        margin-bottom: 0;
    }

    .cinematic-intro {
        transform: none;
        padding: 0;
        max-width: 100%;
        margin-bottom: -220px;
        margin-top: 220px;
    }

    .intro-main {
        text-align: center;
        font-size: 14px;
    }

    .hero-content h1 {
        font-size: 12vw;
        margin-top: 290px; /* Pushes title down */
        
        white-space: normal;
        word-break: keep-all;
        line-height: 0.9;
    }

    .hero-status-line {
        flex-direction: column;
        gap: 10px;
    }

    .status-dot {
        display: none;
    }

    .project-showcase {
        padding: 60px 6%; /* Enhanced breathing space on tablet */
    }

    .project-title {
        font-size: 40px;
    }

    /* Timeline */
    .timeline-section {
        padding: 100px 5%;
    }

    .timeline-heading {
        margin-bottom: 60px;
    }

    .timeline-heading h1 {
        font-size: clamp(36px, 12vw, 80px);
        line-height: 1;
    }

    .timeline-item {
        grid-template-columns: 1fr;
        gap: 16px;
        padding-left: 50px;
        margin-bottom: 80px;
    }

    .timeline-line, .timeline-glow {
        left: 25px;
    }

    .timeline-left {
        text-align: left;
        padding-right: 0;
    }

    .timeline-left h2 {
        font-size: 28px;
    }

    .timeline-right {
        padding-left: 0;
        max-width: 100%;
    }

    .timeline-year {
        display: block;
        text-align: left;
        transform: none;
        font-size: 64px;
        opacity: 0.05;
        position: absolute;
        top: -20px;
        left: 50px;
        z-index: -1;
    }

    .social-sidebar {
        display: none;
    }

    /* Skills Marquee */
    .skills {
        padding: 80px 0 60px;
    }

    .skills h2 {
        font-size: 40px;
    }

    .skill-card {
        width: 120px;
        height: 110px;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
        align-items: center;
        top: 24px;
        left: 5%;
        right: 5%;
    }

    .footer-right {
        align-items: center;
        gap: 10px;
    }

    .footer-bottom {
        width: 100%;
        left: 0;
        bottom: 24px;
        text-align: center;
    }

    .footer-bottom h1 {
        text-align: center;
        font-size: 32px;
    }
}

/* 3. Mobile Phones Overrides */
@media (max-width: 600px) {
    .hero-content .hero-title {
    font-size: 19vw !important;
}
    /* Flatter, cleaner top glass strip for mobile */
    body::before {
        bottom: auto;
        top: 0;
        height: calc(15px + env(safe-area-inset-top));
        mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 15%, transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 15%, transparent 100%);
        mask-composite: source-over;
        -webkit-mask-composite: source-over;
    }

    .hero {
        padding-top: 140px;
        
    }

    .hero-content h1 {
        font-size: 14vw;
        letter-spacing: -2px;
        margin-bottom: 60px;
    }
/* 2. Tablet Overrides */
@media (max-width: 900px) {
    .hero {
        padding: 0 5%;
        min-height: 100vh;
        min-height: 100svh;
        display: flex;
        align-items: flex-start;
        margin-bottom: -100px; /* Separation before first project card */

        
    }

    .hero-content {
        width: 100%;
        min-height: 100vh;
        min-height: 100svh;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 1vh; /* Pushes intro text higher */
    }

    .hero-intro {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
        align-items: center;
        margin-bottom: 0;
    }

    .cinematic-intro {
        transform: none;
        padding: 0;
        max-width: 100%;
        margin-bottom: -220px;
        margin-top: 220px;
    }

    .intro-main {
        text-align: center;
        font-size: 14px;
    }

    .hero-content h1 {
        font-size: 12vw;
        margin-top: 290px; /* Pushes title down */
        
        white-space: normal;
        word-break: keep-all;
        line-height: 0.9;
    }

    .hero-status-line {
        flex-direction: column;
        gap: 10px;
    }

    .status-dot {
        display: none;
    }

    .project-showcase {
        padding: 60px 6%; /* Enhanced breathing space on tablet */
    }

    .project-title {
        font-size: 40px;
    }

    .social-sidebar {
        display: none;
    }

    /* Skills Marquee */
    .skills {
        padding: 80px 0 60px;
    }

    .skills h2 {
        font-size: 40px;
    }

    .skill-card {
        width: 120px;
        height: 110px;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
        align-items: center;
        top: 24px;
        left: 5%;
        right: 5%;
    }

    .footer-right {
        align-items: center;
        gap: 10px;
    }

    .footer-bottom {
        width: 100%;
        left: 0;
        bottom: 24px;
        text-align: center;
    }

    .footer-bottom h1 {
        text-align: center;
        font-size: 32px;
    }
}

/* 3. Mobile Phones Overrides */
@media (max-width: 600px) {
    .hero-content .hero-title {
    font-size: 19vw !important;
}
    /* Flatter, cleaner top glass strip for mobile */
    body::before {
        bottom: auto;
        top: 0;
        height: calc(15px + env(safe-area-inset-top));
        mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 15%, transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 15%, transparent 100%);
        mask-composite: source-over;
        -webkit-mask-composite: source-over;
    }

    .hero {
        padding-top: 140px;
        
    }

    .hero-content h1 {
        font-size: 14vw;
        letter-spacing: -2px;
        margin-bottom: 60px;
    }

    .intro-main {
        font-size: 13px;
    }

    .floating-nav {
        width: max-content;
        max-width: 90vw;
        gap: 2px;
        padding: 4px 4px;
        border-radius: 999px;
        bottom: auto;
        top: calc(20px + env(safe-area-inset-top));
        z-index: 2000;
        /* Keep premium glass on mobile */
        backdrop-filter: blur(24px) saturate(160%) brightness(1.05);
        -webkit-backdrop-filter: blur(24px) saturate(160%) brightness(1.05);
    }

    .floating-nav a {
        padding: 0 16px;
        height: 38px;
        font-size: 10px;
    }

    .project-showcase {
        padding: 50px 8%; /* Substantial left/right padding for beautiful mobile framing */
    }

    .project-title {
        font-size: 32px;
        line-height: 1.1;
    }

    .project-media-wrapper {
        aspect-ratio: 16 / 10; /* Maintaining desktop cinematic ratio, no squishing */
        border-radius: 12px;
    }

    .project-features li {
        font-size: 13px;
        align-items: flex-start;
        gap: 10px;
    }

    .project-features li::before {
        margin-top: 6px;
        flex-shrink: 0;
    }

    .timeline-left h2 {
        font-size: 24px;
    }

    .marquee-wrapper {
        gap: 12px;
    }

    .marquee-content {
        gap: 16px;
        padding-right: 16px;
    }

    .skill-card {
        width: 90px;
        height: 85px;
        border-radius: 12px;
        gap: 8px;
    }

    .skill-card img {
        width: 24px;
        height: 24px;
    }

    .skill-card span {
        font-size: 9px;
    }

    .image-footer img {
        height: 300px;
    }

    .footer-status p {
        font-size: 12px;
    }
}

/* 4. Small Phones Overrides */
@media (max-width: 400px) {
    .hero-content h1 {
        font-size: 16vw;
    }

    .floating-nav a {
        padding: 0 8px;
        font-size: 8px;
    }

    .project-showcase {
        padding: 40px 7%; /* Keep proper framing even on the smallest screens */
    }

    /* Keep cinematic 16/10 aspect ratio here too to prevent extreme cropping */

    .image-footer img {
        height: 340px;
    }
    
    .timeline-year {
        font-size: 48px;
    }
}

/* 5. Touch Usability Overrides */
@media (hover: none) and (pointer: coarse) {
    /* Remove blue tap highlight flash on mobile globally */
    *, a, button, input, textarea, select, [role="button"], .skill-card, .project-media-wrapper {
        -webkit-tap-highlight-color: transparent;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    }
    
    /* Prevent sticky hovers and cursor bugs */
    .project-media-wrapper:hover {
        transform: none;
    }
    
    .skill-card:hover {
        transform: none;
        box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.2);
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
        border-color: rgba(255, 255, 255, 0.04);
    }
    
    .skill-card:hover img {
        filter: grayscale(0.4) brightness(0.8);
        transform: none;
    }
    
    .skill-card:hover span {
        color: rgba(255,255,255,0.6);
    }

/* CUSTOM CURSOR SYSTEM - DISABLED
    body {
        cursor: auto !important;
    }
    
    a, button, input, textarea, select, [role="button"] {
        cursor: pointer !important;
    }

    .mouse-glow, .view-tooltip {
        display: none !important;
    }
*/
}

/* Fix: correct video display on tablet — no transform needed */
@media (max-width: 900px) {
    .project-video {
        transform: none;
        object-fit: cover;
    }
}



/* =============================================================================
   ABOUT PAGE — TIMELINE MOBILE REDESIGN
   Scroll-triggered reveal, animated progress line, premium entrance effects
============================================================================= */

@media (max-width: 900px) {

    .timeline-section {
        padding: clamp(60px, 12vw, 120px) 0;
        overflow: hidden;
    }

    .timeline-heading {
        padding: 0 6%;
        margin-bottom: clamp(40px, 8vw, 70px);
        text-align: left;
    }

    .timeline-heading h1 {
        font-size: clamp(32px, 10vw, 64px);
        line-height: 1;
        letter-spacing: -1px;
    }

    .timeline-wrapper {
        padding: 0 6% 0 calc(6% + 32px);
        max-width: 100%;
        position: relative;
    }

    .timeline-line {
        left: 6%;
        top: 0;
        transform: none;
        width: 1px;
        height: 100%;
    }

    .timeline-glow {
        left: 6%;
        transform: translate(-50%, 0);
        width: 14px;
        height: 14px;
        box-shadow: 0 0 18px #d7ff3f, 0 0 40px rgba(215, 255, 63, 0.7);
    }

    .timeline-item {
        display: flex;
        flex-direction: column;
        gap: clamp(10px, 3vw, 18px);
        padding-left: 24px;
        padding-right: 0;
        margin-bottom: clamp(48px, 10vw, 80px);
        position: relative;
        z-index: 2;
        opacity: 0;
        transform: translateX(-20px);
        transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .timeline-item.visible {
        opacity: 1;
        transform: translateX(0);
    }

    .timeline-item:nth-child(2) { transition-delay: 0.05s; }
    .timeline-item:nth-child(3) { transition-delay: 0.10s; }
    .timeline-item:nth-child(4) { transition-delay: 0.15s; }
    .timeline-item:nth-child(5) { transition-delay: 0.20s; }
    .timeline-item:nth-child(6) { transition-delay: 0.25s; }
    .timeline-item:nth-child(7) { transition-delay: 0.30s; }
    .timeline-item:nth-child(8) { transition-delay: 0.35s; }

    .timeline-item::before {
        content: "";
        position: absolute;
        left: -5px;
        top: 8px;
        width: 9px;
        height: 9px;
        background: rgba(215, 255, 63, 0.35);
        border-radius: 50%;
        border: 1px solid rgba(215, 255, 63, 0.6);
        box-shadow: 0 0 8px rgba(215, 255, 63, 0.2);
        transition: background 0.4s, box-shadow 0.4s;
    }

    .timeline-item.visible::before {
        background: #d7ff3f;
        box-shadow: 0 0 14px rgba(215, 255, 63, 0.7);
    }

    .timeline-left {
        text-align: left;
        padding-right: 0;
    }

    .timeline-left h2 {
        font-size: clamp(18px, 5vw, 26px);
        line-height: 1.15;
        color: #ffffff;
        margin-bottom: 4px;
        letter-spacing: 0.2px;
    }

    .timeline-left span {
        font-size: clamp(10px, 3vw, 13px);
        letter-spacing: 2px;
        color: rgba(215, 255, 63, 0.8);
    }

    .timeline-year {
        display: block;
        position: static;
        transform: none;
        font-size: clamp(36px, 12vw, 60px);
        font-weight: 700;
        color: rgba(255, 255, 255, 0.04);
        letter-spacing: -3px;
        line-height: 0.85;
        margin-top: -4px;
        margin-left: -2px;
        pointer-events: none;
        user-select: none;
        -webkit-user-select: none;
    }

    .timeline-right {
        font-size: clamp(13px, 3.5vw, 16px);
        line-height: 1.75;
        color: rgba(255, 255, 255, 0.55);
        padding-left: 0;
        max-width: 100%;
    }
}

@media (max-width: 480px) {

    .timeline-wrapper {
        padding-left: calc(8% + 28px);
        padding-right: 6%;
    }

    .timeline-line,
    .timeline-glow {
        left: 8%;
    }

    .timeline-left h2 {
        font-size: clamp(16px, 5.5vw, 22px);
    }

    .timeline-year {
        font-size: clamp(32px, 14vw, 52px);
    }

    .timeline-right {
        font-size: 14px;
    }

    .timeline-item {
        margin-bottom: clamp(36px, 9vw, 60px);
    }
}
