:root {
    --accent: #2563eb;
    --bg: #ffffff;
    --text: #0f172a;
    --muted: #475569;
}

body.dark {
    --bg: #0b1220;
    --text: #e2e8f0;
    --muted: #94a3b8;
}

body {
    font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: 0.3s;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
}

/* Header */
.header {
    position: fixed;
	width: 100%;
    top: 0;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.85);
    border-bottom: 1px solid #eee;
	z-index: 1000;
}

body.dark .header {
    background: rgba(10,15,30,0.85);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

/* LOGO WITH BACKGROUND PLATE */
.logo {
    height: 64px;
    padding: 6px 10px;
	background: transparent;
    border-radius: 6px;
}

body.dark .logo {
    background: transparent;
}

.logo img {
  height: 100%;       /* Forces image to fill the 64px logo container */
  width: auto;        /* Keeps the aspect ratio correct */
  display: block;     /* Removes the tiny gap that often appears below images */
}

.nav-right {
    display: flex;
    align-items: center;
}

nav a {
    margin-left: 20px;
    color: var(--muted);
    text-decoration: none;
}

nav a:hover {
    color: var(--accent);
}

#themeToggle {
    margin-left: 15px;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 18px;
}

/* Hero */
.hero {
    position: relative;
    padding: 160px 0;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(37,99,235,0.15), transparent),
                radial-gradient(circle at 80% 70%, rgba(59,130,246,0.15), transparent);
    z-index: -2;
}

#networkCanvas {
    position: absolute;
    inset: 0;
    width: 100%;      /* force full width */
    height: 100%;     /* force full height */
    z-index: -1;
    opacity: 0.25;
}

body.dark #networkCanvas {
    opacity: 0.35;
}

.hero h1 {
    font-size: 46px;
    margin-bottom: 20px;
}

.hero p {
    color: var(--muted);
    font-size: 18px;
}

/* Sections */
.section {
    padding: 80px 0;
}

.section.alt {
    background: rgba(0,0,0,0.03);
}

body.dark .section.alt {
    background: rgba(255,255,255,0.03);
}

.section h2 {
    text-align: center;
    margin-bottom: 40px;
}

/* Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.card {
    padding: 25px;
    border-radius: 12px;
    background: var(--bg);
    border: 1px solid rgba(0,0,0,0.05);
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

/* Footer */
.footer {
    padding: 20px;
    text-align: center;
    color: var(--muted);
}

/* Animations */
.fade-in, .fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

.card:nth-child(1) { transition-delay: 0.1s; }
.card:nth-child(2) { transition-delay: 0.2s; }
.card:nth-child(3) { transition-delay: 0.3s; }
.card:nth-child(4) { transition-delay: 0.4s; }