:root {
    --primary: #e63946;
    --primary-glow: rgba(230, 57, 70, 0.6);
    --dark: #050505;
    --dark-accent: #0f0f0f;
    --light: #f1faee;
    --gray: #a8dadc;
    --text-dim: #888;
    --glass-bg: rgba(20, 20, 20, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 100px 0; z-index: 10; position: relative; }
.bg-dark { background-color: var(--dark-accent); }

header {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
}

nav { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 800; text-transform: uppercase; letter-spacing: -1px; }
.logo span { color: var(--primary); text-shadow: 0 0 10px var(--primary-glow); }
nav ul { display: flex; list-style: none; gap: 2rem; }
nav a { color: var(--light); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: 0.3s; }
nav a:hover { color: var(--primary); text-shadow: 0 0 8px var(--primary-glow); }

/* --- GLASSMORPHISM & CLOUD BACKGROUND --- */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.background-cloud {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(230,57,70,0.08) 0%, rgba(0,0,0,0) 40%),
                radial-gradient(circle at 80% 20%, rgba(230,57,70,0.05) 0%, rgba(0,0,0,0) 30%);
    animation: drift 20s infinite alternate linear;
    z-index: 0;
    pointer-events: none;
}

@keyframes drift {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-5%, 5%) rotate(5deg); }
}

/* --- HERO SECTION --- */
#hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 10;
}

.hero-content {
    max-width: 600px;
}

.badge {
    background: rgba(230, 57, 70, 0.15);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(230, 57, 70, 0.3);
}

h1 { font-size: 3.5rem; line-height: 1.1; font-weight: 800; margin-bottom: 1.5rem; }
.glow-text { color: var(--primary); text-shadow: 0 0 20px var(--primary-glow); display: block; }
#hero p { font-size: 1.15rem; color: var(--text-dim); margin-bottom: 2.5rem; }

