/* ================================
   ROOT & RESET
================================ */
:root {
    --bg: #030712;
    --bg2: #0a0f1e;
    --bg3: #0f172a;
    --card: #0d1526;
    --border: rgba(0, 255, 163, 0.12);
    --accent: #00ffaa;
    --accent2: #00c8ff;
    --accent3: #ff6b35;
    --text: #e2e8f0;
    --muted: #64748b;
    --muted2: #94a3b8;
    --font-mono: 'JetBrains Mono', monospace;
    --font-display: 'Syne', sans-serif;
    --glow: 0 0 20px rgba(0, 255, 170, 0.3);
    --glow2: 0 0 30px rgba(0, 200, 255, 0.2);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-mono);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    cursor: none;
}

/* Custom cursor */
body::after {
    content: '';
    position: fixed;
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    box-shadow: var(--glow);
    transition: transform 0.1s;
}

/* Canvas background */
#bg-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -2;
    opacity: 0.4;
}

/* Scanlines */
.scanlines {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.03) 2px,
        rgba(0,0,0,0.03) 4px
    );
    z-index: -1;
    pointer-events: none;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
section { padding: 7rem 0; }

/* ================================
   TYPOGRAPHY
================================ */
.accent { color: var(--accent); }
.blink { animation: blink 1s step-end infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }

/* ================================
   HEADER
================================ */
.header {
    position: fixed; width: 100%; top: 0; left: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}
.header.scrolled {
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.navbar .container {
    display: flex; justify-content: space-between; align-items: center;
}
.logo {
    font-family: var(--font-mono);
    font-size: 1.3rem; font-weight: 700;
    color: #fff; text-decoration: none;
    letter-spacing: -0.5px;
}
.nav-links {
    display: flex; list-style: none; align-items: center; gap: 2.5rem;
}
.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.85rem; font-weight: 400;
    color: var(--muted2); text-decoration: none;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-num { color: var(--accent); margin-right: 4px; font-size: 0.75rem; }
.btn-nav {
    border: 1px solid var(--accent) !important;
    color: var(--accent) !important;
    padding: 8px 20px;
    border-radius: 4px;
    transition: all 0.2s !important;
}
.btn-nav:hover { background: rgba(0,255,170,0.1) !important; }
.burger {
    display: none; flex-direction: column; gap: 5px; cursor: pointer;
}
.burger span {
    display: block; width: 24px; height: 2px;
    background: var(--accent); transition: all 0.3s;
}

/* ================================
   HERO
================================ */
.hero {
    min-height: 100vh;
    display: flex; align-items: center;
    padding-top: 80px;
    position: relative;
}
.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.hero-tag {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.8rem; color: var(--accent);
    border: 1px solid var(--border);
    padding: 6px 14px; border-radius: 20px;
    margin-bottom: 1.5rem;
    background: rgba(0,255,170,0.05);
}
.tag-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}
.hero h1 {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}
.line-one {
    display: block;
    font-size: 4rem;
    color: var(--text);
}
.line-two {
    display: block;
    font-size: 4rem;
    color: var(--text);
}

/* Glitch effect */
.glitch {
    position: relative;
    color: var(--accent);
}
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute; top: 0; left: 0;
    color: var(--accent);
}
.glitch::before {
    animation: glitch1 3s infinite;
    color: var(--accent2);
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}
.glitch::after {
    animation: glitch2 3s infinite;
    color: var(--accent3);
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}
@keyframes glitch1 {
    0%, 90%, 100% { transform: translate(0); opacity: 0; }
    92% { transform: translate(-2px, 1px); opacity: 0.8; }
    94% { transform: translate(2px, -1px); opacity: 0.8; }
    96% { transform: translate(-1px, 2px); opacity: 0; }
}
@keyframes glitch2 {
    0%, 90%, 100% { transform: translate(0); opacity: 0; }
    91% { transform: translate(2px, -1px); opacity: 0.8; }
    93% { transform: translate(-2px, 1px); opacity: 0.8; }
    95% { transform: translate(1px, -2px); opacity: 0; }
}

.hero-sub {
    font-family: var(--font-mono);
    font-size: 0.95rem; color: var(--muted2);
    line-height: 1.8; margin-bottom: 2rem;
    max-width: 520px;
}
.hero-sub strong { color: var(--text); }

