/* Mobile First Design - Base styles */
.container {
    width: 100%;
    padding: 0 20px;
    margin: 0 auto;
    box-sizing: border-box;
}

.hero {
    min-height: auto;
    padding: 80px 0 40px;
    margin-top: 50px;
}

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

.hero-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-4);
}

.hero-image {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

.hero-text-container {
    width: 100%;
    padding: 0 15px;
}

.hero-subtitle, 
.hero-title {
    text-align: left;
    padding-left: var(--spacing-4);
}

/* Small devices (phones, 576px and up) */
@media (min-width: 576px) {
    :root {
        --fs-5xl: 4.5rem;
    }
    
    .hero-content {
        padding: 0 var(--spacing-4);
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .hero {
        padding: 60px 0 30px;
        margin-top: 50px;
    }

    .hero-content {
        padding-top: 20px;
    }

    .container {
        padding: 0 var(--spacing-8);
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-row {
        flex-direction: row;
        gap: var(--spacing-8);
        align-items: center;
        text-align: left;
    }

    .hero-subtitle,
    .hero-title {
        text-align: left;
        padding-left: var(--spacing-4);
    }


    .hero-text-container {
        padding: 0;
    }
    
    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container {
        padding: 0 var(--spacing-12);
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .resource-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-image {
        max-width: 320px;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
        padding: 0;
    }
    
    .hero-content {
        margin-left: var(--spacing-8);
    }
}

/* Mobile navigation handling */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero-subtitle,
    .hero-title {
        text-align: left;
        padding-left: var(--spacing-4);
    }


    .hero-description {
        text-align: center;
        margin: var(--spacing-4) 0;
    }

    .tagline {
        text-align: center;
        margin-bottom: var(--spacing-4);
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .progress-container {
        flex-direction: column;
    }
    
    .section-title {
        font-size: var(--fs-xl);
    }
    
    section {
        padding: var(--spacing-8) 0;
    }

    .btn.primary-btn {
        display: inline-block;
        width: auto;
        min-width: 200px;
    }
}

/* Very small devices (small phones, 375px and below) */
@media (max-width: 375px) {
    .container {
        padding: 0 15px;
    }

    /* .hero {
        padding: 50px 0;
    } */

    .hero {
        padding: 60px 0 30px;
        margin-top: 50px;
    }

    .hero-title {
        font-size: var(--fs-2xl);
    }
    
    .hero-subtitle {
        font-size: var(--fs-base);
    }
    
    .hero-description {
        font-size: var(--fs-base);
        padding: 0 10px;
    }
    
    .tagline {
        font-size: var(--fs-base);
    }
    
    .specialization-bubbles {
        gap: var(--spacing-2);
    }
    
    .specialization-bubble {
        font-size: var(--fs-xs);
        padding: var(--spacing-1) var(--spacing-2);
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .terminal-body {
        min-height: 200px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-line {
        margin-top: var(--spacing-2);
        width: 100%;
    }
    
    .card {
        padding: var(--spacing-4);
    }

    .btn.primary-btn {
        width: 100%;
        min-width: unset;
    }
}

/* Print styles */
@media print {
    body {
        background-color: white;
        color: black;
    }
    
    header, nav, .mobile-menu-toggle, footer, 
    .terminal-window, #terminal {
        display: none;
    }
    
    section {
        padding: 1rem 0;
        page-break-inside: avoid;
    }
    
    .card, .grid, .skills-grid {
        page-break-inside: avoid;
    }
    
    .card {
        border: 1px solid #ccc;
        box-shadow: none;
    }
    
    .hero {
        min-height: auto;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .highlight {
        color: black;
        font-weight: bold;
    }
}

/* Dark mode detection */
@media (prefers-color-scheme: light) {
    /* In case user's system is set to light mode, we still keep dark theme 
       as it's part of the cybersecurity aesthetic, but we could lighten some elements here */
    
    .card {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    
    .terminal-window {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    }
}