/* ==================== Mobile (< 768px) ==================== */
@media (max-width: 767px) {
    /* Navbar */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: var(--spacing-lg) 0;
        gap: 0;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        padding: var(--spacing-md) 0;
        border-bottom: 1px solid var(--border-color);
    }

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

    .nav-link::after {
        display: none;
    }

    .nav-item.active .nav-link {
        color: var(--primary-color);
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    /* Hero Section */
    .hero {
        margin-top: 60px;
        min-height: calc(100vh - 60px);
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-description {
        font-size: 16px;
    }

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

    .btn {
        min-width: 100%;
    }

    /* Overview Cards */
    .overview-grid {
        grid-template-columns: 1fr;
    }

    /* Featured Projects */
    .projects-preview {
        grid-template-columns: 1fr;
    }

    /* CTA Buttons */
    .cta-buttons {
        flex-direction: column;
    }

    .cta .btn {
        width: 100%;
    }

    /* Contact Info */
    .contact-info {
        grid-template-columns: 1fr;
    }

    /* CV Grid */
    .cv-grid {
        grid-template-columns: 1fr;
    }

    .cv-section.full-width {
        grid-column: 1;
    }

    /* Skills Grid */
    .skills-grid {
        grid-template-columns: 1fr;
    }

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

    /* Page Header */
    .page-header {
        margin-top: 60px;
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .page-header h1 {
        font-size: 28px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* ==================== Tablet (768px - 1024px) ==================== */
@media (max-width: 1024px) and (min-width: 768px) {
    /* Navbar */
    .nav-menu {
        gap: var(--spacing-md);
    }

    /* Hero Section */
    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 20px;
    }

    /* Overview Cards */
    .overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .overview-card:last-child {
        grid-column: 1 / 2;
    }

    /* Featured Projects */
    .projects-preview {
        grid-template-columns: repeat(2, 1fr);
    }

    /* CV Grid */
    .cv-grid {
        grid-template-columns: 1fr;
    }

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

    /* Projects Grid */
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== Large Screens (> 1024px) ==================== */
@media (min-width: 1025px) {
    .nav-menu {
        gap: var(--spacing-xl);
    }
}

/* ==================== Mobile (< 768px) - About Detail Content ==================== */
@media (max-width: 767px) {
    /* About Detail Content */
    .about-detail-content {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .page-header p {
        font-size: 16px;
    }

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

    /* CV Header */
    .cv-header {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .cv-contact {
        text-align: left;
        justify-content: flex-start;
    }

    .cv-contact p {
        justify-content: flex-start;
    }

    .cv-experience-header {
        flex-direction: column;
    }

    .cv-date {
        margin-top: var(--spacing-xs);
        display: inline-block;
    }

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


/* ==================== Print Styles ==================== */
@media print {
    .header,
    .footer,
    .cta,
    .featured-projects,
    .hero-buttons,
    .cta-buttons {
        display: none;
    }

    body {
        background-color: white;
    }

    .container {
        max-width: 100%;
    }

    .page-content {
        min-height: auto;
    }
}

/* ==================== Accessibility ==================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-color-scheme: dark) {
    /* Optional: Add dark mode styles here if needed */
    body {
        background-color: var(--text-dark);
        color: var(--white);
    }
}
