:root {
    --bg-color: #050505;
    --text-color: #e0e0e0;
    --primary-color: #4ade80;
    /* Softer Green */
    /* Matrix Green */
    --secondary-color: #03a9f4;
    /* Cyber Blue */
    --accent-color: #ff0055;
    /* Error Red */

    /* Modern Theme (Default) */
    --default-font-family: "Inter", sans-serif;
    --default-mono-font-family: "JetBrains Mono", monospace;
    --alert-bg: rgba(255, 140, 0, 0.05);
    --alert-border: rgba(217, 119, 6, 0.3);
    --alert-left-border: #d97706;
    --alert-icon-color: #d97706;
    --alert-h4-color: #d97706;
    --alert-code-color: #b45309;
    --alert-highlight-color: #f59e0b;

    --font-mono: var(--default-mono-font-family);
    --font-display: var(--default-font-family);
    --glow: 0 0 10px rgba(74, 222, 128, 0.5), 0 0 20px rgba(74, 222, 128, 0.3);
}

/* Retro Theme Override */
body.retro-theme {
    --default-font-family: 'Share Tech Mono', monospace;
    --default-mono-font-family: 'Fira Code', 'Courier New', monospace;

    /* Explicitly override to ensure fonts change */
    --font-mono: 'Fira Code', 'Courier New', monospace;
    --font-display: 'Share Tech Mono', monospace;

    --alert-bg: rgba(255, 0, 85, 0.1);
    --alert-border: rgba(255, 165, 0, 0.3);
    --alert-left-border: var(--accent-color);
    --alert-icon-color: orange;
    --alert-h4-color: var(--accent-color);
    --alert-code-color: rgba(255, 165, 0, 0.7);
    --alert-highlight-color: orange;
}

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

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

#top-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    /* Ensure it contains the absolute canvas */
    background-color: var(--bg-color);
}

#bg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Behind content but inside wrapper */
}

/* Scanline Effect */
.scanline {
    position: absolute;
    /* Changed from fixed to absolute to stay in wrapper */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.2) 50%,
            rgba(0, 0, 0, 0.2));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
    /* Above canvas, below content */
    opacity: 0.3;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-bottom: 20px;
    color: #fff;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #fff;
    text-shadow: var(--glow);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    padding: 40px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, rgba(0, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: var(--glow);
}

.blink {
    animation: blink 1s infinite;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    text-decoration: none;
    transition: color 0.3s ease;
}

nav a:hover,
nav a.active {
    color: var(--primary-color);
    text-shadow: var(--glow);
}

footer a:hover {
    color: var(--accent-color);
    text-shadow: 0 0 5px var(--accent-color);
}

/* Privacy Policy Button in Modal */
#modal-link-privacy {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    margin-left: 10px;
}

.nav-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #888;
    padding: 5px 10px;
    font-family: var(--font-display);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    text-shadow: var(--glow);
}

/* Ticker Section */
.ticker-section {
    background: #000;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    z-index: 20;
}