/* Terminal */
.terminal-snippet {
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.terminal-bar {
    background: rgba(255,255,255,0.05);
    padding: 10px 16px;
    display: flex; align-items: center; gap: 8px;
    border-bottom: 1px solid var(--border);
}
.t-dot {
    width: 12px; height: 12px; border-radius: 50%;
}
.t-dot.red { background: #ff5f57; }
.t-dot.yellow { background: #febc2e; }
.t-dot.green { background: #28c840; }
.t-title { font-size: 0.75rem; color: var(--muted); margin-left: 8px; }
.terminal-body {
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    min-height: 70px;
}
.t-prompt { color: var(--accent); margin-right: 8px; }
.t-cmd { color: var(--text); }
.t-cursor { color: var(--accent); animation: blink 0.8s step-end infinite; }
.t-output { color: var(--accent2); margin-top: 6px; font-size: 0.8rem; min-height: 20px; }

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85rem; font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}
.btn-primary {
    background: var(--accent);
    color: #000;
    border: none;
}
.btn-primary:hover {
    background: #00cc88;
    box-shadow: var(--glow);
    transform: translateY(-2px);
}
.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* Hero stats */
.hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute; top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    transform: scaleX(0);
    transition: transform 0.3s;
}
.stat-card:hover::before { transform: scaleX(1); }
.stat-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 2.2rem; font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.5rem;
}
.stat-label {
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ================================
   SECTION HEADERS
================================ */
.section-header {
    display: flex; align-items: center; gap: 1.5rem;
    margin-bottom: 4rem;
}
.section-num {
    font-family: var(--font-mono);
    font-size: 0.8rem; color: var(--accent);
    opacity: 0.7;
}
.section-title {
    font-family: var(--font-display);
    font-size: 2.2rem; font-weight: 800;
    color: #fff;
}
.section-line {
    flex: 1; height: 1px;
    background: var(--border);
}

/* ================================
   ABOUT
================================ */
.about { background: var(--bg2); }
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 5rem;
    align-items: start;
}
.about-img-box {
    position: relative;
    width: 260px;
}
.img-placeholder {
    width: 260px; height: 300px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 1rem;
    color: var(--muted);
    font-size: 0.85rem;
}
.img-placeholder i { font-size: 4rem; color: var(--accent); opacity: 0.5; }
.img-border {
    position: absolute;
    top: 12px; left: 12px;
    width: 100%; height: 100%;
    border: 1px solid var(--accent);
    border-radius: 8px;
    z-index: -1;
    opacity: 0.3;
}
.about-badges {
    display: flex; flex-direction: column; gap: 0.6rem;
    margin-top: 1.5rem;
}
.badge {
    font-size: 0.78rem; color: var(--muted2);
    display: flex; align-items: center; gap: 8px;
}
.badge i { color: var(--accent); width: 14px; }
.about-text p {
    color: var(--muted2); line-height: 1.9;
    margin-bottom: 1.2rem; font-size: 0.92rem;
}
.about-text strong { color: var(--accent); }
.about-links { display: flex; gap: 1rem; margin-top: 2rem; }
.social-btn {
    width: 42px; height: 42px;
    border: 1px solid var(--border);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: var(--muted2); text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s;
}
.social-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0,255,170,0.05);
}

/* ================================
   PROJECTS
================================ */
.projects { background: var(--bg); }
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
.project-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
}
.project-card:hover {
    border-color: rgba(0,255,170,0.3);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 30px rgba(0,255,170,0.08);
}
.project-img-wrap {
    position: relative;
    overflow: hidden;
    height: 200px;
}
.project-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    filter: saturate(0.7) brightness(0.7);
}
.project-card:hover .project-img-wrap img {
    transform: scale(1.05);
    filter: saturate(0.9) brightness(0.8);
}
.project-overlay {
    position: absolute; bottom: 0; left: 0;
    padding: 12px 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    width: 100%;
}
.project-tag {
    font-size: 0.72rem; color: var(--accent);
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
}
.wip-badge {
    position: absolute; top: 12px; right: 12px;
    background: rgba(255,107,53,0.2);
    border: 1px solid var(--accent3);
    color: var(--accent3);
    font-size: 0.7rem; padding: 4px 10px;
    border-radius: 20px;
    font-family: var(--font-mono);
}
.project-body { padding: 1.5rem; }
.project-header-row {
    display: flex; justify-content: space-between;
    align-items: flex-start; margin-bottom: 0.8rem;
}
.project-header-row h3 {
    font-family: var(--font-display);
    font-size: 1.1rem; color: #fff;
    font-weight: 700;
}
.project-icon-link {
    color: var(--muted); font-size: 1.1rem;
    text-decoration: none; transition: color 0.2s;
}
.project-icon-link:hover { color: var(--accent); }
.project-body p {
    color: var(--muted2); font-size: 0.85rem;
    line-height: 1.7; margin-bottom: 1rem;
}
.tech-stack {
    display: flex; flex-wrap: wrap; gap: 0.4rem;
    margin-bottom: 1rem;
}
.tech-stack span {
    font-size: 0.72rem; color: var(--accent2);
    border: 1px solid rgba(0,200,255,0.2);
    background: rgba(0,200,255,0.05);
    padding: 3px 10px; border-radius: 3px;
    font-family: var(--font-mono);
}
.project-metrics {
    display: flex; gap: 1rem; flex-wrap: wrap;
}
.project-metrics span {
    font-size: 0.75rem; color: var(--muted);
    display: flex; align-items: center; gap: 5px;
}
.project-metrics i { color: var(--accent); }