.btn-primary { background: var(--primary); color: white; padding: 1rem 2rem; border-radius: 6px; text-decoration: none; font-weight: 600; margin-right: 1rem; transition: 0.3s; box-shadow: 0 0 15px rgba(230,57,70,0.4); }
.btn-primary:hover { background: #ff4d5a; box-shadow: 0 0 25px rgba(230,57,70,0.6); }
.btn-secondary { border: 1px solid rgba(255,255,255,0.2); color: white; padding: 1rem 2rem; border-radius: 6px; text-decoration: none; font-weight: 600; transition: 0.3s; }
.btn-secondary:hover { background: rgba(255,255,255,0.05); }
.btn-sm { background: var(--primary); color: white; padding: 0.5rem 1rem; border-radius: 4px; text-decoration: none; font-size: 0.8rem; font-weight: 600; }

/* --- TERMINAL UI --- */
.hero-terminal {
    font-family: 'Courier New', Courier, monospace;
    padding: 0;
    overflow: hidden;
    background: rgba(5, 5, 5, 0.6);
}

.terminal-header {
    background: rgba(255,255,255,0.05);
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.window-controls { display: flex; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; cursor: pointer; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }
.term-title { margin: 0 auto; color: var(--text-dim); font-size: 0.85rem; padding-right: 40px; }

.terminal-body { padding: 1.5rem; font-size: 0.9rem; line-height: 1.8; color: var(--gray); }
.prompt { color: var(--primary); font-weight: bold; margin-right: 8px; }
.success { color: #27c93f; }
.error { color: #ff5f56; }
.term-line { margin-bottom: 0.5rem; display: flex; align-items: center; }
.input-line { display: flex; align-items: center; width: 100%; }

.term-input {
    background: transparent;
    border: none;
    color: var(--light);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    flex-grow: 1;
    outline: none;
}
.term-input::placeholder { color: rgba(255,255,255,0.2); }

.status { margin-left: 1rem; }
.lbl { color: var(--text-dim); margin-right: 8px; width: 100px; display: inline-block; }

.indicator {
    width: 8px; height: 8px; border-radius: 50%;
    background: #27c93f; display: inline-block; margin-right: 10px;
    box-shadow: 0 0 10px #27c93f;
}
.blink { animation: blinker 1.5s linear infinite; }
.delay-1 { animation-delay: 0.5s; }
.delay-2 { animation-delay: 1s; }

@keyframes blinker { 50% { opacity: 0.3; box-shadow: none; } }

.cursor { display: inline-block; width: 8px; height: 15px; background: var(--gray); margin-left: 2px; animation: blinker 1s step-end infinite; }

/* --- OTHER SECTIONS --- */
.section-title { font-size: 2.5rem; margin-bottom: 3rem; }
.grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 4rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }

.card, .feat {
    padding: 2.5rem;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    transition: 0.4s;
    cursor: default;
}

.card:hover, .feat:hover { border-color: var(--primary); transform: translateY(-5px); box-shadow: 0 10px 30px rgba(230,57,70,0.1); }
.card h3, .feat h4 { color: var(--light); margin-bottom: 1rem; font-size: 1.3rem; }
.card p, .feat p { color: var(--text-dim); }

.quote-box { border-left: 4px solid var(--primary); padding: 2rem; background: var(--glass-bg); backdrop-filter: blur(10px); border-radius: 0 12px 12px 0; font-style: italic; font-size: 1.4rem; color: var(--light); box-shadow: 0 8px 32px rgba(0,0,0,0.2); }

.tech-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 2.5rem; align-items: center; }
.tech-logos img { height: 45px; width: auto; transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); filter: grayscale(100%) opacity(0.6); cursor: pointer; }
.tech-logos img:hover { filter: grayscale(0%) opacity(1); transform: translateY(-5px) scale(1.1); }
.tech-logos img.invert-dark { filter: grayscale(100%) opacity(0.6) invert(1); }
.tech-logos img.invert-dark:hover { filter: grayscale(0%) opacity(1) invert(1); }

.text-center { text-align: center; }

/* --- PURE CSS ICONS --- */
.css-icon {
    position: relative;
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    background: rgba(230, 57, 70, 0.05);
    border: 1px solid rgba(230, 57, 70, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Web Icon */
.icon-web { align-items: flex-start; padding-top: 12px; }
.web-bar { position: absolute; width: 40px; height: 2px; background: var(--primary); top: 14px; border-radius: 2px; }
.web-dot { position: absolute; width: 6px; height: 6px; background: var(--primary); border-radius: 50%; top: 22px; }
.web-dot:nth-child(2) { left: 16px; }
.web-dot:nth-child(3) { left: 28px; }
.icon-web::after { content: ''; position: absolute; width: 40px; height: 20px; border: 2px solid var(--primary); border-top: none; top: 16px; border-radius: 0 0 4px 4px; box-shadow: inset 0 -4px 10px rgba(230,57,70,0.2); }

/* DB Icon */
.icon-db { flex-direction: column; gap: 4px; }
.db-disk { width: 36px; height: 12px; border: 2px solid var(--primary); border-radius: 50%; box-shadow: 0 2px 8px rgba(230,57,70,0.3); }

/* Cloud Icon */
.icon-cloud { overflow: hidden; }
.cloud-base { position: absolute; width: 36px; height: 14px; background: var(--primary); border-radius: 20px; bottom: 18px; box-shadow: 0 0 15px rgba(230,57,70,0.5); }
.cloud-puff1 { position: absolute; width: 20px; height: 20px; background: var(--primary); border-radius: 50%; bottom: 22px; left: 18px; }
.cloud-puff2 { position: absolute; width: 14px; height: 14px; background: var(--primary); border-radius: 50%; bottom: 22px; right: 16px; }

/* Speed Icon */
.icon-speed { position: relative; }
.speed-arrow { width: 14px; height: 14px; border-top: 3px solid var(--primary); border-right: 3px solid var(--primary); transform: rotate(45deg); position: absolute; left: 18px; animation: slide 1s infinite alternate; }
.speed-arrow.delay { left: 28px; animation-delay: 0.2s; opacity: 0.5; }
@keyframes slide { from { transform: translateX(0) rotate(45deg); } to { transform: translateX(6px) rotate(45deg); } }

/* Shield Icon */
.icon-shield { position: relative; }
.shield-body { width: 28px; height: 32px; border: 2px solid var(--primary); border-radius: 4px 4px 16px 16px; display: flex; justify-content: center; align-items: center; box-shadow: inset 0 0 10px rgba(230,57,70,0.3); }
.shield-check { width: 6px; height: 12px; border-bottom: 3px solid var(--primary); border-right: 3px solid var(--primary); transform: rotate(45deg); margin-bottom: 4px; }

/* Scale Icon */
.icon-scale { align-items: flex-end; padding-bottom: 18px; gap: 6px; }
.scale-bar { width: 6px; background: var(--primary); border-radius: 2px; }
.scale-bar.b1 { height: 12px; }
.scale-bar.b2 { height: 20px; }
.scale-bar.b3 { height: 28px; box-shadow: 0 0 10px var(--primary); }

/* Network Node Icon (for Tech Stack section) */
.icon-network { width: 100px; height: 100px; margin: 0 auto 2rem auto; border-radius: 50%; background: none; border: none; }
.net-node { position: absolute; width: 12px; height: 12px; background: var(--primary); border-radius: 50%; box-shadow: 0 0 15px var(--primary); z-index: 2; animation: pulseNode 2s infinite; }
.center-node { width: 20px; height: 20px; top: 40px; left: 40px; }
.net-node.n1 { top: 15px; left: 44px; }
.net-node.n2 { top: 65px; left: 20px; }
.net-node.n3 { top: 65px; left: 68px; }
.net-line { position: absolute; background: rgba(230, 57, 70, 0.4); z-index: 1; }
.net-line.l1 { width: 2px; height: 25px; top: 20px; left: 49px; }
.net-line.l2 { width: 25px; height: 2px; top: 58px; left: 28px; transform: rotate(30deg); }
.net-line.l3 { width: 25px; height: 2px; top: 58px; left: 47px; transform: rotate(-30deg); }
@keyframes pulseNode { 0% { box-shadow: 0 0 5px var(--primary); transform: scale(1); } 50% { box-shadow: 0 0 20px var(--primary); transform: scale(1.2); } 100% { box-shadow: 0 0 5px var(--primary); transform: scale(1); } }

/* Footer Link */
.github-link { color: var(--primary); text-decoration: none; border-bottom: 1px dashed var(--primary); font-weight: 600; transition: 0.3s; }
.github-link:hover { color: #ff4d5a; text-shadow: 0 0 10px rgba(230,57,70,0.5); }

/* --- INTERACTIVE NEW ELEMENTS --- */

/* Scroll Reveal */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.2s; }
.reveal-delay-2 { transition-delay: 0.4s; }

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex; justify-content: center; align-items: center;
    opacity: 1; transition: opacity 0.3s ease;
}
.modal-overlay.hidden { opacity: 0; pointer-events: none; }
.modal-content {
    width: 90%; max-width: 600px;
    transform: scale(1); transition: transform 0.3s ease;
}
.modal-overlay.hidden .modal-content { transform: scale(0.9); }

/* Audio Prompt */
.audio-prompt {
    position: fixed; bottom: 20px; left: 20px;
    background: var(--primary); color: white;
    padding: 10px 20px; border-radius: 8px;
    font-size: 0.8rem; z-index: 3000;
    box-shadow: 0 4px 15px rgba(230,57,70,0.4);
    opacity: 1; transition: 0.5s; pointer-events: none;
}
.audio-prompt.hidden { opacity: 0; }

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    h1 { font-size: 2.5rem; }
    .grid, .grid-3 { grid-template-columns: 1fr; }
    nav ul { display: none; }
}