.ticker-wrapper {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-content {
    display: inline-block;
    animation: ticker 60s linear infinite;
}

.ticker-content span {
    font-family: var(--font-mono);
    /* Switch to Fira Code for better weight consistency */
    font-size: 7rem;
    font-weight: 700;
    /* Ensure bold weight is used */
    color: rgba(255, 255, 255, 0.06);
    /* Very subtle, dark look */
    margin-right: 0;
    letter-spacing: -2px;
    /* Tighter spacing for blocky look */
    line-height: 1;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Hero Section */
#hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    position: relative;
    z-index: 2;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    width: 100%;
    max-width: 1400px;
}

/* Hero Left */
.hero-left {
    flex: 1;
    max-width: 600px;
    min-width: 0;
}

.identity-badge {
    display: inline-block;
    border: 1px solid var(--primary-color);
    padding: 5px 15px;
    font-size: 0.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    background: rgba(0, 255, 65, 0.1);
    border-radius: 20px;
    font-family: var(--font-mono);
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 5px var(--primary-color);
    animation: blink 2s infinite;
}

h1.glitch {
    font-family: var(--font-display);
    font-size: 4rem;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 10px;
    position: relative;
}

.subtitle {
    font-size: 1.5rem;
    color: #888;
    margin-bottom: 40px;
    letter-spacing: 1px;
    font-weight: normal;
}

/* Diagnostic Alert */
/* Diagnostic Alert */
/* Diagnostic Alert */
.diagnostic-alert {
    background: var(--alert-bg);
    border: 1px solid var(--alert-border);
    border-left: 4px solid var(--alert-left-border);
    padding: 20px;
    border-radius: 5px;
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.alert-icon {
    font-size: 1.5rem;
    color: var(--alert-icon-color);
}

.alert-content h4 {
    color: var(--alert-h4-color);
    font-size: 0.9rem;
    margin-bottom: 5px;
    font-family: var(--font-mono);
}

.alert-content h4 span {
    opacity: 0.7;
    margin-left: 10px;
    color: var(--alert-code-color);
}

.alert-content h3 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 10px;
    font-family: var(--font-display);
}

.alert-content p {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 0;
}

.alert-content .highlight {
    color: var(--alert-highlight-color);
    font-weight: bold;
}

.cta-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.button-group {
    display: flex;
    gap: 20px;
}

/* Terminal Output */
.terminal-output {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #666;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.terminal-output .prompt {
    color: var(--secondary-color);
}

.terminal-output .command {
    color: #fff;
}

.terminal-output .response {
    color: var(--primary-color);
}

.terminal-output a {
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.terminal-output a:hover .response {
    text-shadow: 0 0 8px var(--primary-color);
    color: #fff;
}

/* Hero Right: 3D Card */
.hero-right {
    flex: 1;
    display: flex;
    justify-content: center;
    perspective: 1000px;
    /* Essential for 3D effect */
    min-width: 0;
}

.tilt-card-container {
    width: 380px;
    height: 580px;
    /* Slightly increased to ensure footer fits comfortably */
    position: relative;
    animation: float 6s ease-in-out infinite;
    /* Moved here */
    transform-style: preserve-3d;
    /* Ensure 3D context passes through */
}

.tilt-card {
    width: 100%;
    height: 100%;
    background: #050a10;
    /* Solid dark base */
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0;
    /* Remove padding from main card to let header/footer touch edges */
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1), 0 0 40px rgba(0, 0, 0, 0.5);
    transform-style: preserve-3d;
    transform: rotateX(0) rotateY(0);
    transition: transform 0.1s ease-out;
    position: relative;
}

/* Corner Handles */
.corner-tl,
.corner-br {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 5px var(--primary-color));
    box-shadow: none;
    z-index: 10;
    pointer-events: none;
}

.corner-tl {
    top: -12px;
    left: -12px;
    border-right: none;
    border-bottom: none;
    border-radius: 8px 0 0 0;
}

.corner-br {
    bottom: -12px;
    right: -12px;
    border-left: none;
    border-top: none;
    border-radius: 0 0 8px 0;
}

.card-header {
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(180deg, rgba(0, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
    border-radius: 12px 12px 0 0;
}

.profile-pic {
    width: 50px;
    height: 50px;
    background: #222;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--primary-color);
    color: #fff;
    font-size: 1.2rem;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
    margin-right: 15px;
}

.profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-pic i {
    font-size: 1.5rem;
    color: #fff;
}

.profile-info h5 {
    color: var(--secondary-color);
    font-size: 0.7rem;
    margin-bottom: 2px;
    letter-spacing: 1px;
}

.profile-info h4 {
    color: #fff;
    font-size: 1.2rem;
    font-family: var(--font-display);
    margin-bottom: 0;
}

.chip-icon {
    margin-left: auto;
    color: #333;
    font-size: 1.5rem;
    opacity: 0.5;
}

.card-body {
    flex: 1;
    padding: 25px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0) 0%, rgba(0, 255, 65, 0.02) 100%);
}

.protocol-header {
    font-family: var(--font-display);
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    letter-spacing: 1px;
    align-items: center;
    font-size: 0.9rem;
}

.protocol-list {
    list-style: none;
    padding-left: 0;
}

.protocol-list li {
    display: flex;
    margin-bottom: 20px;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.list-marker {
    width: 2px;
    background: #333;
    margin-right: 15px;
    position: relative;
}

.protocol-list li.active .list-marker {
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.list-content h4 {
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.list-content h4 i {
    color: #555;
    font-size: 0.8rem;
    transition: color 0.3s;
}

.protocol-list li.active .list-content h4 {
    color: #fff;
    /* Keep text white for readability */
}

.protocol-list li.active .list-content h4 i {
    color: var(--primary-color);
    /* Only icon glows cyan */
}

.list-content ul {
    list-style: none;
    padding-left: 0;
}

.list-content ul li {
    padding-left: 0;
    margin-bottom: 2px;
    font-size: 0.8rem;
    color: #888;
    display: block;
}

.list-content ul li::before {
    content: '- ';
    color: #444;
}

.card-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    background: linear-gradient(0deg, rgba(0, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
    border-radius: 0 0 12px 12px;
    margin-top: auto;
    /* Push to bottom */
}

.status {
    color: var(--secondary-color);
    letter-spacing: 1px;
}

.slots {
    color: #fff;
    font-weight: 500;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotateX(0) rotateY(0);
    }

    50% {
        transform: translateY(-20px) rotateX(2deg) rotateY(-2deg);
    }

    100% {
        transform: translateY(0px) rotateX(0) rotateY(0);
    }
}

.btn-primary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 12px 30px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(0, 255, 65, 0.2);
    cursor: pointer;
}

.btn-primary:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    color: var(--text-color);
    text-decoration: none;
    padding: 12px 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.social-links a:hover {
    opacity: 1;
    color: var(--secondary-color);
}

/* Sections General */
section {
    padding: 80px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-header {
    display: flex;
    align-items: baseline;
    margin-bottom: 40px;
}

.section-number {
    font-family: var(--font-display);
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-right: 15px;
}

h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--text-color);
}

/* About */
.content-block {
    max-width: 800px;
}

.content-block p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.highlight {
    color: var(--primary-color);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 0 15px rgba(3, 169, 244, 0.2);
    transform: translateY(-5px);
}

.service-card h4 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-family: var(--font-display);
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.project-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 10, 10, 0.6);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 16px;
    /* Rounded corners */
    position: relative;
    /* For spotlight */
}

