/* ==========================================================================
   Responsive Design - Mobile & Tablet Optimizations
   ========================================================================== */

/* Extra Large Devices (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* Large Devices (992px and up) */
@media (min-width: 992px) and (max-width: 1199px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .profile-img {
        width: 280px;
        height: 280px;
    }
    
    .hexagon-frame {
        width: 300px;
        height: 300px;
    }
}

/* Medium Devices (768px and up) */
@media (min-width: 768px) and (max-width: 991px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .profile-img {
        width: 250px;
        height: 250px;
    }
    
    .hexagon-frame {
        width: 270px;
        height: 270px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 4rem !important;
        padding-right: 1rem !important;
    }
    
    .timeline::before {
        left: 2rem;
    }
    
    .timeline-date {
        left: -1rem !important;
        right: auto !important;
    }
    
    .navbar-nav {
        text-align: center;
        margin-top: 1rem;
    }
    
    .social-links {
        justify-content: center;
        margin: 1rem 0 0 0;
    }
}

/* Small Devices (576px and up) */
@media (min-width: 576px) and (max-width: 767px) {
    .hero-section {
        padding: 2rem 0;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
        margin: 0 auto 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
    
    .profile-img {
        width: 220px;
        height: 220px;
    }
    
    .hexagon-frame {
        width: 240px;
        height: 240px;
    }
    
    .timeline {
        padding: 1rem 0;
    }
    
    .timeline::before {
        left: 1.5rem;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 3.5rem !important;
        padding-right: 1rem !important;
        margin-bottom: 2rem;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
    
    .timeline-date {
        left: -1.5rem !important;
        right: auto !important;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.4rem 0.8rem !important;
        margin: 0.2rem;
    }
    
    .social-links {
        justify-content: center;
        margin: 1rem 0 0 0;
        gap: 0.8rem;
    }
    
    .social-links a {
        font-size: 1.1rem;
    }
}

/* Extra Small Devices (less than 576px) */
@media (max-width: 575px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-section {
        padding: 1.5rem 0;
        text-align: center;
        min-height: 90vh;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.8rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
        margin: 0 auto 1.5rem;
        padding: 0 1rem;
    }
    
    .section-header {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .profile-img {
        width: 180px;
        height: 180px;
    }
    
    .hexagon-frame {
        width: 200px;
        height: 200px;
    }
    
    .timeline {
        padding: 1rem 0;
    }
    
    .timeline::before {
        left: 1rem;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 3rem !important;
        padding-right: 0.5rem !important;
        margin-bottom: 1.5rem;
    }
    
    .timeline-content {
        padding: 1.2rem;
        border-radius: 10px;
    }
    
    .timeline-date {
        left: -1.2rem !important;
        right: auto !important;
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
        border-radius: 15px;
    }
    
    .card {
        margin-bottom: 1.5rem;
        border-radius: 10px;
    }
    
    .card-body {
        padding: 1.2rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
        border-radius: 20px;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn:last-child {
        margin-bottom: 0;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.2rem 0.5rem;
    }
    
    .navbar-nav {
        text-align: center;
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem !important;
        margin: 0.2rem 0;
        border-radius: 20px;
        display: block;
    }
    
    .navbar-nav .nav-link i {
        margin-right: 0.5rem;
    }
    
    .social-links {
        justify-content: center;
        margin: 1rem 0 0 0;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .social-links a {
        font-size: 1rem;
        padding: 0.5rem;
        border-radius: 50%;
        background: rgba(0, 212, 170, 0.1);
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    

    
    .footer {
        padding: 2rem 0 1.5rem;
        margin-top: 3rem;
    }
    
    .footer-social a {
        font-size: 1.2rem;
        margin: 0 0.5rem;
    }
    
    .footer-text {
        font-size: 0.8rem;
        padding: 0 1rem;
    }
    
    .scroll-indicator {
        bottom: 1rem;
        font-size: 1.5rem;
    }
}

/* Skills Page Responsive */
@media (max-width: 767px) {
    .skills-category {
        margin-bottom: 2rem;
    }
    
    .category-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .tech-stack-card {
        margin-bottom: 1.5rem;
    }
    
    .stack-title {
        font-size: 1.2rem;
    }
    
    .tech-item {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    .project-card {
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    .project-icon {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .tech-tag {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
        margin: 0.2rem;
    }
}

/* Experience Page Responsive */
@media (max-width: 767px) {
    .experience-stats {
        text-align: center;
    }
    
    .stat-item {
        margin-bottom: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .references-section .card {
        margin-bottom: 1rem;
    }
}

/* About Page Responsive */
@media (max-width: 767px) {
    .journey-timeline {
        padding-left: 0;
    }
    
    .education-item {
        margin-bottom: 1.5rem;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .value-item {
        text-align: center;
        padding: 1.5rem;
    }
}

/* Home Page Responsive */
@media (max-width: 767px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        text-align: center;
        padding: 1.5rem;
    }
    
    .service-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .skills-overview {
        padding: 2rem 0;
    }
    
    .professional-overview-section {
        padding: 3rem 0;
    }
    
    .overview-content {
        padding: 1rem 0;
        margin-bottom: 2rem;
    }
    
    .overview-description {
        font-size: 1rem;
        text-align: center;
    }
    
    .overview-highlights {
        padding: 1.5rem;
        margin-top: 2rem;
    }
    
    .highlight-item {
        padding: 0.75rem;
        margin-bottom: 1rem;
        flex-direction: column;
        text-align: center;
    }
    
    .highlight-item i {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .overview-actions {
        text-align: center;
    }
    
    .overview-actions .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .skill-item {
        margin-bottom: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .scroll-indicator,
    .btn,
    .social-links {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card,
    .timeline-content {
        border: 1px solid #ccc !important;
        background: white !important;
        box-shadow: none !important;
    }
    
    .section-title,
    .hero-title {
        color: black !important;
    }
    
    .highlight {
        color: #333 !important;
        background: none !important;
        -webkit-text-fill-color: initial !important;
    }
    
    .timeline::before {
        background: #ccc !important;
    }
    
    .timeline-date {
        background: #333 !important;
        color: white !important;
    }
    
    .skill-progress {
        background: #333 !important;
    }
    
    a {
        color: #333 !important;
        text-decoration: underline !important;
    }
    
    .page-break {
        page-break-before: always;
    }
    
    /* Print-friendly icons */
    .social-btn,
    .value-icon,
    .journey-icon,
    .stack-icon {
        background: white !important;
        color: black !important;
        border: 1px solid #ccc !important;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .profile-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion */
@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;
    }
    
    .loading-spinner .spinner {
        animation: none;
    }
}

/* Icon Container Responsive Styles */
@media (max-width: 768px) {
    .social-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        margin: 0 0.3rem;
    }
    
    .hero-social .social-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .value-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .journey-icon {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
    }
    
    .stack-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .education-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        margin-right: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-social {
        justify-content: center;
        gap: 0.8rem;
    }
    
    .social-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .hero-social .social-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .value-icon {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
    }
    
    .journey-icon {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
    }
    
    .stack-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

/* Dark Mode Support (for browsers that support it) */
@media (prefers-color-scheme: dark) {
    /* Already using dark theme, but can add overrides if needed */
}

/* Landscape Orientation on Mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-section {
        min-height: 70vh;
        padding: 1rem 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .profile-img {
        width: 150px;
        height: 150px;
    }
    
    .hexagon-frame {
        width: 170px;
        height: 170px;
    }
    
    .navbar {
        padding: 0.3rem 0;
    }
    
    .section-header {
        margin-bottom: 1.5rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .navbar-nav .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .social-links a {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .card:hover {
        transform: none;
    }
    
    .timeline-content:hover {
        transform: none;
    }
}

/* Focus Styles for Accessibility */
@media (prefers-reduced-motion: no-preference) {
    .btn:focus,
    .nav-link:focus,
    a:focus {
        outline: 2px solid var(--accent-color);
        outline-offset: 2px;
    }
}

/* Container Responsive Adjustments */
@media (max-width: 575px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
}