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

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

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

    /* Navbar */
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        padding: 2rem;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(10px);
        z-index: 1000;
    }

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

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

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

    .hamburger {
        display: flex;
    }

    /* Hero */
    .hero {
        padding: 120px 0 60px;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-badge {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

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

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

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

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

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

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

    .timeline-dot {
        left: 16px;
    }

    .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: 2rem;
    }

    .project-tech {
        gap: 0.5rem;
    }

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

    /* Skills Grid */
    .skills-grid {
        grid-template-columns: 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 15px;
    }

    section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

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

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

    .nav-links {
        top: 55px;
        padding: 1.5rem;
    }

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

    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        letter-spacing: 0.1em;
    }

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

    .hero-description {
        font-size: 0.95rem;
        line-height: 1.6;
    }

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

    .stat {
        padding: 1rem;
    }

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

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

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

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

    .highlight-item {
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
    }

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

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

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

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

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

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

    .project-icon {
        font-size: 2rem;
        width: 60px;
        height: 60px;
    }

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

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

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

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

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

    .metric {
        padding: 0.8rem;
    }

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

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

    /* Skills */
    .skill-category {
        padding: 1.5rem;
    }

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

    .skill-tags {
        gap: 0.5rem;
    }

    .skill-tags span {
        padding: 0.5rem 0.9rem;
        font-size: 0.75rem;
    }

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

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

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

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

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

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

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

    /* Button size adjustment */
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    /* 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 12px;
    }

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

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

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

    .stat {
        padding: 0.8rem;
    }

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

    .project-tech span {
        font-size: 0.65rem;
        padding: 0.3rem 0.6rem;
    }

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

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

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

    section {
        padding: 40px 0;
    }

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