/* Responsive Design - Mobile First Approach */

/* Mobile Menu Toggle (Hidden by default) */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: var(--spacing-xs);
    background: none;
    border: none;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-normal);
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Large Screens (Desktop) */
@media (min-width: 1200px) {
    :root {
        --container-max-width: 1200px;
    }
    
    .hero-name {
        font-size: 6rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-slogan {
        font-size: 1.5rem;
    }
}

/* Medium Screens (Tablet Landscape) */
@media (max-width: 1024px) {
    :root {
        --section-padding: var(--spacing-2xl);
    }
    
    .nav-menu {
        gap: var(--spacing-lg);
    }
    
    .nav-link {
        font-size: var(--font-size-xs);
    }
    
    .hero-geometric-pattern::before {
        width: 250px;
        height: 250px;
    }
    
    .hero-geometric-pattern::after {
        width: 180px;
        height: 180px;
    }
    
    .about-content {
        grid-template-columns: 1fr 1.5fr;
        gap: var(--spacing-2xl);
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--spacing-xl);
    }
}

/* Small Screens (Tablet Portrait) */
@media (max-width: 768px) {
    :root {
        --font-size-5xl: 2.5rem;
        --font-size-4xl: 2rem;
        --font-size-3xl: 1.5rem;
        --section-padding: var(--spacing-2xl);
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* Navigation */
    .nav-container {
        padding: 0 var(--spacing-md);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(26, 26, 26, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        gap: 0;
        padding: var(--spacing-lg) 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
        border-top: 1px solid rgba(255, 102, 0, 0.1);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-item {
        width: 100%;
        text-align: center;
        padding: var(--spacing-sm) 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-item:last-child {
        border-bottom: none;
    }
    
    .nav-link {
        font-size: var(--font-size-base);
        padding: var(--spacing-sm) var(--spacing-lg);
        display: block;
        width: 100%;
    }
    
    .logo-text {
        font-size: var(--font-size-lg);
    }
    
    .logo-icon {
        width: 28px;
        height: 28px;
    }
    
    .logo-icon::before {
        width: 18px;
        height: 18px;
    }
    
    .logo-icon::after {
        width: 10px;
    }
    
    /* Hero Section */
    .hero {
        padding: 0 var(--spacing-md);
    }
    
    .hero-content {
        padding: 0;
    }
    
    .hero-name {
        font-size: clamp(2.5rem, 10vw, 4rem);
        letter-spacing: 2px;
    }
    
    .hero-title {
        font-size: clamp(1.25rem, 5vw, 2rem);
        letter-spacing: 1px;
    }
    
    .hero-slogan {
        font-size: clamp(0.9rem, 3vw, 1.1rem);
        margin-bottom: var(--spacing-xl);
    }
    
    .hero-cta {
        padding: var(--spacing-sm) var(--spacing-xl);
        font-size: var(--font-size-base);
    }
    
    .hero-geometric-pattern::before {
        width: 200px;
        height: 200px;
        top: 10%;
        right: 5%;
    }
    
    .hero-geometric-pattern::after {
        width: 150px;
        height: 150px;
        bottom: 10%;
        left: 5%;
    }
    
    .scroll-indicator {
        bottom: var(--spacing-xl);
    }
    
    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
        text-align: center;
    }
    
    .about-image {
        justify-content: center;
        padding-top: 0;
    }
    
    .avatar {
        max-width: 280px;
    }
    
    .about-image::before {
        max-width: 280px;
    }
    
    .about-text {
        padding-top: 0;
    }
    
    .about-description {
        text-align: left;
    }
    
    .about-info {
        align-items: flex-start;
    }
    
    .about-text::before,
    .about-text::after {
        display: none;
    }
    
    /* Experience Tabs */
    .tab-buttons {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-md);
    }
    
    .tab-button {
        width: 200px;
        text-align: center;
    }
    
    .tab-panel {
        padding: var(--spacing-xl);
        clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
    }
    
    .tab-title {
        font-size: var(--font-size-xl);
    }
    
    .tab-subtitle {
        font-size: var(--font-size-base);
    }
    
    .section-subtitle {
        font-size: var(--font-size-lg);
    }
    
    /* Skills Section */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .skill-category {
        padding: var(--spacing-lg);
        clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    }
    
    .category-header {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .category-title {
        font-size: var(--font-size-lg);
    }
    
    /* Contact Section */
    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-xl);
    }
    
    .contact-item {
        width: 100%;
        max-width: 300px;
        justify-content: center;
        padding: var(--spacing-lg) var(--spacing-xl);
        clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
    }
    
    .contact-intro {
        font-size: var(--font-size-base);
        margin-bottom: var(--spacing-xl);
    }
    
    .contact-text {
        font-size: var(--font-size-base);
    }
    
    .back-to-top {
        bottom: var(--spacing-lg);
        right: var(--spacing-lg);
        width: 45px;
        height: 45px;
    }
    
    .footer {
        padding: var(--spacing-xl) 0;
    }
    
    .footer-text {
        font-size: var(--font-size-sm);
    }
}

/* Extra Small Screens (Mobile) */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Hero Section */
    .hero-geometric-pattern::before,
    .hero-geometric-pattern::after {
        display: none;
    }
    
    .hero-cta {
        clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 10px 100%);
    }
    
    /* About Section */
    .avatar {
        max-width: 250px;
    }
    
    .about-image::before {
        max-width: 250px;
    }
    
    .about-subtitle {
        font-size: var(--font-size-xl);
    }
    
    .about-description {
        font-size: var(--font-size-base);
    }
    
    .info-item {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }
    
    /* Experience Tabs */
    .tab-button {
        width: 180px;
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: var(--font-size-sm);
    }
    
    .tab-panel {
        padding: var(--spacing-lg);
    }
    
    .content-list li {
        padding-left: var(--spacing-md);
        font-size: var(--font-size-sm);
    }
    
    /* Skills Section */
    .skill-category {
        padding: var(--spacing-md);
    }
    
    .category-title {
        font-size: var(--font-size-base);
    }
    
    .skill-list li {
        font-size: var(--font-size-sm);
        padding-left: var(--spacing-md);
    }
    
    /* Contact Section */
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
        padding: var(--spacing-md) var(--spacing-lg);
    }
    
    .contact-text {
        font-size: var(--font-size-sm);
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: var(--spacing-md);
        right: var(--spacing-md);
    }
    
    .back-to-top-icon {
        width: 16px;
        height: 16px;
    }
    
    .back-to-top-icon::before {
        width: 10px;
        height: 10px;
    }
    
    .back-to-top-icon::after {
        height: 12px;
    }
}

