/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

:root {
    --primary-color: #00ff00;
    --secondary-color: #00aa00;
    --background-color: #0a0a0a;
    --container-color: rgba(20, 20, 20, 0.8);
    --text-color: #c0c0c0;
    --header-color: #ffffff;
    --highlight-color: #00ff00;
    --border-color: #333333;
    --glow-color: rgba(0, 255, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Share Tech Mono', monospace;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-size: 14px;
    overflow-x: hidden;
    position: relative;
    background-image:
        radial-gradient(rgba(0, 80, 0, 0.08) 2px, transparent 2px),
        radial-gradient(rgba(0, 80, 0, 0.12) 2px, transparent 2px);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
}

/* Far-back glitch camo block layer */
body::before {
    content: '';
    position: fixed;
    inset: -40px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.22;
    background-color: transparent;
    background-image:
        linear-gradient(90deg, rgba(0, 70, 0, 0.07) 50%, transparent 50%),
        linear-gradient(0deg,  rgba(0, 70, 0, 0.07) 50%, transparent 50%),
        linear-gradient(90deg, rgba(0, 50, 0, 0.06) 50%, transparent 50%),
        linear-gradient(0deg,  rgba(0, 50, 0, 0.06) 50%, transparent 50%),
        linear-gradient(90deg, rgba(0, 110, 30, 0.05) 50%, transparent 50%),
        linear-gradient(0deg,  rgba(0, 110, 30, 0.05) 50%, transparent 50%);
    background-size:
        140px 140px,
        140px 140px,
        80px 80px,
        80px 80px,
        36px 36px,
        36px 36px;
    background-position:
        0 0,
        0 0,
        23px 47px,
        61px 19px,
        7px 13px,
        29px 31px;
    filter: blur(0.4px);
    animation: camoGlitch 11s steps(1) infinite;
}

@keyframes camoGlitch {
    0%, 22%, 24%, 56%, 58%, 81%, 83%, 100% {
        transform: translate(0, 0);
        filter: blur(0.4px);
    }
    23%  { transform: translate(2px, -1px); filter: blur(0.4px) hue-rotate(8deg); }
    57%  { transform: translate(-2px, 1px); filter: blur(0.4px); }
    82%  { transform: translate(1px, 2px);  filter: blur(0.4px) hue-rotate(-6deg); }
}

/* CRT and Scanline Effects */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0, 0, 0, 0.1) 50%
    );
    background-size: 100% 4px;
    z-index: 999;
    pointer-events: none;
    opacity: 0.3;
}

.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(
            circle at center,
            transparent 30%,
            rgba(0, 0, 0, 0.3) 90%
        );
    pointer-events: none;
    z-index: 998;
}

.container {
    background-color: var(--container-color);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    padding: 20px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7),
                0 0 30px var(--glow-color);
    position: relative;
    z-index: 1;
    animation: powerOn 1s ease-in-out;
    backdrop-filter: blur(3px);
    margin-top: 2vh;
    margin-bottom: 2vh;
}

