/* Tech Stack Page Specific Styles */

/* Light Mode Overrides */
.light-mode .tech-stack-page__tag {
    background: var(--border-color);
    color: var(--text-primary);
    border: 1px solid var(--text-muted);
}

.light-mode .tech-stack-page__tag:hover {
    background: var(--text-muted);
    border-color: var(--text-primary);
}

.light-mode .tech-stack-page__discord-btn {
    background: var(--accent-color);
    color: var(--bg-primary);
}

.light-mode .tech-stack-page__discord-btn:hover {
    background: var(--text-secondary);
}

/* Base Reset & Body */
.tech-stack-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.tech-stack-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary, #000000);
    color: var(--text-primary, #ffffff);
    line-height: 1.6;
    padding: clamp(1rem, 4vw, 3rem);
    min-height: 100vh;
}

.tech-stack-page .container {
    max-width: 1200px;
    margin: 0 auto;
    container-type: inline-size;
}

/* Header */
.tech-stack-page__header {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1rem);
    margin-bottom: clamp(2rem, 4vw, 3rem);
    flex-wrap: wrap;
}

.tech-stack-page__back-link {
    color: var(--text-primary, #ffffff);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--gap-sm, 0.5rem);
    font-size: var(--text-base, 1rem);
    padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.75rem, 2vw, 1rem);
    border-radius: var(--radius-sm, 8px);
    transition: all 0.2s;
    min-height: 44px;
}

.tech-stack-page__back-link:hover {
    color: var(--link-color, #ffffff);
    background: var(--bg-secondary, #111111);
}

.tech-stack-page__back-link:focus-visible {
    outline: 2px solid var(--link-color, #ffffff);
    outline-offset: 2px;
}

.tech-stack-page__title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    line-height: 1.2;
}

/* Tech Sections */
.tech-stack-page__section {
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
    container-type: inline-size;
}

.tech-stack-page__section-title {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    margin-bottom: clamp(0.75rem, 2vw, 1rem);
    line-height: 1.3;
}

.tech-stack-page__tags {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.375rem, 1.5vw, 0.5rem);
}

.tech-stack-page__tag {
    background: var(--border-color, #333333);
    color: var(--text-primary, #ffffff);
    padding: clamp(0.3rem, 1.5vw, 0.4rem) clamp(0.6rem, 2vw, 0.8rem);
    border-radius: clamp(12px, 2vw, 16px);
    font-size: clamp(0.8rem, 2vw, 0.85rem);
    border: 1px solid #555555;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    white-space: nowrap;
}

@media (hover: hover) {
    .tech-stack-page__tag:hover {
        background: #555555;
        border-color: var(--link-color, #ffffff);
        transform: scale(1.05);
    }
}

.tech-stack-page__tag:active {
    transform: scale(0.98);
}

/* Touch-friendly adjustments */
@media (pointer: coarse) {
    .tech-stack-page__tag {
        min-height: 44px;
        padding: clamp(0.4rem, 2vw, 0.5rem) clamp(0.8rem, 3vw, 1rem);
    }
}

/* Discord Section */
.tech-stack-page__discord {
    text-align: center;
    margin: clamp(2rem, 5vw, 3rem) 0;
    container-type: inline-size;
}

.tech-stack-page__discord-btn {
    background: #ffffff;
    color: #000000;
    padding: clamp(0.625rem, 2vw, 0.75rem) clamp(1.25rem, 3vw, 1.5rem);
    border-radius: var(--radius-sm, 8px);
    text-decoration: none;
    font-weight: 500;
    font-size: clamp(0.9rem, 2vw, 1rem);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap-sm, 0.5rem);
    transition: background 0.2s, transform 0.2s;
    min-height: 44px;
}

@media (hover: hover) {
    .tech-stack-page__discord-btn:hover {
        background: #cccccc;
        transform: translateY(-2px);
    }
}

.tech-stack-page__discord-btn:active {
    transform: scale(0.98);
}

.tech-stack-page__discord-btn:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Footer */
.tech-stack-page__footer {
    text-align: center;
    color: var(--text-muted, #888888);
    font-size: clamp(0.85rem, 2vw, 0.9rem);
    margin-top: clamp(2rem, 5vw, 3rem);
    padding-top: clamp(1.5rem, 3vw, 2rem);
    border-top: 1px solid var(--border-color, #333333);
    line-height: 1.6;
}

.tech-stack-page__footer-link {
    color: var(--link-color, #ffffff);
    text-decoration: none;
    margin: 0 clamp(0.5rem, 2vw, 1rem);
    padding: 0.25rem;
    transition: opacity 0.2s;
    display: inline-block;
}

.tech-stack-page__footer-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.tech-stack-page__footer-link:focus-visible {
    outline: 2px solid var(--link-color, #ffffff);
    outline-offset: 2px;
}

/* Responsive Breakpoints */

/* Extra Large Screens */
@media (min-width: 1280px) {
    .tech-stack-page__tags {
        gap: 0.75rem;
    }
}

/* Medium Screens (Tablets) */
@media (max-width: 1023px) and (min-width: 768px) {
    .tech-stack-page__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .tech-stack-page__tags {
        gap: 0.625rem;
    }
}

/* Small Screens (Large Phones) */
@media (max-width: 767px) and (min-width: 640px) {
    .tech-stack-page__header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .tech-stack-page__back-link {
        width: 100%;
        justify-content: center;
    }
}

/* Extra Small Screens (Phones) */
@media (max-width: 639px) {
    .tech-stack-page {
        padding: clamp(0.75rem, 3vw, 1.5rem);
    }

    .tech-stack-page__header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .tech-stack-page__back-link {
        width: 100%;
        justify-content: center;
    }

    .tech-stack-page__title {
        width: 100%;
    }

    .tech-stack-page__section-title {
        text-align: center;
    }

    .tech-stack-page__tags {
        justify-content: center;
    }
}

/* Micro Screens (Very Small Phones) */
@media (max-width: 480px) {
    .tech-stack-page__tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .tech-stack-page__tags {
        gap: 0.25rem;
    }

    .tech-stack-page__footer {
        font-size: 0.8rem;
    }
}

/* Container Queries for Tags Section */
@container (max-width: 400px) {
    .tech-stack-page__tags {
        gap: 0.25rem;
    }

    .tech-stack-page__tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    .tech-stack-page__footer {
        border-top-width: 0.5px;
    }
}

/* Print Styles */
@media print {
    .tech-stack-page__back-link,
    .tech-stack-page__discord {
        display: none;
    }

    .tech-stack-page {
        background: white;
        color: black;
    }

    .tech-stack-page__tag {
        border: 1px solid black;
        background: white;
        color: black;
    }
}