:root {
    --bg-color: #050510;
    --bg-overlay: rgba(5, 5, 16, 0.95);
    --text-primary: #ffffff;
    --text-secondary: #7b8ea8;
    --accent-primary: #4facfe; /* Cyber Blue */
    --accent-secondary: #ff00c8; /* Neon Magenta */
    --gradient-primary: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    --card-bg: rgba(5, 10, 25, 0.5);
    --card-border: rgba(79, 172, 254, 0.2);
    --card-border-hover: rgba(79, 172, 254, 0.6);
    --glass-shadow: 0 8px 32px 0 rgba(79, 172, 254, 0.1);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-pill: 9999px;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    /* Cyber grid overlay */
    background-image: 
        linear-gradient(rgba(79, 172, 254, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 172, 254, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* Background Glow Effect */
.glow-bg {
    position: fixed;
    top: -20vh;
    left: -10vw;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 0, 200, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: -1;
    pointer-events: none;
}
.glow-bg::after {
    content: '';
    position: absolute;
    top: 30%;
    right: -40vw;
    width: 70vw;
    height: 70vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 172, 254, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Glassmorphism utility */
.glass-effect {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    box-shadow: var(--glass-shadow);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition-normal);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(90deg, rgba(79, 172, 254, 0.15), rgba(255, 0, 200, 0.15));
    border: 1px solid var(--accent-primary);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(79, 172, 254, 0.4), inset 0 0 10px rgba(79, 172, 254, 0.3);
    backdrop-filter: blur(8px);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    box-shadow: 0 0 35px rgba(255, 0, 200, 0.5), inset 0 0 15px rgba(79, 172, 254, 0.6);
    border-color: var(--accent-secondary);
    color: white;
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid rgba(0,0,0,0.05);
}

.btn-secondary:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.btn-large {
    padding: 14px 28px;
    font-size: 1rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1200px;
    border-radius: var(--radius-pill);
    z-index: 100;
    transition: var(--transition-normal);
}

/* Cyberpunk Hero */
.cyber-hero {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-color);
    z-index: 1;
}

.cyber-hero * {
    text-decoration: none !important;
}

/* Main Content Wrapper (Slides over hero) */
.main-content {
    position: relative;
    z-index: 10;
    background: var(--bg-color);
    box-shadow: 0 -30px 60px rgba(5, 5, 16, 0.95);
    /* Prominent Cyber Grid Background */
    background-image: 
        linear-gradient(rgba(79, 172, 254, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 172, 254, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center top;
}

.main-content::before {
    content: '';
    position: absolute;
    top: -150px;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to top, var(--bg-color), transparent);
    z-index: -1;
    pointer-events: none;
}

/* Animated Space Dust Background */
.space-dust {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-image: 
        radial-gradient(1.5px 1.5px at 20px 30px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 40px 70px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(2.5px 2.5px at 90px 40px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 160px 120px, #e2e8f0, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 200px 50px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 250px 190px, #ffffff, rgba(0,0,0,0)),
        radial-gradient(3px 3px at 300px 80px, #4facfe, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 350px 220px, #ff00c8, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 400px 300px;
    animation: spaceDrift 60s linear infinite;
    opacity: 0.8;
}

@keyframes spaceDrift {
    0% { background-position: 0 0; }
    100% { background-position: -400px 300px; }
}

.cyber-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/hero-bg.png');
    background-size: cover;
    background-position: center top;
    z-index: 1;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* Header inside Hero */
.cyber-header {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px 20px 10px;
    width: 100%;
}

.cyber-logo-icon {
    background: transparent;
    color: #4facfe;
    font-size: 2rem;
    font-weight: 500;
    text-shadow: 0 0 10px rgba(79, 172, 254, 0.6);
    border: none;
    width: auto;
    height: auto;
}
.logo-icon.cyber-logo-icon {
    font-family: var(--font-heading);
}

.cyber-logo-text {
    color: #7b8ea8;
}

.cyber-logo-text .logo-name, .cyber-logo-text .logo-surname {
    color: #7b8ea8;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 1px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-badge {
    display: flex;
    flex-direction: column;
    text-align: right;
    font-size: 0.75rem;
    color: #7b8ea8;
    letter-spacing: 1px;
    padding: 8px 16px;
    border: 1px solid rgba(123, 142, 168, 0.2);
    border-radius: 8px;
    background: rgba(10, 10, 20, 0.5);
    backdrop-filter: blur(5px);
}

.menu-btn {
    background: transparent;
    border: 1px solid rgba(123, 142, 168, 0.2);
    color: #7b8ea8;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-fast);
}
.menu-btn:hover {
    border-color: #4facfe;
    color: #4facfe;
    box-shadow: 0 0 10px rgba(79, 172, 254, 0.3);
}

/* Hero Content container */
.cyber-hero-container {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 40px 60px 10px;
    width: 100%;
}

.cyber-content-left {
    max-width: 550px;
    background: radial-gradient(circle at left, rgba(5, 5, 16, 0.85) 0%, rgba(5, 5, 16, 0.4) 60%, transparent 100%);
    padding: 30px 40px 30px 20px;
    margin-top: -80px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    border-left: 2px solid var(--accent-primary);
    box-shadow: -10px 0 20px rgba(5, 5, 16, 0.5);
}

.cyber-pre-title {
    color: #ffffff;
    font-size: 1rem;
    letter-spacing: 4px;
    margin-bottom: 10px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,1);
    text-decoration: none !important;
    border: none !important;
}

.cyber-title {
    font-size: 4.8rem;
    line-height: 1.1;
    margin-bottom: 25px;
    font-family: var(--font-heading);
    font-weight: 800;
    text-shadow: 0 4px 15px rgba(0,0,0,1), 0 0 30px rgba(0,0,0,0.8);
    letter-spacing: -2px;
    text-decoration: none !important;
    position: relative;
    border: none !important;
}

.text-white {
    color: #ffffff;
}

.text-gradient-cyber {
    background: linear-gradient(90deg, #00d2ff 0%, #ff00c8 50%, #00d2ff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 3s linear infinite;
    text-decoration: none !important;
    position: relative;
    display: inline-block;
}

@keyframes gradientFlow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.cyber-subtitle {
    color: #e2e8f0;
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 40px;
    text-shadow: 0 2px 10px rgba(0,0,0,1), 0 0 15px rgba(0,0,0,0.8);
    font-weight: 400;
    min-height: 85px; /* Prevent layout shift during typing */
    text-decoration: none !important;
    max-width: 90%;
    border-bottom: none !important;
}

.cyber-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(10, 15, 30, 0.6);
    border: 1px solid var(--accent-primary);
    color: #ffffff;
    padding: 16px 36px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-decoration: none !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 20px rgba(79, 172, 254, 0.3), inset 0 0 10px rgba(79, 172, 254, 0.2);
    margin-bottom: 50px;
    backdrop-filter: blur(10px);
    text-shadow: 0 0 5px rgba(255,255,255,0.5);
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.cyber-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-20deg);
    animation: buttonShine 4s infinite;
}

@keyframes buttonShine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.cyber-btn-primary:hover {
    box-shadow: 0 0 30px rgba(255, 0, 200, 0.6), inset 0 0 15px rgba(79, 172, 254, 0.4);
    border-color: var(--accent-secondary);
    transform: translateY(-2px) scale(1.02);
    color: #ffffff;
    background: rgba(255, 0, 200, 0.1);
}

.cyber-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cyber-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e2e8f0;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.cyber-feature i {
    color: #4facfe;
    font-size: 1.2rem;
}

/* Right HUD elements */
.cyber-content-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 400px;
    align-items: flex-end;
}

.hud-box {
    background: rgba(5, 10, 25, 0.5);
    border: 1px solid rgba(79, 172, 254, 0.3);
    padding: 20px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    position: relative;
}
.hud-box::before, .hud-box::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border: 1px solid #4facfe;
}
.hud-box::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.hud-box::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.hud-top {
    width: 220px;
}

.hud-icon {
    color: #7b8ea8;
    font-family: monospace;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.hud-text {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.hud-title {
    color: #4facfe;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.hud-subtitle {
    color: #7b8ea8;
    font-size: 0.8rem;
}

.hud-lines {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.hud-lines .line {
    height: 2px;
    background: rgba(123, 142, 168, 0.3);
}
.line.w-100 { width: 100%; }
.line.w-80 { width: 80%; }
.line.w-60 { width: 60%; }

.hud-bottom {
    width: 250px;
}

.hud-progress-container {
    height: 2px;
    background: rgba(123, 142, 168, 0.3);
    width: 100%;
    margin-top: 10px;
    position: relative;
}
.hud-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 70%;
    background: #4facfe;
    box-shadow: 0 0 10px #4facfe;
}
.hud-progress-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: -2px;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 5px #fff;
}

/* Fix Portfolio border radius to fit under dark hero */
.portfolio {
    padding: 100px 0;
    background: transparent;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-primary);
    letter-spacing: 2px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-top: 8px;
}

.portfolio-category {
    margin-bottom: 80px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--card-border);
}

.category-title {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.category-title i {
    color: var(--accent-secondary);
    text-shadow: 0 0 10px var(--accent-secondary);
}

.view-all {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.view-all:hover {
    gap: 12px;
    text-shadow: 0 0 8px var(--accent-primary);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.project-card {
    background: rgba(5, 10, 25, 0.6);
    border-radius: 4px;
    overflow: hidden;
    transition: var(--transition-normal);
    border: 1px solid var(--card-border);
    cursor: pointer;
    backdrop-filter: blur(8px);
    position: relative;
}
.project-card::before, .project-card::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    border: 2px solid var(--accent-primary);
    z-index: 5;
    transition: var(--transition-normal);
}
.project-card::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.project-card::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.2);
    border-color: var(--card-border-hover);
}
.project-card:hover::before, .project-card:hover::after {
    border-color: var(--accent-secondary);
    width: 25px;
    height: 25px;
}

.project-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}

