/* ===================================
   CSS VARIABLES
   =================================== */
:root {
    /* Cyberpunk color palette */
    --cyber-blue: #00d9ff;
    --cyber-purple: #a855f7;
    --cyber-magenta: #ff00ff;
    --cyber-pink: #ff1493;
    --dark-bg: #0a0a0f;
    --darker-bg: #050507;
    --card-bg: #0f0f1a;
    --text-primary: #e8e8f0;
    --text-secondary: #9898b3;
    --accent-glow: rgba(0, 217, 255, 0.3);
    
    /* Typography */
    --font-display: 'Orbitron', sans-serif;
    --font-mono: 'Space Mono', monospace;
    
    /* Spacing */
    --section-padding: clamp(4rem, 10vw, 8rem);
}

/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-mono);
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

::selection {
    background: var(--cyber-magenta);
    color: var(--dark-bg);
}

/* ===================================
   ANIMATED BACKGROUND
   =================================== */
.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 217, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 217, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.scan-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--cyber-blue), 
        transparent);
    opacity: 0.3;
    animation: scan 8s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes scan {
    0% { transform: translateY(0); }
    100% { transform: translateY(100vh); }
}

/* ===================================
   NAVIGATION
   =================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
    z-index: 1000;
    padding: 1.5rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
}

.logo:hover {
    color: var(--cyber-blue);
    text-shadow: 0 0 20px var(--accent-glow);
}

.bracket {
    color: var(--cyber-magenta);
    font-size: 1.8rem;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::before {
    content: '→ ';
    opacity: 0;
    margin-right: -1rem;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--cyber-blue);
}

.nav-link:hover::before {
    opacity: 1;
    margin-right: 0.3rem;
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
    flex-direction: column;
    gap: 3rem;
}

.hero-banner {
    max-width: 1000px;
    width: 90%;
    z-index: 10;
    animation: fadeInDown 1s ease-out;
}

.banner-img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(0, 217, 255, 0.4));
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    text-align: center;
    z-index: 10;
}

.glitch-wrapper {
    margin-bottom: 2rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 900;
    color: var(--text-primary);
    text-shadow: 
        0 0 10px var(--cyber-blue),
        0 0 20px var(--cyber-blue),
        0 0 40px rgba(0, 217, 255, 0.5);
    position: relative;
    display: inline-block;
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { 
        text-shadow: 
            0 0 10px var(--cyber-blue),
            0 0 20px var(--cyber-blue),
            0 0 40px rgba(0, 217, 255, 0.5);
    }
    50% { 
        text-shadow: 
            0 0 20px var(--cyber-blue),
            0 0 40px var(--cyber-blue),
            0 0 60px rgba(0, 217, 255, 0.8);
    }
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-family: var(--font-mono);
}

.typing-text {
    color: var(--cyber-purple);
}

.cursor {
    animation: blink 1s step-end infinite;
    color: var(--cyber-blue);
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-meta {
    display: inline-block;
    padding: 1rem 2rem;
    background: rgba(15, 15, 26, 0.6);
    border: 1px solid var(--cyber-blue);
    border-radius: 4px;
    font-size: 0.95rem;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.2);
}

.terminal-prompt {
    color: var(--cyber-magenta);
    margin-right: 0.5rem;
}

.command {
    color: var(--text-primary);
}

/* ===================================
   SECTIONS
   =================================== */
.section {
    padding: var(--section-padding) 2rem;
    position: relative;
    z-index: 10;
}

.section-dark {
    background: linear-gradient(180deg, 
        var(--darker-bg) 0%, 
        var(--dark-bg) 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 3rem;
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.section-number {
    color: var(--cyber-blue);
    font-size: 1.5rem;
}

.section-text {
    color: var(--text-primary);
    position: relative;
}

.section-text::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, 
        var(--cyber-magenta), 
        transparent);
}

