/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #08080d;
    --bg-card: #0e0e16;
    --bg-card-hover: #141420;
    --border: #1a1a2a;
    --border-hover: #2a2a40;
    --text: #b8b8cc;
    --text-dim: #a5a5bc;
    --text-bright: #eeeef5;
    --accent: #6c9bff;
    --accent2: #a78bfa;
    --accent3: #22d3ee;
    --accent-glow: rgba(108, 155, 255, 0.12);
    --green: #4ade80;
    --yellow: #facc15;
    --red: #f87171;
    --orange: #fb923c;
    --purple: #a78bfa;
    --cyan: #22d3ee;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

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

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--text-bright); }
code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: rgba(108, 155, 255, 0.08);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    color: var(--accent);
}

.container { max-width: 960px; margin: 0 auto; padding: 0 24px; }

/* ── Canvas BG ── */
#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ── Header ── */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8, 8, 13, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}
.header .container { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-img { flex-shrink: 0; }
.logo-text {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}
.logo-visor { color: #2aabe0; }
.logo-craft { color: var(--text-bright); }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a { color: var(--text-dim); font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.nav a:hover { color: var(--text-bright); }
.nav-github { display: flex; align-items: center; gap: 6px; }

/* ── Hero ── */
.hero {
    padding: 120px 0 80px;
    position: relative;
    z-index: 1;
    text-align: center;
}

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

.hero-glyph {
    margin-bottom: 32px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.hero-title {
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--text-bright);
    line-height: 1.15;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-bright) 0%, var(--accent) 50%, var(--accent2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 32px;
}

.hero-prompt {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 8px;
}
.prompt { color: var(--green); }
.cmd { color: var(--accent); }
.arg { color: var(--yellow); }
.cursor { color: var(--text-dim); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ── Section Title ── */
.projects {
    padding: 20px 0 100px;
    position: relative;
    z-index: 1;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 40px;
}
.section-line { flex: 1; height: 1px; background: var(--border); }

/* ── Project Cards ── */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 20px;
    transition: border-color 0.3s, background 0.3s, transform 0.2s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}
.project-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

/* Featured card */
.project-card.featured {
    border-color: rgba(108, 155, 255, 0.2);
}
.project-card.featured:hover {
    border-color: rgba(108, 155, 255, 0.35);
}
.project-accent-bar,
.project-card::after {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent3));
}
.project-card::after {
    content: '';
    opacity: 0;
    transition: opacity 0.3s;
}
.project-card:hover::after {
    opacity: 1;
}
.project-card.featured::after {
    display: none;
}

.project-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}
.project-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.project-name { font-size: 1.2rem; font-weight: 700; color: var(--text-bright); }

.project-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dim);
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}
.project-link:hover { color: var(--accent); border-color: var(--accent); }
.project-links-dual { display: flex; gap: 8px; }

.project-tagline {
    font-size: 1.05rem;
    color: var(--text-bright);
    font-weight: 500;
    margin-bottom: 8px;
}
.project-desc {
    color: var(--text-dim);
    font-size: 0.92rem;
    margin-bottom: 16px;
    line-height: 1.7;
}
.project-desc a { color: var(--accent); }
.project-desc a:hover { text-decoration: underline; }

.project-features { display: flex; flex-wrap: wrap; gap: 8px; }
.project-features span {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ── Badges ── */
.badge {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.badge-windows { background: rgba(108, 155, 255, 0.1); color: var(--accent); }
.badge-kernel { background: rgba(251, 146, 60, 0.1); color: var(--orange); }
.badge-browser { background: rgba(251, 146, 60, 0.1); color: var(--orange); }
.badge-web { background: rgba(34, 211, 238, 0.1); color: var(--cyan); }
.badge-android { background: rgba(74, 222, 128, 0.1); color: var(--green); }
.badge-lang { background: rgba(167, 139, 250, 0.1); color: var(--purple); }

/* ── Footer ── */
.footer {
    border-top: 1px solid var(--border);
    padding: 48px 0;
    position: relative;
    z-index: 1;
}
.footer-content { text-align: center; }
.footer-text {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 8px;
    font-style: italic;
}
.footer-copy { font-size: 0.8rem; color: var(--text-dim); opacity: 0.4; }

/* ── Animations ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.project-card:nth-child(1) { animation: fadeUp 0.5s ease both 0s; }
.project-card:nth-child(2) { animation: fadeUp 0.5s ease both 0.06s; }
.project-card:nth-child(3) { animation: fadeUp 0.5s ease both 0.12s; }
.project-card:nth-child(4) { animation: fadeUp 0.5s ease both 0.18s; }
.project-card:nth-child(5) { animation: fadeUp 0.5s ease both 0.24s; }

.hero-glyph { animation: fadeUp 0.6s ease both 0s, float 6s ease-in-out 0.6s infinite; }
.hero-title { animation: fadeUp 0.6s ease both 0.1s; }
.hero-sub { animation: fadeUp 0.6s ease both 0.2s; }
.hero-prompt { animation: fadeUp 0.6s ease both 0.3s; }

/* ── Responsive ── */
@media (max-width: 640px) {
    .hero { padding: 80px 0 40px; }
    .hero-title { font-size: 1.8rem; }
    .hero-glyph svg { width: 60px; height: 60px; }
    .project-card { padding: 24px 20px; }
    .project-header { flex-direction: column; }
    .section-title { font-size: 0.75rem; }
}
