html {
    font-size: clamp(14px, 1vw + 0.5rem, 18px);
}

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

body {
    background: #0a0a0a;
    color: #00ff00;
    font-family: 'Courier New', Courier, monospace;
    min-height: 100vh;
    padding: clamp(1rem, 3vw, 2rem);
    line-height: 1.6;
    position: relative;
}

#neural-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.4;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/img/header.jpg') center center / cover no-repeat;
    opacity: 0.08;
    z-index: -1;
    mix-blend-mode: overlay;
}

.terminal {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    background: rgba(10, 10, 10, 0.85);
    padding: clamp(1rem, 3vw, 2rem);
    border: 1px solid #222;
    box-shadow: 0 0 40px rgba(0, 100, 255, 0.1);
}

.prompt {
    color: #00ff00;
}

.prompt::before {
    content: '$ ';
    color: #888;
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background: #00ff00;
    animation: blink 1s infinite;
    vertical-align: text-bottom;
    box-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00;
}

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

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

h1 {
    font-size: clamp(1.2rem, 2vw + 0.5rem, 1.5rem);
    font-weight: normal;
    color: #00ff00;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00, 0 0 30px #00ff00;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { text-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00, 0 0 30px #00ff00; }
    50% { text-shadow: 0 0 5px #00ff00, 0 0 10px #00ff00, 0 0 15px #00ff00; }
}

.tagline {
    color: #888;
    font-size: 0.9rem;
}

.section {
    margin-bottom: 2rem;
}

.section-title {
    color: #ff9900;
    margin-bottom: 1rem;
    font-size: 1rem;
    position: relative;
    display: inline-block;
    text-shadow: 0 0 5px #ff9900;
}

.section-title:hover {
    animation: glitch 0.3s ease-in-out infinite;
}

@keyframes glitch {
    0% { transform: translate(0); text-shadow: 0 0 5px #ff9900; }
    20% { transform: translate(-2px, 2px); text-shadow: -2px 0 #00ffff, 2px 0 #ff00ff; }
    40% { transform: translate(2px, -2px); text-shadow: 2px 0 #00ffff, -2px 0 #ff00ff; }
    60% { transform: translate(-1px, 1px); text-shadow: -1px 0 #00ffff, 1px 0 #ff00ff; }
    80% { transform: translate(1px, -1px); text-shadow: 1px 0 #00ffff, -1px 0 #ff00ff; }
    100% { transform: translate(0); text-shadow: 0 0 5px #ff9900; }
}

.section-title::before {
    content: '## ';
    color: #666;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.5rem;
}

.skill-category {
    border: 1px solid #333;
    padding: 1rem;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
}

.skill-category:hover {
    border-color: #00ccff;
    box-shadow: 0 0 15px rgba(0, 204, 255, 0.3), inset 0 0 15px rgba(0, 204, 255, 0.05);
    transform: translateY(-3px);
}

.skill-category h3 {
    color: #00ccff;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: normal;
    transition: text-shadow 0.3s ease;
}

.skill-category:hover h3 {
    text-shadow: 0 0 10px #00ccff;
}

/* Skill text styling for encrypt/decrypt effect */
.skill-category p {
    color: #999;
    font-size: 0.85rem;
    overflow-wrap: break-word;
    word-wrap: break-word;
    font-family: 'Courier New', Courier, monospace;
}

.skill-category p .char {
    display: inline-block;
    transition: color 0.1s ease;
}

.skill-category p .char.encrypted {
    color: #00ffaa;
    text-shadow: 0 0 5px #00ffaa;
}

.links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.links a {
    color: #00ff00;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.links a:hover {
    color: #00ccff;
    text-shadow: 0 0 10px #00ccff, 0 0 20px #00ccff;
}

.links a::before {
    content: '[ ';
    color: #666;
    transition: color 0.3s ease;
}

.links a::after {
    content: ' ]';
    color: #666;
    transition: color 0.3s ease;
}

.links a:hover::before,
.links a:hover::after {
    color: #00ccff;
}

footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
    color: #666;
    font-size: 0.8rem;
}

.site-nav {
    margin-top: 2rem;
    padding: 1rem 0;
    border-top: 1px solid #333;
}

.site-nav-title {
    color: #666;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.site-nav-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.site-nav-links a {
    color: #00ccff;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s, text-shadow 0.2s;
}

.site-nav-links a:hover {
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
}

.site-nav-links a.current {
    color: #ff9900;
    cursor: default;
}

.site-nav-links a.current:hover {
    text-shadow: none;
}

@media (max-width: 600px) {
    body {
        padding: 1rem;
    }

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

    .links {
        flex-direction: column;
        gap: 1rem;
    }
}

.hp {
    position: absolute;
    left: -9999px;
    font-size: 0;
    color: transparent;
}

/* Header typing: three lines, simplified */
.type-line { display: inline-block; overflow: hidden; white-space: nowrap; width: 0; }
.t1 { animation: type1 0.6s steps(8, end) 0.2s forwards; }
.t2 { animation: type2 0.9s steps(15, end) 0.9s forwards; }
.t3 { animation: type3 1.4s steps(40, end) 1.9s forwards; }
@keyframes type1 { to { width: 8ch; } }
@keyframes type2 { to { width: 15ch; } }
@keyframes type3 { to { width: 42ch; } }

/* Projects */
.project { border: 1px solid #333; background: rgba(0,0,0,0.3); padding: 1rem; margin-bottom: 1rem; transition: border-color 0.3s, box-shadow 0.3s; }
.project:hover { border-color: #00ccff; box-shadow: 0 0 15px rgba(0,204,255,0.3); }
.project h3 { color: #00ccff; font-weight: normal; font-size: 0.95rem; margin-bottom: 0.35rem; }
.project p { color: #999; font-size: 0.85rem; }
.project .status { color: #ff9900; font-size: 0.7rem; letter-spacing: 0.08em; }
.project a { color: #00ff00; text-decoration: none; }
.project a:hover { color: #00ccff; text-shadow: 0 0 10px #00ccff; }

/* Footer teaser */
#track-teaser { color: #333; font-size: 0.7rem; margin-top: 0.5rem; }

/* About */
.about-text { color: #999; font-size: 0.9rem; max-width: 60ch; }

/* Vault */
.gate-input-wide { background:#000; border:1px solid #0f0; color:#0f0; font-family:'Courier New',monospace; font-size:0.9rem; padding:0.6rem 1rem; width:min(100%,34rem); }
.gate-btn { background:transparent; border:1px solid #0f0; color:#0f0; font-family:'Courier New',monospace; padding:0.6rem 1.5rem; cursor:pointer; text-transform:uppercase; letter-spacing:0.1em; }
.gate-btn:hover { background:#0f0; color:#000; }
#vault-status { color:#f44; min-height:1.2rem; margin:0.75rem 0; }
#vault-content { border-top:1px solid #333; margin-top:1rem; padding-top:1rem; color:#ccc; }
#vault-content h2, #vault-content h3 { color:#0f0; font-weight:normal; }
