/* ============================================================
   shared.css — Common styles for NadeeraR.Hewawasam portfolio
   ============================================================ */

/* Variables */
:root {
    --bg: #040505;
    --neon-left: #00f0e0;
    --neon-right: #00ff54;
    --muted-teal: #86f1e6;
    --body-text: #8fdfe0;
    --soft-white: #f3f7f9;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    overflow-x: hidden;
    background: var(--bg);
    color: var(--soft-white);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Canvas background */
#canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    opacity: 0.9;
}

/* ── Header & Nav ── */
header {
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(4, 5, 5, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100;
    border-bottom: 1px solid rgba(0, 240, 224, 0.05);
}

.nav-logo {
    font-family: "Space Mono", monospace;
    font-size: 0.9rem;
    color: var(--neon-left);
    text-decoration: none;
    letter-spacing: 1px;
    opacity: 0.85;
    transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 1; }

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav ul li a {
    color: var(--body-text);
    text-decoration: none;
    font-family: "Space Mono", monospace;
    font-size: 0.88rem;
    transition: color 0.25s;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -6px; left: 0;
    width: 0; height: 2px;
    background: linear-gradient(90deg, var(--neon-left), var(--neon-right));
    transition: width 0.25s;
    border-radius: 2px;
}

nav ul li a:hover::after,
nav ul li a.active::after { width: 100%; }

nav ul li a:hover,
nav ul li a.active { color: var(--muted-teal); }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
    z-index: 200;
}
.hamburger span {
    display: block;
    width: 24px; height: 2px;
    background: var(--neon-left);
    border-radius: 2px;
    transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav overlay */
.mobile-nav {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(4, 5, 5, 0.97);
    z-index: 150;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
    color: var(--soft-white);
    text-decoration: none;
    font-family: "Space Mono", monospace;
    font-size: 1.6rem;
    letter-spacing: 2px;
    transition: color 0.2s;
}
.mobile-nav a:hover,
.mobile-nav a.active { color: var(--neon-left); }

/* ── Sections ── */
section {
    padding: 5rem 2rem;
    min-height: 80vh;
}

.section-title {
    text-align: center;
    color: var(--neon-left);
    font-family: "Space Mono", monospace;
    font-size: 2.4rem;
    margin-bottom: 3rem;
    font-weight: 700;
    letter-spacing: 0.6px;
}

/* ── Footer ── */
footer {
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.45);
    margin-top: 3rem;
    border-top: 1px solid rgba(0, 240, 224, 0.04);
}
footer p {
    color: var(--body-text);
    font-family: "Space Mono", monospace;
    font-size: 0.85rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .desktop-nav { display: none; }
    .hamburger { display: flex; }
    section { padding: 3rem 1.2rem; }
    .section-title { font-size: 1.8rem; }
}