.project-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(74, 222, 128, 0.06), transparent 40%);
}

.project-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 2;
}

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

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: block;
}

.project-info {
    padding: 25px;
    position: relative;
    z-index: 3;
}

.app-icon-placeholder {
    width: 48px;
    height: 48px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: #fff;
    font-size: 1.2rem;
}

.project-info h4 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.4rem;
    font-weight: 600;
}

.project-info p {
    color: #888;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.tags {
    margin-top: 15px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tags span {
    font-size: 0.75rem;
    color: #ccc;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: var(--font-mono);
}

/* Articles Section */
/* Articles Section */
.articles-grid {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding-bottom: 20px;
    /* Space for scrollbar */
    padding-top: 10px;
    /* Space for hover animation */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    align-items: stretch;
    /* Ensure all cards are same height */
}

/* Custom Scrollbar for Articles */
.articles-grid::-webkit-scrollbar {
    height: 8px;
}

.articles-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.articles-grid::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

.articles-grid::-webkit-scrollbar-thumb:hover {
    background: #fff;
}

.article-card {
    min-width: 300px;
    /* Fixed width for scrollable items */
    max-width: 300px;
    background: rgba(5, 10, 16, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--secondary-color);
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 0 20px rgba(3, 169, 244, 0.15);
    transform: translateY(-5px);
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.article-card:hover::before {
    transform: translateX(100%);
}

.article-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-date::before {
    content: 'LOG_DATE:';
    color: var(--secondary-color);
    opacity: 0.7;
}

.article-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 15px;
    line-height: 1.4;
    flex-grow: 1;
}

.article-link {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--secondary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.article-link:hover {
    opacity: 1;
    text-shadow: 0 0 8px var(--secondary-color);
}

.article-link i {
    font-size: 0.7rem;
}

/* Experience */
.timeline {
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-left: 30px;
    margin-left: 10px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -36px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: var(--secondary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--secondary-color);
}

.timeline-date {
    font-family: var(--font-display);
    color: var(--secondary-color);
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.timeline-content h4 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.timeline-content h5 {
    font-weight: normal;
    color: #888;
    margin-bottom: 15px;
}

/* Contact */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

#contact-form {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    font-family: var(--font-mono);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
    background: rgba(0, 0, 0, 0.8);
}

.contact-actions {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

#whatsapp-btn {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 12px 30px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px rgba(0, 255, 65, 0.2);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

#whatsapp-btn:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.6);
    transform: translateY(-2px);
}

#whatsapp-btn i,
.btn-secondary i {
    margin-right: 8px;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    color: #555;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-links {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Modal Styles */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    /* Black w/ opacity */
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #050a10;
    margin: 5% auto;
    padding: 0;
    border: 1px solid var(--primary-color);
    width: 80%;
    max-width: 900px;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    animation: modalOpen 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    border-radius: 16px;
    /* Rounded corners */
    overflow: hidden;
    /* Ensure content respects corners */
}

.modal-content.closing {
    animation: modalClose 0.3s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

@keyframes modalOpen {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalClose {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

    to {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
}

.close-btn {
    color: rgba(255, 255, 255, 0.7);
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 100;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    overflow: hidden;
    /* Ensure image stays within circle */
}

.profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.close-btn:hover {
    color: #fff;
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: rotate(90deg);
    box-shadow: 0 0 15px var(--primary-color);
}

.modal-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.modal-image-container {
    width: 100%;
    height: 400px;
    background: #000;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    /* Important for coverflow */
}

.modal-image-container img,
.modal-image-container video,
.modal-image-container iframe {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Glide.js Overrides */
.glide {
    width: 100%;
    height: 100%;
    position: relative;
}

.glide__track {
    height: 100%;
    perspective: 1000px;
    /* Enable 3D space */
    overflow: visible;
    /* Allow peeking */
}

.glide__slides {
    height: 100%;
    transform-style: preserve-3d;
}

.glide__slide {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    /* Smooth transition for tilt/scale */
    transform-origin: center center;
    opacity: 0.5;
    /* Fade out inactive slides */
}

.glide__slide--active {
    opacity: 1;
    /* Active slide fully visible */
    z-index: 10;
}

.glide__slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    width: auto;
    height: auto;
}

.glide__slide iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.glide__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: var(--neon-green);
    padding: 10px;
    cursor: pointer;
    font-size: 24px;
    transition: background 0.3s;
    z-index: 10;
}

.glide__arrow:hover {
    background: rgba(0, 255, 65, 0.2);
}

.glide__arrow--left {
    left: 10px;
}

.glide__arrow--right {
    right: 10px;
}

.glide__bullets {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.glide__bullet {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    padding: 0;
}

.glide__bullet--active {
    background: var(--neon-green);
    box-shadow: 0 0 5px var(--neon-green);
}

.modal-details {
    padding: 30px;
}

.modal-details h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.modal-details p {
    margin-bottom: 20px;
    color: #ccc;
}

.modal-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.modal-tags span {
    font-size: 0.75rem;
    color: #ccc;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: var(--font-mono);
}

.modal-actions {
    display: flex;
    gap: 15px;
}

/* Animations */
@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 20px;
    }

    .hero-right {
        display: none;
    }

    .hero-container {
        grid-template-columns: 1fr;
        display: block;
        /* Ensure block layout for simpler stacking */
    }

    .hero-left {
        width: 100%;
        max-width: none;
        flex: none;
        /* Disable flex behavior to allow full width */
    }

    nav ul {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    h1.glitch {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .modal-image-container {
        height: 250px;
    }
}

/* Ready to Scale Section */
.ready-to-scale-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 60px 20px;
    text-align: center;
    /* overflow: hidden; Removed to allow full-width scanner */
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: radial-gradient(circle at center, rgba(0, 255, 255, 0.02) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 12px;
}

/* Scanner Bar */
.scanner-line {
    position: absolute;
    top: 0;
    left: 50%;
    /* Center relative to container */
    transform: translateX(-50%);
    /* Center alignment */
    width: 100vw;
    /* Full viewport width */
    height: 4px;
    /* Thicker for visibility */
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    box-shadow: 0 0 15px var(--primary-color);
    opacity: 0;
    animation: scan 3s linear infinite;
    pointer-events: none;
    z-index: 10;
}

@keyframes scan {
    0% {
        top: 0%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

/* System Badge */
.system-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--primary-color);
    /* Ensure green text */
    background: rgba(0, 255, 65, 0.05);
    margin-bottom: 30px;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.1);
}

.pulsing-dot {
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(0, 255, 65, 0.7);
    }

    70% {
        opacity: 1;
        box-shadow: 0 0 0 6px rgba(0, 255, 65, 0);
    }

    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(0, 255, 65, 0);
    }
}

/* Typography */
.scale-title {
    font-family: var(--font-display);
    font-size: 6rem;
    /* Increased by 50% */
    line-height: 1;
    margin-bottom: 20px;
    color: #fff;
    text-transform: uppercase;
}

.highlight-text {
    font-size: 7.5rem;
    /* Increased by 50% */
    background: linear-gradient(180deg, #fff 0%, #666 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    transition: all 0.3s ease;
}

.scale-title:hover .highlight-text {
    text-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
}

.scale-subtitle {
    color: #888;
    font-size: 1rem;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Initiate Button */
.initiate-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 40px;
    background-color: #fff;
    color: #000;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;

    /* Fill effect setup */
    background-image: linear-gradient(to top, var(--primary-color) 0%, var(--primary-color) 100%);
    background-size: 100% 0%;
    /* Start empty */
    background-repeat: no-repeat;
    background-position: bottom;
}

.initiate-btn:hover {
    background-size: 100% 100%;
    /* Fill up */
    color: #000;
    /* Keep text black */
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
    transform: translateY(-2px);
}

.initiate-btn i {
    transition: transform 0.3s ease;
}

.initiate-btn:hover i {
    transform: translateX(5px) rotate(-45deg);
    /* Arrow moves and tilts */
}

/* Responsive */
@media (max-width: 768px) {
    .scale-title {
        font-size: 3.5rem;
    }

    .highlight-text {
        font-size: 4.5rem;
    }

    h1.glitch {
        font-size: 2.5rem;
    }
}