/* ================================
   SKILLS
================================ */
.skills { background: var(--bg2); }
.skills-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}
.skill-category {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.8rem;
    transition: border-color 0.3s;
}
.skill-category:hover { border-color: rgba(0,255,170,0.25); }
.cat-title {
    font-family: var(--font-mono);
    font-size: 0.82rem; color: var(--accent);
    text-transform: uppercase; letter-spacing: 0.1em;
    margin-bottom: 1.2rem;
    display: flex; align-items: center; gap: 8px;
}
.cat-title i { font-size: 0.9rem; }
.skill-pills {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.skill-pills span {
    font-size: 0.78rem; color: var(--text);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 5px 12px; border-radius: 4px;
    transition: all 0.2s;
    cursor: default;
}
.skill-pills span:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0,255,170,0.05);
}
.certs-row { margin-top: 1rem; }
.cert-cards {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
.cert-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.2rem;
    text-align: center;
    font-size: 0.8rem; color: var(--muted2);
    transition: all 0.2s;
    display: flex; flex-direction: column;
    align-items: center; gap: 8px;
}
.cert-card i { color: var(--accent); font-size: 1.3rem; }
.cert-card:hover { border-color: var(--accent); color: var(--text); }

/* ================================
   CONTACT
================================ */
.contact { background: var(--bg); }
.contact-inner {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}
.contact-tag {
    font-family: var(--font-mono);
    font-size: 0.8rem; color: var(--accent);
    display: block; margin-bottom: 1rem;
}
.contact-inner h2 {
    font-family: var(--font-display);
    font-size: 3rem; font-weight: 800;
    color: #fff; margin-bottom: 1rem;
}
.contact-inner p {
    color: var(--muted2); font-size: 0.95rem;
    line-height: 1.8; margin-bottom: 2.5rem;
}
.contact-buttons { display: flex; gap: 1rem; justify-content: center; margin-bottom: 3rem; }
.contact-info {
    display: flex; gap: 2rem; justify-content: center;
    flex-wrap: wrap;
}
.contact-info span {
    font-size: 0.8rem; color: var(--muted);
    display: flex; align-items: center; gap: 6px;
}
.contact-info i { color: var(--accent); }

/* ================================
   FOOTER
================================ */
footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
    font-size: 0.8rem; color: var(--muted);
}

/* ================================
   BACK TO TOP
================================ */
.back-to-top {
    position: fixed; bottom: 2rem; right: 2rem;
    width: 44px; height: 44px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent); text-decoration: none;
    font-size: 0.9rem;
    opacity: 0; transform: translateY(20px);
    transition: all 0.3s;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { border-color: var(--accent); box-shadow: var(--glow); }

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 1024px) {
    .hero .container { grid-template-columns: 1fr; }
    .hero-stats { grid-template-columns: repeat(4, 1fr); }
    .line-one, .line-two { font-size: 3rem; }
}
@media (max-width: 768px) {
    .nav-links {
        position: fixed; right: -100%; top: 0;
        background: rgba(3,7,18,0.97);
        height: 100vh; width: 70%;
        flex-direction: column; justify-content: center;
        transition: right 0.4s ease;
        border-left: 1px solid var(--border);
    }
    .nav-links.nav-active { right: 0; }
    .burger { display: flex; }
    .project-grid { grid-template-columns: 1fr; }
    .about-content { grid-template-columns: 1fr; }
    .skills-categories { grid-template-columns: 1fr; }
    .cert-cards { grid-template-columns: repeat(2, 1fr); }
    .hero-stats { grid-template-columns: repeat(2, 1fr); }
    .line-one, .line-two { font-size: 2.2rem; }
    .contact-inner h2 { font-size: 2rem; }
}
