/* Base Styles & Variables */
:root {
    --bg-dark: #020813;
    --bg-light: #06142e;
    --primary-color: #00e5ff;
    --secondary-color: #0077ff;
    --accent-color: #ff007b;
    --text-main: #e0f2fe;
    --text-muted: #94a3b8;
    --glass-bg: rgba(16, 30, 60, 0.4);
    --glass-border: rgba(0, 229, 255, 0.15);
    --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

body, html {
    width: 100%;
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    scroll-behavior: smooth;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

a:hover {
    text-shadow: 0 0 8px var(--primary-color);
}

/* Background Particles Container */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle at center, var(--bg-light) 0%, var(--bg-dark) 100%);
}

/* Layout & Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(2, 8, 19, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

.logo-svg {
    width: 40px;
    height: 40px;
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.navbar a {
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 500;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2) inset;
}

.btn-primary:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.6);
}

/* Glass Panel */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Hero Section */
.hero {
    text-align: center;
    padding-top: 8rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.glitch {
    font-size: 4rem;
    font-weight: bold;
    position: relative;
    color: #fff;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    letter-spacing: 4px;
}

.description {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

/* Grid Layouts */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.content-grid.reverse {
    direction: rtl;
}

.content-grid.reverse > * {
    direction: ltr;
}

/* FPGA Section */
.impact-box {
    margin-top: 2rem;
}

.impact-box h4 {
    color: var(--primary-color);
}

.impact-box ul {
    list-style: none;
    margin-top: 1rem;
}

.impact-box li {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    padding-left: 1.5rem;
    position: relative;
}

.impact-box li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.papers-block .paper-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.paper-card {
    display: block;
    padding: 1.5rem;
    text-align: left;
    transition: transform 0.3s, box-shadow 0.3s;
}

.paper-card.interactive:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.1);
}

.paper-authors {
    color: var(--secondary-color);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.paper-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.case-study {
    margin-top: 3rem;
    background: linear-gradient(145deg, rgba(16, 30, 60, 0.6), rgba(6, 20, 46, 0.4));
    border-left: 4px solid var(--primary-color);
}

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

.case-header h4 {
    margin: 0;
    color: var(--text-main);
}

.badge {
    background: rgba(0, 229, 255, 0.1);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid var(--primary-color);
}

.case-desc {
    margin-bottom: 1.5rem;
}

.case-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.case-detail {
    font-size: 0.95rem;
    color: var(--text-muted);
    border-top: 1px dashed var(--glass-border);
    padding-top: 1rem;
}

/* Security Section */
.dark-alt {
    background: rgba(0, 0, 0, 0.4);
}

.feature-list {
    list-style: none;
    margin-top: 2rem;
}

.feature-list li {
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

/* Shield Animation */
.visual-block {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.shield-animation {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.shield-core {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 40px var(--primary-color);
    z-index: 10;
}

.shield-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--secondary-color);
    border-bottom-color: var(--primary-color);
    animation: spin linear infinite;
}

.ring-1 { width: 120px; height: 120px; animation-duration: 4s; }
.ring-2 { width: 180px; height: 180px; animation-duration: 7s; animation-direction: reverse; border-top-color: var(--primary-color); border-bottom-color: transparent; }
.ring-3 { width: 250px; height: 250px; animation-duration: 10s; border: 1px dashed rgba(0, 229, 255, 0.3); }

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.threat-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-color);
    top: 20%;
    left: -10%;
    animation: attack 3s infinite ease-in;
}

.threat-particle.t-2 {
    top: 80%;
    left: 110%;
    animation: attack2 4s infinite ease-in 1s;
}

@keyframes attack {
    0% { transform: translate(0, 0); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translate(150px, 80px); opacity: 0; }
}
@keyframes attack2 {
    0% { transform: translate(0, 0); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translate(-150px, -80px); opacity: 0; }
}

/* Ecommerce Section */
.agent-workflow {
    margin-top: 2rem;
    position: relative;
}

.agent-workflow::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--glass-border);
}

.step {
    display: flex;
    margin-bottom: 2rem;
    position: relative;
}

.step-num {
    width: 30px;
    height: 30px;
    background: var(--bg-dark);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--primary-color);
    margin-right: 1.5rem;
    z-index: 1;
    flex-shrink: 0;
}

.step-text strong {
    display: block;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.step-text {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.highlight-text {
    padding: 1.5rem;
    background: rgba(0, 229, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.shopping-bot-ui {
    width: 100%;
    max-width: 400px;
    height: 500px;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.bot-header {
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.bot-avatar {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    margin-right: 1rem;
}

.bot-messages {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.msg {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    max-width: 85%;
    line-height: 1.4;
}

.msg.user {
    background: rgba(255, 255, 255, 0.1);
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.msg.bot {
    background: rgba(0, 119, 255, 0.2);
    border: 1px solid rgba(0, 119, 255, 0.3);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.msg.success {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
    color: #00ff88;
}

/* Contact Section */
.contact-info {
    max-width: 600px;
    margin: 0 auto;
}

.contact-cards {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-card {
    flex: 1;
    min-width: 250px;
    padding: 2rem;
    transition: transform 0.3s;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    padding: 4rem 0 2rem;
    background: #01040a;
    border-top: 1px solid var(--glass-border);
}

.footer-logo {
    color: var(--text-muted);
    font-size: 1.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.footer-links a {
    color: var(--text-muted);
}

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

.footer-links .divider {
    color: #475569;
}

.copyright {
    margin-top: 2rem;
    color: #475569;
    font-size: 0.85rem;
}

.icp-record {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.icp-record a {
    color: #475569;
}

.icp-record a:hover {
    color: var(--primary-color);
}

/* Animations & Utility Classes */
.mt-4 { margin-top: 1.5rem; }
.text-center { text-align: center; }

.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-up {
    transform: translateY(40px);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }

/* Responsive Design */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .navbar {
        padding: 1rem;
    }
    .navbar ul {
        display: none; /* simple mobile fix */
    }
    .glitch { font-size: 2.5rem; }
    .section { padding: 4rem 0; }
}