@keyframes powerOn {
    0% {
        opacity: 0;
        transform: scale(0.98);
    }
    20% {
        opacity: 0.5;
    }
    40% {
        opacity: 0.2;
    }
    60% {
        opacity: 0.8;
    }
    80% {
        opacity: 0.4;
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Header Styles */
header {
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.logo-container {
    text-align: center;
    margin-bottom: 10px;
}

.logo-text {
    font-size: 2.5em;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--glow-color);
    letter-spacing: 2px;
    font-weight: bold;
}

.access-text {
    font-size: 1.2em;
    color: var(--text-color);
    letter-spacing: 3px;
}

.terminal-line {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.terminal-prompt {
    color: var(--primary-color);
    margin-right: 8px;
    font-weight: bold;
}

.terminal-text {
    color: var(--text-color);
}

.terminal-cursor {
    color: var(--primary-color);
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Links Section */
.links-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 0.85em;
    color: var(--secondary-color);
    letter-spacing: 3px;
    opacity: 0.8;
}

/* Featured Projects Section */
.featured-section {
    margin-bottom: 25px;
    max-height: 2000px;
    opacity: 1;
    overflow: hidden;
    position: relative;
    transition: max-height 1.6s cubic-bezier(0.19, 1, 0.22, 1),
                opacity 1.1s ease-out,
                margin-bottom 1.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.featured-section.collapsed {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
}

/* Section header glitches in */
.featured-section .section-header {
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.4s ease-out, transform 0.5s ease-out;
}

.featured-section:not(.collapsed) .section-header {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.1s;
}

.featured-section .featured-card {
    transform: translateY(14px) scale(0.985);
    opacity: 0;
    filter: blur(2px);
    transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.7s ease-out,
                filter 0.6s ease-out;
}

.featured-section:not(.collapsed) .featured-card {
    transform: translateY(0) scale(1);
    opacity: 1;
    filter: blur(0);
}

.featured-section:not(.collapsed) .featured-card:nth-child(1) { transition-delay: 0.35s; }
.featured-section:not(.collapsed) .featured-card:nth-child(2) { transition-delay: 0.55s; }
.featured-section:not(.collapsed) .featured-card:nth-child(3) { transition-delay: 0.75s; }
.featured-section:not(.collapsed) .featured-card:nth-child(4) { transition-delay: 0.95s; }

/* Left accent bar pulses brighter as each card lands */
.featured-section:not(.collapsed) .featured-card::before {
    animation: accentPulse 1.2s ease-out;
}

@keyframes accentPulse {
    0%   { opacity: 0; box-shadow: 0 0 0 rgba(0, 255, 0, 0); }
    40%  { opacity: 1; box-shadow: 0 0 10px rgba(0, 255, 0, 0.6); }
    100% { opacity: 0.4; box-shadow: 0 0 0 rgba(0, 255, 0, 0); }
}

.featured-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.featured-card {
    background-color: rgba(0, 40, 0, 0.15);
    border: 1px solid rgba(0, 255, 0, 0.15);
    border-radius: 3px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--primary-color);
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.featured-card:hover {
    background-color: rgba(0, 60, 0, 0.25);
    border-color: rgba(0, 255, 0, 0.3);
    box-shadow: 0 0 12px rgba(0, 255, 0, 0.15);
}

.featured-card:hover::before {
    opacity: 1;
}

.featured-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px;
}

.featured-name {
    font-size: 1.05em;
    font-weight: bold;
    color: var(--header-color);
    letter-spacing: 1px;
}

.featured-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.featured-badge {
    font-size: 0.7em;
    padding: 2px 8px;
    border-radius: 2px;
    letter-spacing: 1px;
    white-space: nowrap;
}

.badge-lang {
    background-color: rgba(0, 255, 0, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(0, 255, 0, 0.2);
}

.badge-downloads {
    background-color: rgba(255, 180, 0, 0.1);
    color: #ffb400;
    border: 1px solid rgba(255, 180, 0, 0.25);
}

.featured-desc {
    font-size: 0.82em;
    color: var(--text-color);
    opacity: 0.85;
    line-height: 1.5;
    margin-bottom: 10px;
}

.featured-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.featured-tag {
    font-size: 0.65em;
    padding: 2px 6px;
    background-color: rgba(100, 100, 100, 0.2);
    border: 1px solid rgba(100, 100, 100, 0.3);
    border-radius: 2px;
    color: var(--text-color);
    opacity: 0.7;
    letter-spacing: 0.5px;
}

/* Stat Badge (inline on link items) */
.stat-badge {
    font-size: 0.65em;
    padding: 3px 8px;
    background-color: rgba(0, 255, 0, 0.08);
    border: 1px solid rgba(0, 255, 0, 0.2);
    border-radius: 2px;
    color: var(--primary-color);
    letter-spacing: 1px;
    white-space: nowrap;
    margin-left: auto;
    flex-shrink: 0;
}

.link-item {
    background-color: rgba(40, 40, 40, 0.7);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 3px;
    padding: 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.link-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(0, 255, 0, 0) 0%,
        rgba(0, 255, 0, 0.05) 50%,
        rgba(0, 255, 0, 0) 100%);
    opacity: 0;
    transition: all 0.3s ease;
}

.link-item:hover {
    transform: translateX(5px);
    background-color: rgba(50, 50, 50, 0.8);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.link-item:hover::before {
    opacity: 1;
    animation: scanEffect 2s infinite;
}

@keyframes scanEffect {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.link-icon {
    width: 35px;
    height: 35px;
    margin-right: 15px;
    color: var(--primary-color);
    filter: drop-shadow(0 0 3px var(--glow-color));
    transition: all 0.3s ease;
}

.link-item:hover .link-icon {
    transform: scale(1.1);
}

.link-text {
    flex: 1;
}

.link-text h2 {
    font-size: 1.2em;
    margin: 0 0 5px 0;
    color: var(--header-color);
    letter-spacing: 1px;
}

.tagline {
    font-size: 0.85em;
    color: var(--text-color);
    opacity: 0.8;
}

/* Footer */
footer {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9em;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.status-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.status-label {
    color: var(--text-color);
}

.status-value {
    color: var(--primary-color);
    font-weight: bold;
}

.copyright {
    text-align: center;
    color: var(--text-color);
    opacity: 0.7;
    margin-top: 5px;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .container {
        width: 95%;
        padding: 15px;
    }
    
    .logo-text {
        font-size: 2em;
    }
    
    .link-item {
        padding: 12px;
    }
    
    .link-icon {
        width: 30px;
        height: 30px;
        margin-right: 10px;
    }
    
    .link-text h2 {
        font-size: 1em;
    }
    
    .featured-card {
        padding: 12px;
    }
    
    .featured-name {
        font-size: 0.95em;
    }
    
    .featured-desc {
        font-size: 0.78em;
    }
    
    .stat-badge {
        font-size: 0.6em;
        padding: 2px 6px;
    }
}