/*===========================================
   Responsive Styles for Akash's Portfolio
===========================================*/

/*------------------------------------------
   BREAKPOINTS
   - Extra Large: 1400px+
   - Large: 1200px - 1399px
   - Medium: 992px - 1199px
   - Tablet: 768px - 991px
   - Mobile Large: 576px - 767px
   - Mobile Small: 575px and below
------------------------------------------*/

/*------------------------------------------
   LARGE SCREENS (up to 1399px)
------------------------------------------*/
@media screen and (max-width: 1399px) {
    :root {
        --container-width: 1140px;
    }
    
    h1 {
        font-size: calc(var(--size-5xl) - 0.5rem);
    }
    
    h2 {
        font-size: calc(var(--size-4xl) - 0.5rem);
    }
}

/*------------------------------------------
   MEDIUM SCREENS (up to 1199px)
------------------------------------------*/
@media screen and (max-width: 1199px) {
    :root {
        --container-width: 960px;
        --container-padding: 1.5rem;
    }
    
    section {
        padding: 5rem 0;
    }
    
    .nav-links {
        gap: 1.5rem;
    }
    
    .about-grid {
        gap: 3rem;
    }
    
    .footer-links {
        gap: 3rem;
    }
}

/*------------------------------------------
   TABLET SCREENS (up to 991px)
------------------------------------------*/
@media screen and (max-width: 991px) {
    :root {
        --container-width: 720px;
    }
    
    h1 {
        font-size: calc(var(--size-4xl) + 0.5rem);
    }
    
    h2 {
        font-size: var(--size-3xl);
    }
    
    h3 {
        font-size: var(--size-2xl);
    }
    
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--color-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        z-index: var(--layer-dropdown);
        backdrop-filter: blur(10px);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        font-size: var(--size-lg);
    }
    
    .menu-btn {
        display: block;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-image {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .about-content {
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .project-inner,
    .project.reversed .project-inner {
        grid-template-columns: 1fr;
    }
    
    .project-image,
    .project.reversed .project-image {
        order: 1;
        min-height: 300px;
    }
    
    .project-content,
    .project.reversed .project-content {
        order: 2;
        padding: 2rem;
    }
    
    .project {
        margin-bottom: 4rem;
    }
    
    .project-title {
        font-size: var(--size-2xl);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-branding {
        align-items: center;
        text-align: center;
        padding-right: 0;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .footer-links-container {
        max-width: 800px;
        margin: 0 auto;
        width: 100%;
    }
}

/*------------------------------------------
   MOBILE LARGE SCREENS (up to 767px)
------------------------------------------*/
@media screen and (max-width: 767px) {
    :root {
        --container-width: 540px;
        --container-padding: 1rem;
        --section-spacing: 4rem;
    }
    
    section {
        padding: 4rem 0;
    }
    
    .hero {
        min-height: 100vh;
        display: flex;
        align-items: center;
        padding-top: 5rem;
    }
    
    .hero-content {
        width: 100%;
        max-width: 540px;
        margin: 0 auto;
        padding: 0 1.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    
    .hero-badge {
        font-size: 0.875rem;
        padding: 0.5rem 1.25rem;
        border-radius: 50px;
        margin-bottom: 0.5rem;
    }
    
    .hero h1 {
        font-size: 2.25rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
        text-align: center;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
        line-height: 1.5;
    }
    
    .hero-description {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
        text-align: center;
        max-width: 450px;
    }
    
    .hero-buttons,
    .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    /* Tech Stack Section Mobile Styles */
    .skills-container {
        flex-direction: column;
        gap: 1.5rem;
        padding: 0 1rem;
        width: 100%;
    }

    .skill-card {
        width: 100%;
        max-width: none;
        padding: 1.75rem;
        gap: 1.25rem;
    }

    .skill-icon {
        width: 40px;
        height: 40px;
    }

    .skill-info {
        gap: 0.75rem;
    }

    .skill-header {
        gap: 0.5rem;
    }

    .skill-name {
        font-size: var(--size-sm);
    }

    .skill-level {
        font-size: var(--size-xs);
        padding: 0.3rem 0.75rem;
    }

    .skill-progress-wrapper {
        gap: 0.5rem;
        justify-content: center;
        margin-top: 0.25rem;
    }

    .skill-progress {
        height: 3px;
        width: 70px;
        flex: none;
    }

    .progress-percentage {
        font-size: var(--size-xs);
        min-width: 28px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }
    
    .footer-links-column {
        text-align: center;
        width: 100%;
    }
    
    .footer-links-column ul {
        align-items: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .scroll-indicator {
        display: none;
    }

    /* Footer Styles */
    footer {
        padding: 2rem 0 1.5rem;
    }

    .footer-content {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-branding {
        text-align: center;
        padding-right: 0;
        margin: 0 auto;
        max-width: 280px;
    }

    .footer-logo {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .footer-tagline {
        font-size: 0.8rem;
        margin-bottom: 1.25rem;
        line-height: 1.5;
        color: var(--color-light-dimmed);
        text-align: center;
    }

    .footer-social {
        justify-content: center;
        margin: 0 auto;
        gap: 0.75rem;
    }

    .footer-social-link {
        width: 36px;
        height: 36px;
        background-color: rgba(74, 108, 247, 0.08);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }

    .footer-social-link svg {
        width: 18px;
        height: 18px;
        color: var(--color-primary);
    }

    .footer-social-link:hover {
        background-color: var(--color-primary);
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(74, 108, 247, 0.15);
    }

    .footer-social-link:hover svg {
        color: white;
    }

    .footer-links-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }

    .footer-links-section {
        text-align: center;
        padding: 1.25rem;
        background-color: rgba(74, 108, 247, 0.03);
        border-radius: 10px;
        border: 1px solid rgba(74, 108, 247, 0.08);
        margin: 0 auto;
        max-width: 280px;
        transition: all 0.3s ease;
    }

    .footer-links-section:hover {
        transform: translateY(-3px);
        background-color: rgba(74, 108, 247, 0.05);
        border-color: rgba(74, 108, 247, 0.15);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    }

    .footer-heading {
        font-size: 0.9rem;
        margin-bottom: 1.25rem;
        display: inline-block;
        text-align: center;
        letter-spacing: 1.5px;
        position: relative;
        color: white;
        font-family: var(--font-heading);
        text-transform: uppercase;
    }

    .footer-heading::after {
        content: '';
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: 35px;
        height: 2px;
        background-color: var(--color-primary);
        bottom: -8px;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
        align-items: center;
        padding: 0;
        margin: 0;
        list-style: none;
    }

    .footer-links li {
        padding: 0;
        width: 100%;
        position: relative;
    }

    .footer-links li::before {
        display: none;
    }

    .footer-links a {
        font-size: 0.85rem;
        padding: 0.7rem 1rem;
        background-color: rgba(74, 108, 247, 0.03);
        border-radius: 8px;
        width: 100%;
        display: block;
        text-align: center;
        border: 1px solid rgba(74, 108, 247, 0.08);
        color: var(--color-light-dimmed);
        transition: all 0.3s ease;
        text-decoration: none;
    }

    .footer-links a:hover {
        transform: translateY(-2px);
        background-color: rgba(74, 108, 247, 0.08);
        color: var(--color-primary);
        border-color: rgba(74, 108, 247, 0.15);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        padding-top: 1.5rem;
        margin-top: 1rem;
        border-top: 1px solid rgba(74, 108, 247, 0.08);
    }

    .copyright {
        font-size: 0.8rem;
        color: var(--color-light-dimmed);
    }

    .footer-credits {
        font-size: 0.8rem;
        color: var(--color-light-dimmed);
    }

    .footer-credits .heart {
        color: #ff5e5e;
        display: inline-block;
        animation: heartbeat 1.5s infinite;
    }

    .footer-credits .highlight {
        color: var(--color-primary);
        font-weight: 600;
    }

    .footer-waves {
        position: absolute;
        top: -80px;
        left: 0;
        width: 100%;
        height: 80px;
        overflow: hidden;
    }

    .waves {
        position: absolute;
        width: 100%;
        height: 80px;
        bottom: 0;
        left: 0;
    }

    .parallax > use {
        animation: move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite;
    }

    .parallax > use:nth-child(1) {
        animation-delay: -2s;
        animation-duration: 7s;
    }

    .parallax > use:nth-child(2) {
        animation-delay: -3s;
        animation-duration: 10s;
    }

    .parallax > use:nth-child(3) {
        animation-delay: -4s;
        animation-duration: 13s;
    }

    .parallax > use:nth-child(4) {
        animation-delay: -5s;
        animation-duration: 20s;
    }
}

@media screen and (max-width: 480px) {
    .skill-card {
        padding: 1.5rem;
        gap: 1rem;
    }

    .skill-icon {
        width: 36px;
        height: 36px;
    }

    .skill-progress {
        width: 60px;
    }

    .progress-percentage {
        min-width: 25px;
    }
}

/*------------------------------------------
   MOBILE SMALL SCREENS (up to 575px)
------------------------------------------*/
@media screen and (max-width: 575px) {
    :root {
        --container-width: 100%;
        --container-padding: 1rem;
    }
    
    .hero {
        padding-top: 4rem;
    }
    
    .hero-content {
        padding: 0 1rem;
        gap: 1.25rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 0.9375rem;
    }
    
    .hero-buttons {
        max-width: 250px;
    }
    
    .hero-stats {
        padding: 1rem 0;
    }
    
    .stat-item {
        padding: 0 0.75rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }
    
    .stat-divider {
        height: 40px;
    }
    
    .scroll-indicator {
        bottom: 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 0.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 1rem;
    }
    
    .service-card h3 {
        font-size: var(--size-lg);
        margin-bottom: 0.75rem;
    }
    
    .service-card p {
        font-size: var(--size-sm);
    }
    
    .neon-text {
        font-size: var(--size-2xl);
    }
    
    .project-content h3 {
        font-size: var(--size-lg);
    }
    
    .project-content p {
        font-size: var(--size-xs);
    }
    
    .section-title {
        width: 100%;
        text-align: center;
    }
    
    .fact-container {
        padding: 1.5rem;
    }
    
    #fact-text {
        font-size: var(--size-md);
    }
    
    .skills-section {
        padding: 2rem 0;
    }
    
    .skills-wrapper {
        margin: 0 1rem;
        padding: 1.5rem 1rem;
    }
    
    .skills-container {
        max-width: 400px;
    }
    
    .skills-category-title {
        font-size: 1.125rem;
    }
    
    .skills-card {
        padding: 1.25rem;
    }
    
    .skills-card-header {
        gap: 0.5rem;
    }
    
    .skills-card-icon {
        width: 28px;
        height: 28px;
    }
    
    .skills-card-title {
        font-size: 1rem;
    }
    
    .skills-card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .skill-icon {
        padding: 0.4rem;
    }
    
    .skill-icon img {
        width: 20px;
        height: 20px;
        margin-bottom: 3px;
    }
    
    .skill-icon span {
        font-size: 0.6rem;
    }

    /* Footer Styles */
    footer {
        padding: 2.5rem 1rem 1.5rem;
    }

    .footer-container {
        gap: 2rem;
    }

    .footer-content {
        gap: 1.5rem;
    }

    .footer-logo img {
        width: 100px;
        margin-bottom: 0.75rem;
    }

    .footer-description {
        font-size: 0.85rem;
    }

    .footer-links {
        gap: 1.5rem;
    }

    .footer-links-column h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .footer-links-list {
        gap: 0.5rem;
    }

    .footer-links-list a {
        font-size: 0.85rem;
    }

    .footer-social {
        gap: 1rem;
    }

    .footer-social i {
        font-size: 1.25rem;
    }

    .footer-bottom {
        padding-top: 1.5rem;
    }

    .footer-bottom p {
        font-size: 0.8rem;
    }
}

/*------------------------------------------
   HEIGHT-BASED MEDIA QUERIES
------------------------------------------*/
@media screen and (max-height: 700px) {
    .hero {
        min-height: 500px;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    .hero-content {
        padding-top: 6rem;
    }
}

/*------------------------------------------
   PRINT STYLES
------------------------------------------*/
@media print {
    body {
        background-color: white;
        color: black;
    }
    
    .navbar,
    .preloader,
    .custom-cursor,
    .cursor-follower,
    .matrix-effect {
        display: none;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    .section-title::after,
    .image-frame::before {
        display: none;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/*------------------------------------------
   DARK MODE PREFERENCE
------------------------------------------*/
@media (prefers-color-scheme: light) {
    /* Default is already dark, this prepares for future light mode */
    
}

/*------------------------------------------
   REDUCED MOTION PREFERENCE
------------------------------------------*/
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .glitch::before,
    .glitch::after {
        display: none;
    }
    
    .scroll-indicator,
    .cursor-follower,
    .custom-cursor {
        display: none;
    }

    .project-thumbnail:hover {
        transform: none;
    }
    
    .thumbnail-image img {
        transition: opacity 0.5s ease;
    }
    
    .project-thumbnail:hover .thumbnail-image img {
        transform: none;
    }
    
    [data-aos] {
        transition-duration: 0.001ms !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Projects Page Responsive Styles */
@media screen and (max-width: 992px) {
    .projects-intro-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 576px) {
    .projects-intro-grid {
        grid-template-columns: 1fr;
    }

    .footer-links-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links-section {
        text-align: center;
        max-width: 350px;
        margin: 0 auto;
        width: 100%;
    }
    
    .footer-heading {
        margin: 0 auto 1.5rem auto;
    }
    
    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-links li {
        padding-left: 0;
    }
    
    .footer-links li::before {
        display: none;
    }
}

/* Skeleton Loader Animation */
@keyframes skeleton-loading {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0 50%;
    }
}

.skeleton-thumbnail {
    background-color: rgba(30, 35, 50, 0.6);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(74, 108, 247, 0.1);
    backdrop-filter: blur(5px);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.skeleton-thumbnail .thumbnail-image {
    height: 200px;
    background: linear-gradient(90deg, rgba(40, 45, 60, 0.8) 25%, rgba(50, 55, 70, 0.8) 37%, rgba(40, 45, 60, 0.8) 63%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease infinite;
}

.skeleton-thumbnail .thumbnail-content {
    padding: 1.8rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.skeleton-title {
    height: 25px;
    width: 70%;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, rgba(40, 45, 60, 0.8) 25%, rgba(50, 55, 70, 0.8) 37%, rgba(40, 45, 60, 0.8) 63%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease infinite;
    border-radius: 4px;
}

.skeleton-desc {
    height: 15px;
    width: 100%;
    margin-bottom: 0.8rem;
    background: linear-gradient(90deg, rgba(40, 45, 60, 0.8) 25%, rgba(50, 55, 70, 0.8) 37%, rgba(40, 45, 60, 0.8) 63%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease infinite;
    border-radius: 4px;
}

.skeleton-tags {
    display: flex;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.skeleton-tag {
    height: 24px;
    width: 80px;
    background: linear-gradient(90deg, rgba(40, 45, 60, 0.8) 25%, rgba(50, 55, 70, 0.8) 37%, rgba(40, 45, 60, 0.8) 63%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease infinite;
    border-radius: 4px;
}

.skeleton-btn {
    height: 36px;
    width: 120px;
    background: linear-gradient(90deg, rgba(40, 45, 60, 0.8) 25%, rgba(50, 55, 70, 0.8) 37%, rgba(40, 45, 60, 0.8) 63%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease infinite;
    border-radius: 6px;
    margin-top: auto;
}

/* Animation for image loading */
.thumbnail-image img {
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.thumbnail-image img.loaded {
    opacity: 1;
}

/* Tablet specific optimizations */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .project-thumbnails {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile specific optimizations */
@media screen and (max-width: 480px) {
    .project-thumbnails {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        padding: 7rem 0 3rem;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
} 