.project-image img {
    width: 100%;
    height: 130%; /* Room for parallax */
    object-fit: cover;
    position: absolute;
    top: -15%;
    left: 0;
    transform: translateY(var(--parallax-y, 0px)) scale(var(--hover-scale, 1));
    transition: transform 0.15s linear;
}

.project-card:hover .project-image img {
    --hover-scale: 1.05;
}

.project-info {
    padding: 20px;
}

.project-name {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.project-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tags span {
    font-size: 0.7rem;
    padding: 4px 10px;
    background: transparent;
    border-radius: 2px;
    color: var(--accent-primary);
    font-weight: 500;
    border: 1px solid var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Bottom Sections Grid */
.bottom-sections {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    margin-top: -30px;
    position: relative;
    z-index: 10;
    padding-bottom: 120px; /* Space for fixed footer */
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.about-card, .skills-card, .contact-card {
    padding: 30px;
    border-radius: 4px;
    position: relative;
    background: rgba(5, 10, 25, 0.6);
    border: 1px solid var(--card-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.about-card::before, .about-card::after,
.skills-card::before, .skills-card::after,
.contact-card::before, .contact-card::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-primary);
    pointer-events: none;
}
.about-card::before, .skills-card::before, .contact-card::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.about-card::after, .skills-card::after, .contact-card::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.about-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stat-item {
    background: rgba(10, 20, 40, 0.4);
    padding: 16px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid rgba(79, 172, 254, 0.1);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: var(--font-heading);
    text-shadow: 0 0 10px var(--accent-primary);
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 4px;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.skill-percent {
    color: var(--accent-primary);
}

.skill-bar {
    height: 4px;
    background: rgba(123, 142, 168, 0.2);
    border-radius: 2px;
    overflow: visible;
    margin-top: 8px;
    position: relative;
}

.skill-progress {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent-primary);
    /* Initial width for animation */
    width: 0; 
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.skill-progress::after {
    content: '';
    position: absolute;
    right: -3px;
    top: -2px;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 5px #fff;
}

.contact-card {
    position: relative;
    overflow: hidden;
}

.contact-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.contact-methods {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: rgba(10, 20, 40, 0.6);
    border: 1px solid var(--accent-primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 1.2rem;
    box-shadow: inset 0 0 10px rgba(79, 172, 254, 0.2);
}

.contact-details {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.contact-value {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Footer */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px 0;
    background: rgba(5, 10, 25, 0.85);
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--accent-primary);
    box-shadow: 0 -5px 20px rgba(79, 172, 254, 0.15);
    z-index: 999;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.logo-icon-small {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--accent-primary);
    font-size: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: var(--transition-fast);
}

.footer-social a:hover {
    color: var(--accent-primary);
}

/* Animations */
[data-animate] {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate="fade-up"] {
    transform: translateY(40px);
}

[data-animate="slide-right"] {
    transform: translateX(-40px);
}

[data-animate="slide-left"] {
    transform: translateX(40px);
}

[data-animate].is-visible {
    opacity: 1;
    transform: translate(0);
}

/* Responsive */
@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bottom-sections {
        grid-template-columns: 1fr;
    }
    
    .social-sidebar {
        display: none;
    }
    
    .cyber-content-right {
        display: none; /* Hide HUD on tablets for better focus on text */
    }
}

@media (max-width: 768px) {
    .cyber-hero-container {
        flex-direction: column;
        justify-content: center;
        padding-top: 40px;
        text-align: center;
    }
    
    .cyber-content-left {
        display: flex;
        flex-direction: column;
        align-items: center;
        max-width: 100%;
    }
    
    .cyber-features {
        align-items: center;
    }
    
    .cyber-title {
        font-size: 3rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .cyber-header {
        padding: 20px;
    }
    
    .logo-text {
        display: none; /* Simplify logo on mobile */
    }
}

/* --- SPACESHIPS --- */
.spaceship-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 2; /* above particles, below HUD */
    overflow: hidden;
}

.spaceship {
    position: absolute;
    width: 60px;
    height: 60px;
    opacity: 0.6;
    filter: drop-shadow(0 0 10px rgba(79, 172, 254, 0.8));
}

.spaceship svg {
    width: 100%;
    height: 100%;
}

.ship-1 { top: 15%; left: -100px; animation: flyRight 25s linear infinite; }
.ship-2 { top: 40%; right: -100px; animation: flyLeft 35s linear infinite; width: 80px; height: 80px; filter: drop-shadow(0 0 15px rgba(255, 0, 200, 0.8)); }
.ship-3 { top: 70%; left: -100px; animation: flyRight 40s linear infinite 5s; opacity: 0.4; }
.ship-4 { top: 25%; right: -100px; animation: flyLeft 30s linear infinite 10s; width: 90px; height: 90px; }
.ship-5 { top: 80%; left: -100px; animation: flyRight 20s linear infinite 15s; filter: drop-shadow(0 0 10px rgba(255, 0, 200, 0.8)); opacity: 0.5; }

@keyframes flyRight {
    0% { transform: translateX(-100px) translateY(0) scale(0.8); }
    50% { transform: translateX(50vw) translateY(-20px) scale(1); }
    100% { transform: translateX(calc(100vw + 100px)) translateY(0) scale(0.8); }
}

@keyframes flyLeft {
    0% { transform: translateX(100px) translateY(0) scale(0.8); }
    50% { transform: translateX(-50vw) translateY(30px) scale(1.2); }
    100% { transform: translateX(calc(-100vw - 100px)) translateY(0) scale(0.8); }
}

/* --- CYBER MODAL --- */
.cyber-modal {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(5, 5, 16, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.cyber-modal.active {
    opacity: 1;
    visibility: visible;
}

.cyber-modal-content {
    width: 95vw;
    height: 95vh;
    background: #050510;
    border: 2px solid var(--accent-primary);
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(79, 172, 254, 0.3), inset 0 0 20px rgba(79, 172, 254, 0.2);
    display: flex;
    flex-direction: column;
    position: relative;
    transform: scaleY(0.01) scaleX(0);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.cyber-modal.active .cyber-modal-content {
    transform: scaleY(1) scaleX(1);
}

.cyber-modal-content::before, .cyber-modal-content::after {
    content: ''; position: absolute; width: 30px; height: 30px; border: 2px solid var(--accent-secondary); pointer-events: none; z-index: 20;
}
.cyber-modal-content::before { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.cyber-modal-content::after { bottom: 10px; right: 10px; border-left: none; border-top: none; }


.cyber-modal-header {
    height: 50px;
    background: rgba(79, 172, 254, 0.1);
    border-bottom: 1px solid var(--accent-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 20;
}

.modal-title {
    color: var(--accent-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 0 10px rgba(79, 172, 254, 0.5);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--accent-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(255, 0, 200, 0.5);
    outline: none;
}

.modal-close:hover {
    color: #fff;
    transform: scale(1.2) rotate(90deg);
}

.cyber-modal-body {
    flex: 1;
    position: relative;
    background: #000;
}

.modal-scanlines {
    display: none;
}

.modal-loader {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: var(--accent-primary);
    font-family: var(--font-heading);
    letter-spacing: 5px;
    animation: pulse 1.5s infinite;
}

#project-iframe {
    width: 100%;
    height: 100%;
    border: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    position: relative;
    z-index: 5;
    background: #fff;
}

/* --- 3D CITY CANVAS --- */
#city-3d-canvas {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.9;
    mix-blend-mode: screen;
}

/* --- MOON AND STARS --- */
.sky-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2; /* above 3d city, below text */
    pointer-events: none;
    overflow: hidden;
}

.moon {
    position: absolute;
    top: 10%;
    right: 15%;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #dcdcdc 60%, #a9a9a9);
    box-shadow: 
        0 0 50px rgba(255, 255, 255, 0.4),
        0 0 100px rgba(79, 172, 254, 0.2),
        inset -10px -10px 20px rgba(0, 0, 0, 0.5);
    /* Subtle pulsing glow */
    animation: moonGlow 4s infinite alternate;
}

@keyframes moonGlow {
    from { filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3)); }
    to { filter: drop-shadow(0 0 40px rgba(255, 255, 255, 0.6)); }
}

.stars {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: transparent;
}

/* Generating stars using box-shadow */
.stars::after {
    content: "";
    position: absolute;
    width: 2px;
    height: 2px;
    background: transparent;
    box-shadow: 
        10vw 20vh #fff, 20vw 10vh #fff, 30vw 30vh #fff, 40vw 15vh #fff, 
        50vw 25vh #fff, 60vw 10vh #fff, 70vw 35vh #fff, 80vw 20vh #fff, 
        90vw 10vh #fff, 15vw 40vh #fff, 25vw 50vh #fff, 35vw 45vh #fff, 
        45vw 60vh #fff, 55vw 55vh #fff, 65vw 45vh #fff, 75vw 65vh #fff, 
        85vw 50vh #fff, 95vw 60vh #fff, 5vw 70vh #fff, 15vw 80vh #fff, 
        25vw 75vh #fff, 35vw 90vh #fff, 45vw 85vh #fff, 55vw 80vh #fff, 
        65vw 95vh #fff, 75vw 85vh #fff, 85vw 90vh #fff, 95vw 80vh #fff,
        /* tiny stars */
        8vw 5vh #aaa, 22vw 33vh #aaa, 48vw 12vh #aaa, 78vw 4vh #aaa,
        12vw 66vh #aaa, 42vw 77vh #aaa, 82vw 55vh #aaa, 92vw 33vh #aaa;
    animation: twinkle 5s infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* --- MATRIX TEXT EFFECT --- */
.matrix-text {
    color: var(--accent-primary);
    position: relative;
    display: inline-block;
    cursor: crosshair;
    text-shadow: 0 0 15px rgba(79, 172, 254, 0.8), 0 0 30px rgba(79, 172, 254, 0.4);
    transition: color 0.3s ease, text-shadow 0.3s ease;
    letter-spacing: 5px;
}

.matrix-text:hover {
    color: var(--accent-secondary);
    text-shadow: 0 0 15px rgba(255, 0, 200, 0.8), 0 0 30px rgba(255, 0, 200, 0.4);
}

/* --- CUSTOM SCROLLBAR --- */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #050510;
    border-left: 1px solid rgba(79, 172, 254, 0.2);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 5px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #6fdcff, #ff4dd2);
}

/* Firefox compatibility */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) #050510;
}
