/* ==================== RESPONSIVE DESIGN ==================== */

/* Tablets (768px and up) */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 2.5rem;
        --spacing-2xl: 3rem;
    }

    .section-title {
        font-size: 2rem;
        gap: 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .hero-tagline {
        font-size: 1.25rem;
    }

    .hero-image {
        order: -1;
    }

    .profile-avatar {
        width: 250px;
        height: 250px;
    }

    .hero-cta {
        flex-wrap: wrap;
    }

    .projects-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

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

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

    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile (480px and down) */
@media (max-width: 480px) {
    :root {
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
        --spacing-2xl: 2.5rem;
    }

    .container {
        padding: 0 1rem;
    }

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

    .title-line {
        display: none;
    }

    /* NAVBAR */
    .nav-container {
        padding: 0.75rem 1rem;
        display: flex !important;
        justify-content: space-between;
        align-items: center;
    }

    .nav-logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1000;
    }

    .nav-logo a {
        font-size: 1rem;
    }

    .nav-toggle {
        display: flex !important;
        position: relative;
        z-index: 1001;
        gap: 5px;
        order: 1;
    }

    .nav-toggle span {
        width: 25px;
        height: 2px;
        background-color: var(--text-light);
        transition: all 0.3s ease;
        border-radius: 2px;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translateY(12px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translateY(-10px);
    }

    .nav-menu {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        background-color: var(--bg-light) !important;
        flex-direction: column !important;
        gap: 0 !important;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
        z-index: 999 !important;
        width: 100% !important;
    }

    .nav-menu.active {
        display: flex !important;
    }

    .nav-menu a {
        padding: 1rem !important;
        border-bottom: 1px solid var(--border-light) !important;
        color: var(--text-light) !important;
    }

    .nav-controls {
        display: flex !important;
        gap: 0.35rem !important;
        order: 2;
    }

    .theme-toggle {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }

    .lang-btn {
        width: 26px;
        height: 26px;
        font-size: 0.6rem;
    }

    .language-selector {
        gap: 0.2rem;
    }

    /* HERO */
    .hero {
        min-height: 100vh;
        padding: 60px 1rem 40px;
        flex-direction: column;
    }

    .hero-content {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .hero-text {
        order: 2;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .hero-image {
        order: 1;
    }

    .hero-greeting {
        font-size: 0.95rem;
    }

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

    .hero-tagline {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .hero-email {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .profile-avatar {
        width: 180px;
        height: 180px;
        max-width: 100%;
    }

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

    .btn {
        width: 100%;
        justify-content: center;
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }

    .scroll-indicator {
        bottom: 20px;
    }

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

    .about-text {
        order: 2;
    }

    .about-image {
        order: 1;
    }

    .about-image img {
        width: 100%;
        max-width: 280px;
    }

    .about-description p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    .subsection-title {
        font-size: 1.25rem;
    }

    .summary-card {
        padding: 1rem;
    }

    .summary-card h3 {
        font-size: 1.1rem;
    }

    /* TIMELINE / ACCORDION */
    .timeline {
        padding-left: 0;
    }

    .timeline::before {
        display: none;
    }

    .timeline-dot {
        left: -20px;
        width: 6px;
        height: 6px;
    }

    .timeline-content {
        padding: 1rem;
    }

    .company-name {
        font-size: 1rem;
    }

    .company-period {
        font-size: 0.8rem;
    }

    .nested-roles {
        padding-left: 0.5rem;
    }

    .nested-roles::before {
        left: -2px;
    }

    .nested-dot {
        left: -6px;
        width: 5px;
        height: 5px;
    }

    .nested-content h5 {
        font-size: 0.95rem;
    }

    .role-date {
        font-size: 0.75rem;
    }

    .experience-details li {
        font-size: 0.9rem;
    }

    /* SKILLS */
    .skill-badges {
        gap: 0.5rem;
    }

    .skill-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

    /* STATS */
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem 0.75rem;
    }

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

    .stat-label {
        font-size: 0.85rem;
    }

    /* PROJECTS */
    .projects-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .project-header {
        padding: 1.25rem;
    }

    .project-card h3 {
        font-size: 1.2rem;
    }

    .project-description {
        font-size: 0.95rem;
    }

    .project-details {
        padding: 1rem;
    }

    .project-details li {
        font-size: 0.95rem;
        padding-left: 1.2rem;
    }

    .project-footer {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    /* CONTACT */
    .contact {
        padding: 3rem 1rem;
    }

    .contact-content {
        gap: 2rem;
    }

    .contact-intro {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .contact-email {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .social-links {
        gap: 0.75rem;
        justify-content: center;
        margin-bottom: 1.5rem;
    }

    .social-link {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }

    .contact-form {
        gap: 1rem;
        padding: 1.5rem;
    }

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

    .form-group textarea {
        min-height: 100px;
    }

    /* FOOTER */
    .footer {
        padding: 1.5rem 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .footer p {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }

    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }
}

/* Very Small Mobile (under 350px) */
@media (max-width: 350px) {
    .hero-title {
        font-size: 1.75rem;
    }

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

    .hero-cta {
        flex-direction: column;
    }

    .profile-avatar {
        width: 160px;
        height: 160px;
    }

    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }

    .stat-card {
        padding: 1.25rem 0.5rem;
    }

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

/* Landscape orientation adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 40px var(--spacing-md) 30px;
    }

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

    .scroll-indicator {
        display: none;
    }
}
