/* ============================================
   RESPONSIVE DESIGN & MEDIA QUERIES
   ============================================ */

/* Large Tablets and Small Desktops: 1024px and below */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }

    section {
        padding: 80px 0;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Tablet: 768px and below */
@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2.25rem;
        margin-bottom: 2.5rem;
    }

    /* Navbar */
    .navbar {
        padding: 1rem 0;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px) saturate(180%);
        padding: 2rem;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        gap: 0;
        border-top: 1px solid var(--border-color);
    }

    .nav-links a {
        margin: 0;
        padding: 1rem 0;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
        font-size: 1rem;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    /* Hero */
    .hero {
        padding: 140px 0 70px;
        min-height: auto;
    }

    .hero-title {
        font-size: 2.75rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
        letter-spacing: 0.12em;
    }

    .hero-badge {
        font-size: 0.9rem;
        padding: 0.85rem 1.25rem;
    }

    .hero-description {
        font-size: 1.05rem;
        margin-bottom: 2.5rem;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat {
        padding: 1.5rem 1.25rem;
    }

    .stat h3 {
        font-size: 2.25rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 0.75rem;
        max-width: 320px;
        margin: 0 auto;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .social-links {
        margin-top: 1.5rem !important;
    }

    .social-links a {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.3rem !important;
    }

    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-highlights {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Timeline */
    .timeline::before {
        left: 20px;
    }

    .timeline-item:nth-child(even) .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content {
        margin-left: 70px;
        margin-right: 0;
        text-align: left;
    }

    .timeline-dot {
        left: 20px;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .timeline-date {
        font-size: 0.9rem;
    }

    /* Projects Grid */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .project-card {
        padding: 2rem;
    }

    .project-tech {
        gap: 0.5rem;
    }

    .project-tech span {
        font-size: 0.8rem;
        padding: 0.45rem 0.9rem;
    }

    .project-metrics {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    /* Skills Grid */
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-methods {
        grid-template-columns: 1fr;
    }
}

/* Mobile: 480px and below */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 1.875rem;
        margin-bottom: 2rem;
    }

    /* Navbar */
    .navbar {
        padding: 0.875rem 0;
    }

    .nav-brand {
        font-size: 1.25rem;
    }

    .nav-links {
        padding: 1.5rem;
    }

    /* Hero */
    .hero {
        padding: 120px 0 50px;
        min-height: auto;
    }

    .hero::before {
        width: 500px;
        height: 500px;
        top: -30%;
        right: -40%;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.25;
        margin-bottom: 0.875rem;
    }

    .hero-subtitle {
        font-size: 0.875rem;
        letter-spacing: 0.1em;
        margin-bottom: 1rem;
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 0.75rem 1.125rem;
        word-wrap: break-word;
        gap: 0.5rem;
    }

    .hero-badge i {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.95rem;
        line-height: 1.7;
        margin-bottom: 2rem;
    }

    .hero-stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.875rem;
    }

    .stat {
        padding: 1.25rem 1rem;
        border-radius: 16px;
    }

    .stat h3 {
        font-size: 2rem;
    }

    .stat p {
        font-size: 0.8rem;
    }

    .hero-cta {
        gap: 0.75rem;
    }

    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }

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

    .about-text p {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .highlight-item {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .info-item {
        font-size: 0.9rem;
    }

    /* Experience */
    .timeline-content {
        padding: 1.5rem;
    }

    .timeline-content h3 {
        font-size: 1.125rem;
    }

    .timeline-content h4 {
        font-size: 1rem;
    }

    .timeline-content ul li {
        font-size: 0.9rem;
        line-height: 1.65;
        margin-bottom: 0.75rem;
    }

    /* Projects */
    .project-card {
        padding: 1.75rem;
    }

    .project-icon {
        font-size: 1.5rem;
        width: 56px;
        height: 56px;
    }

    .project-card h3 {
        font-size: 1.15rem;
        line-height: 1.4;
    }

    .project-card p {
        font-size: 0.9rem;
        line-height: 1.65;
    }

    .project-tech {
        gap: 0.4rem;
        flex-wrap: wrap;
    }

    .project-tech span {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    .project-metrics {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .metric {
        padding: 0.875rem;
    }

    .metric strong {
        font-size: 1.05rem;
        word-wrap: break-word;
        word-break: break-word;
        line-height: 1.3;
    }

    .metric span {
        font-size: 0.75rem;
        word-wrap: break-word;
    }

    /* Skills */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .skill-category {
        padding: 1.5rem;
    }

    .skill-category h3 {
        font-size: 1.125rem;
    }

    .skill-tags {
        gap: 0.5rem;
    }

    .skill-tags span {
        padding: 0.55rem 1rem;
        font-size: 0.8rem;
    }

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

    .form-group input,
    .form-group textarea {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .contact-method {
        padding: 1.125rem;
        gap: 1rem;
    }

    .contact-method i {
        font-size: 1.25rem;
    }

    .contact-method div {
        font-size: 0.875rem;
    }

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

    .footer p {
        font-size: 0.875rem;
    }

    .footer-social {
        gap: 1rem !important;
    }

    .footer-social a {
        font-size: 1.3rem !important;
    }

    /* Utility classes for text wrapping */
    h1, h2, h3, h4, h5, h6, p, li, span {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* Extra small: 360px and below */
@media (max-width: 360px) {
    .container {
        padding: 0 14px;
    }

    .section-title {
        font-size: 1.625rem;
    }

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

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .stat {
        padding: 1rem 0.875rem;
    }

    .stat h3 {
        font-size: 1.75rem;
    }

    .project-metrics {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .project-tech span {
        font-size: 0.7rem;
        padding: 0.35rem 0.7rem;
    }

    .metric strong {
        font-size: 0.95rem;
    }

    .metric span {
        font-size: 0.7rem;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* Landscape mode adjustments for small devices */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }

    section {
        padding: 50px 0;
    }

    .hero-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
    }

    .stat {
        padding: 1rem 0.75rem;
    }

    .stat h3 {
        font-size: 1.75rem;
    }

    .stat p {
        font-size: 0.75rem;
    }
}

/* High-resolution displays */
@media (min-width: 1440px) {
    .container {
        max-width: 1280px;
    }

    .hero-title {
        font-size: 4rem;
    }

    .section-title {
        font-size: 3rem;
    }
}
