/* ===== Responsive Design ===== */

/* ===== Mobile Styles (Phones) ===== */
@media (max-width: 768px) {
    /* Hide elements not needed on mobile */
    .dot-pagination,
    .weather-widget,
    .scroll-progress,
    .landing-resume-btn,
    .main-nav,
    .dots-container {
        display: none !important;
    }
    
    /* Base adjustments */
    html {
        font-size: 14px;
    }
    
    /* Navbar - hide on mobile */
    .navbar {
        display: none !important;
    }
    
    .logo-text {
        display: none !important;
    }
    
    /* Burger menu wrapper */
    .burger-wrapper {
        display: flex !important;
        align-items: center;
        gap: 12px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        padding: 15px 20px;
        z-index: 1001;
        background: rgba(37, 56, 48, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .burger-label {
        font-family: 'Syne', sans-serif;
        font-size: 1.6rem;
        color: rgba(255, 255, 255, 0.95);
        font-weight: 700;
    }
    
    /* Burger menu button */
    .burger-menu {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
        position: relative;
        top: auto;
        right: auto;
        z-index: 1001;
        background: rgba(255, 255, 255, 0.1);
        border: none !important;
        border-radius: 8px;
        outline: none !important;
        padding: 12px;
        cursor: pointer;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    .burger-menu span:nth-child(2) {
        display: none;
    }
    
    .burger-menu span {
        display: block;
        width: 25px;
        height: 2px;
        background-color: #fff;
        transition: all 0.3s ease;
    }
    
    .burger-menu:hover span {
        background-color: rgba(255, 255, 255, 0.7);
    }
    
    /* Burger menu active state (X) */
    .burger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(0, 3px);
    }
    
    .burger-menu.active span:nth-child(2) {
        display: none;
    }
    
    .burger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(0, -3px);
    }
    
    /* Mobile Navigation Menu */
    .mobile-nav {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 80%;
        max-width: 320px;
        background: rgba(20, 35, 28, 0.98);
        z-index: 999;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding-left: 40px;
        gap: 25px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .mobile-nav.active {
        transform: translateX(0);
    }
    
    .mobile-nav-item {
        color: #d4d9d0;
        text-decoration: none;
        font-size: 1.6rem;
        font-family: 'Syne', sans-serif;
        font-weight: 600;
        transition: color 0.3s ease;
        letter-spacing: 0.02em;
    }
    
    .mobile-nav-item:hover {
        color: #f4a261;
    }
    
    .mobile-resume-link {
        color: #f4a261;
        border: none;
        padding: 0;
        border-radius: 0;
        margin-top: 10px;
    }
    
    .mobile-resume-link:hover {
        background: transparent;
        color: #fff;
    }
    
    .mobile-nav-socials {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 30px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mobile-nav-social-link {
        color: rgba(255, 255, 255, 0.5);
        font-family: 'Raleway', sans-serif;
        font-size: 1rem;
        text-decoration: none;
        transition: color 0.3s ease;
        letter-spacing: 0.02em;
    }
    
    .mobile-nav-social-link:hover {
        color: #f4a261;
    }

    /* Landing page needs relative positioning for social icons */
    .landing-page {
        position: relative !important;
    }
    
    /* Social icons - vertical on bottom right of landing page */
    .social-icons {
        position: absolute !important;
        top: auto !important;
        left: auto !important;
        right: 20px !important;
        bottom: 80px !important;
        flex-direction: column !important;
        gap: 18px !important;
        z-index: 100 !important;
        align-items: center !important;
    }
    
    .social-icons a {
        font-size: 2.2rem !important;
    }
    
    /* Landing page */
    .bennet-image {
        width: 84vw !important;
        min-width: 300px !important;
        max-width: 420px !important;
        height: auto !important;
        transform: scale(1.35) !important;
        transform-origin: bottom center !important;
    }
    
    .hi-there-bg {
        font-size: clamp(1.8rem, 8vw, 3rem) !important;
        position: absolute !important;
        bottom: auto !important;
        left: 15px !important;
        right: auto !important;
        top: 35% !important;
        text-align: left !important;
        transform: none !important;
        width: auto !important;
        color: #f4a261 !important;
        opacity: 0.4 !important;
        z-index: 200 !important;
        font-family: 'Courier New', monospace !important;
    }
    
    .hi-there-bg .desktop-text {
        display: none !important;
    }
    
    .hi-there-bg .mobile-text {
        display: inline !important;
    }
    
    .name-title {
        font-size: clamp(3.5rem, 16vw, 5rem);
    }
    
    .landing-tagline {
        font-size: clamp(0.8rem, 3vw, 1rem);
    }
    
    /* About section */
    .panel.about-section {
        margin-top: 50px;
    }
    
    .about-content {
        padding: 60px 20px;
        overflow-y: visible;
        height: auto;
        min-height: 100vh;
        position: relative;
        z-index: 1;
    }
    
    .about-layout {
        flex-direction: column;
        gap: 30px;
        max-width: 100%;
    }
    
    .about-left,
    .about-right {
        width: 100%;
        max-width: 100%;
    }
    
    .about-intro {
        gap: 8px;
    }
    
    .about-greeting {
        font-size: 1.3rem;
    }
    
    .about-title {
        font-size: 3.2rem;
    }
    
    .about-tagline {
        font-size: 1.5rem;
    }
    
    .about-details {
        gap: 10px;
    }
    
    .about-card {
        min-width: 100px;
        max-width: 130px;
        padding: 12px;
    }
    
    .about-icon {
        font-size: 1.2rem;
    }
    
    .about-card h3 {
        font-size: 1.3rem;
    }
    
    .about-card p {
        font-size: 1.1rem;
    }
    
    .about-skills {
        max-width: 100%;
        flex-wrap: nowrap !important;
        gap: 20px;
        justify-content: flex-start;
    }
    
    .skill-tag {
        font-size: 2.2rem;
        padding: 10px;
        width: auto;
        height: auto;
    }
    
    .about-text-card {
        padding: 20px;
        gap: 12px;
        background: rgba(255, 255, 255, 0.08) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: 16px !important;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .about-text-card h3 {
        font-size: 1.5rem !important;
    }
    
    .about-text-card p {
        font-size: 1.3rem !important;
        line-height: 1.7;
        color: rgba(255, 255, 255, 0.8);
    }
    
    /* Work/Experience section */
    .panel-content {
        padding: 25px;
        max-width: 100%;
        margin: 0 15px;
        position: relative;
        z-index: 1;
    }
    
    .work-section {
        gap: 20px;
        padding: 40px 0;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        height: auto;
        min-height: auto;
        position: relative;
        z-index: 1;
        width: 100% !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .work-section::-webkit-scrollbar {
        display: none;
    }
    
    .work-section {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    .work-header {
        font-size: clamp(1.6rem, 7vw, 2rem) !important;
    }
    
    .work-title {
        font-size: clamp(1.8rem, 8vw, 2.4rem) !important;
    }
    
    .work-title-link {
        font-size: clamp(1.5rem, 7vw, 1.9rem) !important;
    }
    
    .work-item {
        flex: 0 0 85vw !important;
        min-width: 85vw !important;
        scroll-snap-align: center;
    }
    
    .work-item-container {
        padding: 24px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
        max-height: 350px !important;
        min-height: 220px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        border-radius: 16px !important;
        background: rgba(255, 255, 255, 0.08) !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    /* Scrollbar styling for work boxes */
    .work-item-container::-webkit-scrollbar {
        width: 3px;
    }
    
    .work-item-container::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 3px;
    }
    
    .work-item-container::-webkit-scrollbar-thumb {
        background: rgba(244, 162, 97, 0.5);
        border-radius: 3px;
    }
    
    .work-date {
        font-size: 1.3rem !important;
    }
    
    .work-description {
        font-size: 1.4rem !important;
        line-height: 1.8 !important;
    }
    
    /* ===== Combined Experience Section (Mobile Only) ===== */
    .panel.experience-combined {
        min-height: auto;
        padding: 20px 0 40px 0;
        margin-top: 50px;
        overflow: visible !important;
    }
    
    .experience-combined-content {
        width: 100%;
        padding: 0;
        overflow: visible !important;
    }
    
    .experience-title {
        font-family: 'Syne', sans-serif;
        font-size: 2rem;
        font-weight: 700;
        color: #ffffff;
        text-align: center;
        margin-bottom: 25px;
        padding: 0 20px;
    }
    
    .experience-scroll-container {
        display: flex !important;
        flex-direction: row !important;
        gap: 15px;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 10px 20px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        width: 100%;
    }
    
    .experience-scroll-container::-webkit-scrollbar {
        display: none;
    }
    
    .experience-card {
        flex: 0 0 80vw;
        min-width: 80vw;
        max-width: 80vw;
        scroll-snap-align: center;
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 24px;
        box-sizing: border-box;
    }
    
    .experience-header {
        font-family: 'Syne', sans-serif;
        font-size: 1.2rem;
        color: rgba(255, 255, 255, 0.6);
        margin-bottom: 12px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    .experience-role {
        font-family: 'Syne', sans-serif;
        font-size: 1.5rem;
        font-weight: 700;
        color: #f4a261;
        text-decoration: none;
        display: block;
        margin-bottom: 8px;
        transition: color 0.3s ease;
    }
    
    .experience-role:hover {
        color: #ffffff;
    }
    
    .experience-date {
        font-family: 'Raleway', sans-serif;
        font-size: 1.1rem;
        color: rgba(255, 255, 255, 0.5);
        margin-bottom: 15px;
    }
    
    .experience-desc {
        font-family: 'Raleway', sans-serif;
        font-size: 1.3rem;
        line-height: 1.6;
        color: rgba(255, 255, 255, 0.8);
    }
    
    .scroll-hint {
        text-align: center;
        font-family: 'Raleway', sans-serif;
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.4);
        margin-top: 15px;
        margin-bottom: 50px;
        animation: pulse 2s ease-in-out infinite;
    }
    
    @keyframes pulse {
        0%, 100% { opacity: 0.4; }
        50% { opacity: 0.8; }
    }

    /* Contact section */
    .contact-info {
        width: 100%;
        padding: 20px 20px 0 20px;
        position: relative;
        z-index: 1;
        box-sizing: border-box;
        margin: 0 auto;
    }
    
    .panel.contact-section {
        min-height: auto !important;
        height: auto !important;
        background-size: cover;
        background-position: center;
        padding-top: 60px;
        padding-bottom: 0 !important;
        margin-top: 150px;
        margin-bottom: 0 !important;
        display: flex;
        justify-content: center;
        align-items: flex-start;
    }
    
    .contact-info-wrapper {
        flex-direction: column-reverse;
        gap: 40px;
        text-align: left;
        width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    .contact-info-left {
        align-items: flex-start;
        display: flex;
        flex-direction: column;
        gap: 20px;
        width: 100%;
    }
    
    .connect-heading,
    .connect-text {
        display: none !important;
    }
    
    .email-container {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .email-link {
        font-size: 1.4rem;
        word-break: break-all;
    }
    
    .copy-email-btn {
        display: none !important;
    }
    
    .social-spacing {
        margin-top: 10px;
        margin-bottom: 0;
    }
    
    .contact-socials-list {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start;
        gap: 8px;
        padding: 0;
        margin: 0;
        padding-left: 0;
    }
    
    .contact-socials-list li {
        margin: 0;
        padding-left: 0;
    }
    
    .contact-socials-list .social-link {
        font-size: 1.4rem;
    }
    
    .contact-socials-list .social-link i {
        display: none !important;
    }
    
    .contact-info-right {
        align-items: center;
        text-align: center;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 150px;
    }
    
    .contact-info-right h3 {
        font-size: 1.5rem !important;
    }
    
    .contact-info-right p {
        font-size: 1.3rem !important;
    }
    
    .resume-download-btn {
        font-size: 1.4rem !important;
        padding: 16px 32px !important;
    }
    
    /* Scroll progress */
    .scroll-progress {
        height: 2px;
    }
    
    /* Convert horizontal scroll to vertical scroll on mobile */
    html {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
    }
    
    body {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
        min-height: auto !important;
    }
    
    .horizontal-wrapper {
        flex-direction: column !important;
        width: 100vw !important;
        height: auto !important;
        transform: none !important;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }
    
    .panel,
    .landing-page-wrapper {
        min-width: 100vw !important;
        width: 100vw !important;
        min-height: auto;
        height: auto !important;
        position: relative;
    }
    
    /* Keep landing page full height */
    .landing-page-wrapper {
        min-height: 100vh;
    }
    
    .panel.contact-section {
        min-height: auto !important;
    }
    
    .landing-page {
        min-height: 100vh;
        height: auto !important;
        overflow: visible !important;
    }
    
    /* Background layer for mobile */
    .background-layer {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #253830;
        z-index: -1;
    }
    
    html, body {
        background: #253830 !important;
    }
    
    /* Ensure panels have uniform background on mobile */
    .panel,
    .panel:nth-child(1),
    .panel:nth-child(2),
    .panel:nth-child(3),
    .panel:nth-child(4),
    .panel:nth-child(5),
    .panel:nth-child(6),
    .panel:nth-child(7) {
        background: #253830 !important;
    }
    
    .horizontal-wrapper {
        background: #253830 !important;
    }
    
    .landing-page-wrapper,
    .landing-page {
        background: #253830 !important;
    }
    
    /* Bio text mobile positioning */
    .bio-text {
        display: none !important;
    }
    
    .bio-text h2 {
        font-size: 1.8rem !important;
        line-height: 1.4 !important;
        margin-bottom: 10px !important;
    }
    
    .bio-text p {
        font-size: 1.2rem;
    }
    
    .bio-text .desktop-text {
        display: none !important;
    }
    
    .bio-text .mobile-text {
        display: block !important;
        font-size: 1.3rem !important;
        font-weight: 500 !important;
        letter-spacing: 0.5px !important;
        margin-top: 8px !important;
    }
    
    /* Gradient background for mobile */
    .gradient-bg {
        position: fixed;
    }
    
    /* Cursor hidden on touch devices */
    .cursor,
    .cursor-follower {
        display: none !important;
    }
}

/* ===== Large Screen Scaling ===== */
/* Scale content proportionally for screens larger than 13-inch (approx 1440px) */

@media (min-width: 1600px) {
    html {
        font-size: calc(16px * 1.15); /* 15% larger */
    }
    
    .about-layout {
        max-width: 1300px;
        transform: scale(1.1);
        transform-origin: center center;
    }
    
    .about-card {
        min-width: 140px;
        max-width: 180px;
    }
    
    .about-right {
        max-width: 620px;
    }
    
    .work-section {
        transform: scale(1.1);
        transform-origin: center center;
    }
    
    .contact-info-wrapper {
        transform: scale(1.1);
        transform-origin: center center;
    }
    
    /* Landing page scaling */
    .name-title {
        font-size: clamp(4rem, 10vw, 8rem);
    }
    
    .landing-tagline {
        font-size: clamp(1rem, 1.8vw, 1.5rem);
    }
    
    .navbar, .main-nav, .social-icons {
        transform: scale(1.1);
        transform-origin: top left;
    }
    
    .main-nav {
        transform-origin: top right;
    }
    
    .social-icons {
        transform-origin: bottom left;
    }
    
    .dot-pagination {
        transform: scale(1.1);
        transform-origin: bottom right;
    }
}

@media (min-width: 1920px) {
    html {
        font-size: calc(16px * 1.25); /* 25% larger */
    }
    
    .bennet-image {
        width: 35vw;
    }
    
    .about-layout {
        max-width: 1400px;
        transform: scale(1.2);
    }
    
    .about-card {
        min-width: 150px;
        max-width: 200px;
    }
    
    .about-right {
        max-width: 680px;
    }
    
    .work-section {
        transform: scale(1.2);
    }
    
    .contact-info-wrapper {
        transform: scale(1.2);
    }
    
    .landing-page .hi-there-bg {
        font-size: clamp(8rem, 18vw, 15rem);
    }
    
    /* Landing page scaling */
    .name-title {
        font-size: clamp(5rem, 12vw, 10rem);
    }
    
    .landing-tagline {
        font-size: clamp(1.1rem, 2vw, 1.7rem);
    }
    
    .navbar, .main-nav, .social-icons {
        transform: scale(1.15);
        transform-origin: top left;
    }
    
    .main-nav {
        transform-origin: top right;
    }
    
    .social-icons {
        transform-origin: bottom left;
    }
    
    .dot-pagination {
        transform: scale(1.15);
        transform-origin: bottom right;
    }
}

@media (min-width: 2560px) {
    html {
        font-size: calc(16px * 1.5); /* 50% larger for 4K */
    }
    
    .about-layout {
        max-width: 1600px;
        transform: scale(1.4);
    }
    
    .work-section {
        transform: scale(1.4);
    }
    
    .contact-info-wrapper {
        transform: scale(1.4);
    }
    
    .bennet-image {
        width: 30vw;
    }
    
    /* Landing page scaling */
    .name-title {
        font-size: clamp(6rem, 14vw, 12rem);
    }
    
    .landing-tagline {
        font-size: clamp(1.3rem, 2.2vw, 2rem);
    }
    
    .navbar, .main-nav, .social-icons {
        transform: scale(1.3);
        transform-origin: top left;
    }
    
    .main-nav {
        transform-origin: top right;
    }
    
    .social-icons {
        transform-origin: bottom left;
    }
    
    .dot-pagination {
        transform: scale(1.3);
        transform-origin: bottom right;
    }
    
    .landing-page .hi-there-bg {
        font-size: clamp(10rem, 20vw, 18rem);
    }
}

@media (max-width: 480px) {
    :root {
        --side-offset: 15px;
    }
    
    html {
        font-size: 13px;
    }
    
    .navbar {
        top: 10px;
        left: 15px;
    }
    
    .logo-text {
        font-size: 0.9rem;
    }
    
    .main-nav {
        top: 10px;
        right: 15px;
        gap: 10px;
    }
    
    .main-nav a {
        font-size: 0.75rem;
    }
    
    .landing-resume-btn {
        font-size: 0.7rem;
        padding: 6px 12px;
    }
    
    .social-icons {
        bottom: 15px;
        left: 15px;
        gap: 10px;
    }
    
    .social-icons a {
        font-size: 1rem;
    }
    
    .bennet-image {
        width: 80vw;
        min-width: 220px;
    }
    
    .name-title {
        font-size: clamp(2rem, 10vw, 3rem);
    }
    
    .hi-there-bg {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }
    
    .landing-tagline {
        font-size: 0.75rem;
    }
    
    /* About section */
    .about-content {
        padding: 15px;
    }
    
    .about-layout {
        gap: 25px;
    }
    
    .about-title {
        font-size: 2rem;
    }
    
    .about-details {
        flex-wrap: wrap;
    }
    
    .about-card {
        min-width: 90px;
        max-width: 110px;
        padding: 10px;
    }
    
    .about-text-card {
        padding: 14px;
    }
    
    .about-text-card h3 {
        font-size: 0.9rem;
    }
    
    .about-text-card p {
        font-size: 0.8rem;
    }
    
    /* Work section */
    .work-section {
        padding: 15px;
    }
    
    .work-header {
        font-size: 0.9rem;
    }
    
    .work-title {
        font-size: 1.1rem;
    }
    
    .work-title-link {
        font-size: 0.85rem;
    }
    
    .work-item-container {
        padding: 12px;
    }
    
    .work-description {
        font-size: 0.8rem;
    }
    
    /* Contact section */
    .contact-info-wrapper {
        gap: 25px;
    }
    
    .connect-heading,
    .connect-text {
        font-size: 1.4rem;
    }
    
    .email-link {
        font-size: 1.4rem;
    }
    
    .contact-info-right h3 {
        font-size: 1rem;
    }
    
    .contact-info-right p {
        font-size: 0.8rem;
    }
    
    .resume-download-btn {
        font-size: 0.8rem;
        padding: 8px 16px;
    }
}
/* Fix contact section bottom spacing */
@media (max-width: 768px) {
    .panel.contact-section,
    .panel.contact-section .contact-info,
    .panel.contact-section .contact-info-wrapper {
        min-height: auto !important;
        height: auto !important;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }
    
    .mobile-footer {
        margin-bottom: 0 !important;
        padding-bottom: 25px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 20px;
        margin-top: 25px;
    }
    
    body::after {
        display: none !important;
    }
    
    /* Back to Top Button */
    .back-to-top {
        display: none;
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: rgba(255, 255, 255, 0.6);
        font-size: 0.9rem;
        cursor: pointer;
        z-index: 1000;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
        box-shadow: none;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .back-to-top.visible {
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 1;
        transform: translateY(0);
    }
    
    .back-to-top:active {
        transform: scale(0.95);
    }
}