/* Landscape Orientation for Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        height: 100vh;
        min-height: 500px;
    }
    
    .hero-name {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    .hero-title {
        font-size: clamp(1rem, 4vw, 1.5rem);
    }
    
    .hero-slogan {
        font-size: clamp(0.8rem, 2.5vw, 1rem);
        margin-bottom: var(--spacing-lg);
    }
    
    .scroll-indicator {
        bottom: var(--spacing-md);
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-geometric-pattern {
        background-size: 100px 100px, 75px 75px;
    }
    
    body::before {
        background-size: 30px 30px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .back-to-top,
    .scroll-indicator {
        display: none !important;
    }
    
    .hero {
        height: auto;
        padding: var(--spacing-lg) 0;
    }
    
    .hero-geometric-pattern,
    .hero-background {
        display: none;
    }
    
    .section-title {
        color: #000;
        page-break-after: avoid;
    }
    
    .tab-panel {
        background: none;
        border: 1px solid #000;
        clip-path: none;
        page-break-inside: avoid;
    }
    
    .skill-category {
        background: none;
        border: 1px solid #000;
        clip-path: none;
        page-break-inside: avoid;
    }
    
    .contact-item {
        background: none;
        border: 1px solid #000;
        clip-path: none;
        color: #000;
    }
    
    body::before {
        display: none;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-geometric-pattern::before,
    .hero-geometric-pattern::after {
        animation: none;
    }
    
    .scroll-arrow {
        animation: none;
    }
}

/* Dark Mode Support (if system preference changes) */
@media (prefers-color-scheme: light) {
    /* Keep dark mode as default for this design */
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --accent-orange: #ff8800;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --border-color: #666666;
    }
    
    .nav-link,
    .contact-item,
    .skill-category,
    .tab-panel {
        border-width: 2px;
    }
} 