/* ===================================
   ABOUT SECTION
   =================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.lead {
    font-size: 1.2rem !important;
    color: var(--text-primary) !important;
    font-weight: 700;
}

.highlight {
    color: var(--cyber-blue) !important;
    font-weight: 700;
    padding: 1rem;
    border-left: 3px solid var(--cyber-magenta);
    background: rgba(168, 85, 247, 0.05);
}

strong {
    color: var(--cyber-purple);
}

/* Terminal-style skills box */
.skills-terminal {
    background: var(--card-bg);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.1);
}

.terminal-header {
    background: rgba(0, 217, 255, 0.1);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 217, 255, 0.3);
    font-size: 0.85rem;
    color: var(--cyber-blue);
}

.terminal-body {
    padding: 1.5rem;
    font-size: 0.9rem;
}

.terminal-body p {
    color: var(--text-secondary);
    margin: 1.5rem 0 0.5rem 0;
}

.terminal-body p:first-child {
    margin-top: 0;
}

.prompt {
    color: var(--cyber-magenta);
    margin-right: 0.5rem;
}

.skill-list {
    list-style: none;
    margin: 0.5rem 0;
    padding-left: 1rem;
}

.skill-list li {
    color: var(--text-primary);
    padding: 0.3rem 0;
    font-size: 0.85rem;
}

/* ===================================
   WORK SECTION
   =================================== */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 217, 255, 0.2);
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        var(--cyber-magenta), 
        var(--cyber-blue), 
        transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    border-color: var(--cyber-blue);
    box-shadow: 0 10px 40px rgba(0, 217, 255, 0.2);
    transform: translateY(-5px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-tag {
    font-size: 0.75rem;
    color: var(--cyber-magenta);
    font-weight: 700;
    letter-spacing: 1px;
}

.card-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    background: rgba(0, 217, 255, 0.1);
    color: var(--cyber-blue);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 4px;
}

/* ===================================
   WRITEUPS SECTION
   =================================== */
.writeups-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.writeup-item {
    background: var(--card-bg);
    border-left: 3px solid var(--cyber-magenta);
    padding: 2rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.writeup-item:hover {
    border-left-color: var(--cyber-blue);
    box-shadow: 0 5px 30px rgba(0, 217, 255, 0.15);
}

.writeup-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.writeup-date {
    font-size: 0.8rem;
    color: var(--cyber-blue);
    font-weight: 700;
}

.writeup-category {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 0.2rem 0.8rem;
    background: rgba(168, 85, 247, 0.2);
    border-radius: 3px;
}

.writeup-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.writeup-excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.writeup-link {
    color: var(--cyber-blue);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-block;
}

.writeup-link:hover {
    color: var(--cyber-magenta);
    transform: translateX(5px);
}

/* ===================================
   CONTACT SECTION
   =================================== */
.contact-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: transparent;
    color: var(--cyber-blue);
    border: 2px solid var(--cyber-blue);
    border-radius: 4px;
    text-decoration: none;
    font-family: var(--font-mono);
    font-weight: 700;
    transition: all 0.3s ease;
}

.contact-button:hover {
    background: var(--cyber-blue);
    color: var(--dark-bg);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}

.button-icon {
    font-size: 1.2rem;
}

.pgp-section {
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 217, 255, 0.2);
}

.pgp-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.pgp-link {
    color: var(--cyber-purple);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.pgp-link:hover {
    color: var(--cyber-magenta);
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    padding: 3rem 2rem;
    border-top: 1px solid rgba(0, 217, 255, 0.1);
    text-align: center;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-copy {
    color: var(--text-secondary);
    font-size: 0.8rem;
    opacity: 0.6;
    margin-bottom: 0.5rem;
}

.footer-license {
    color: var(--text-secondary);
    font-size: 0.75rem;
    opacity: 0.5;
}

.license-link {
    color: var(--cyber-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.license-link:hover {
    color: var(--cyber-magenta);
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 968px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
    }
}

@media (max-width: 640px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .contact-links {
        flex-direction: column;
        align-items: stretch;
    }
    
    .contact-button {
        justify-content: center;
    }
}
