/* ====== Base ====== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --bg: #0a0a1a;
    --bg2: #0f0f24;
    --card: #141430;
    --accent: #f1c40f;
    --accent2: #e67e22;
    --text: #e0e0e0;
    --muted: #888;
    --blue: #3498db;
}
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}
.accent { color: var(--accent); }
.section-inner { max-width: 900px; margin: 0 auto; padding: 80px 24px; }
.section-sub { color: var(--muted); margin-bottom: 40px; text-align: center; font-size: 15px; }
h2 { text-align: center; font-size: 32px; font-weight: 700; margin-bottom: 12px; letter-spacing: -0.5px; }

/* ====== Nav ====== */
#nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(10, 10, 26, 0.85); backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(241, 196, 15, 0.1);
}
.nav-inner {
    max-width: 900px; margin: 0 auto; padding: 14px 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
    font-size: 22px; font-weight: 800; color: #fff; text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
    color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 500;
    transition: color 0.2s; letter-spacing: 0.3px;
}
.nav-links a:hover { color: var(--accent); }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; }

/* ====== Hero ====== */
#hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden; padding: 80px 24px 60px;
}
.hero-bg {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(241, 196, 15, 0.06) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, rgba(52, 152, 219, 0.04) 0%, transparent 50%);
}
.hero-content { position: relative; text-align: center; max-width: 700px; }
.hero-tag {
    font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--accent);
    letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px;
}
#hero h1 { font-size: 52px; font-weight: 800; line-height: 1.1; margin-bottom: 20px; letter-spacing: -1px; }
.hero-sub { font-size: 17px; color: var(--muted); max-width: 520px; margin: 0 auto 36px; line-height: 1.7; }
.hero-sub strong { color: var(--accent); font-weight: 600; }

.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 50px; }
.btn {
    padding: 12px 28px; border-radius: 8px; font-size: 14px; font-weight: 600;
    text-decoration: none; transition: all 0.2s; cursor: pointer; border: none;
}
.btn-primary { background: var(--accent); color: #0a0a1a; }
.btn-primary:hover { background: var(--accent2); transform: translateY(-2px); }
.btn-outline { border: 1.5px solid rgba(255,255,255,0.15); color: #fff; background: transparent; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.hero-stats { display: flex; gap: 48px; justify-content: center; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num { display: block; font-size: 28px; font-weight: 800; color: var(--accent); font-family: 'JetBrains Mono', monospace; }
.stat-label { font-size: 12px; color: var(--muted); letter-spacing: 0.5px; }

/* ====== Game ====== */
#game-section { background: var(--bg2); }
.game-wrapper {
    position: relative; max-width: 820px; margin: 0 auto;
    border: 1px solid rgba(241, 196, 15, 0.15); border-radius: 12px;
    overflow: hidden; background: #000;
}
#game-container { width: 100%; aspect-ratio: 800 / 500; }
#game-container canvas { width: 100% !important; height: 100% !important; display: block; }
.fullscreen-btn {
    position: absolute; top: 10px; right: 10px; z-index: 10;
    background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.15);
    color: #fff; font-size: 18px; padding: 6px 10px; border-radius: 6px;
    cursor: pointer; transition: all 0.2s;
}
.fullscreen-btn:hover { background: var(--accent); color: #0a0a1a; }
.game-hint {
    text-align: center; color: var(--muted); font-size: 12px; margin-top: 16px;
    font-family: 'JetBrains Mono', monospace;
}

/* ====== About ====== */
.about-text p {
    font-size: 15px; line-height: 1.8; color: var(--text); margin-bottom: 18px;
    max-width: 700px; margin-left: auto; margin-right: auto; text-align: center;
}
.about-text p:first-child { font-size: 17px; color: var(--accent); font-weight: 500; font-style: italic; }
.top-skills { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.top-skills-label { width: 100%; text-align: center; font-size: 11px; color: var(--muted); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 6px; }
.top-skill-tag {
    font-size: 13px; font-family: 'JetBrains Mono', monospace;
    background: rgba(241, 196, 15, 0.1); color: var(--accent);
    padding: 6px 16px; border-radius: 20px; border: 1px solid rgba(241, 196, 15, 0.2);
}

/* ====== Timeline ====== */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
    content: ''; position: absolute; left: 8px; top: 0; bottom: 0;
    width: 2px; background: linear-gradient(to bottom, var(--accent), var(--blue), var(--accent));
    opacity: 0.3;
}
.tl-item { position: relative; margin-bottom: 36px; padding-left: 20px; }
.tl-item::before {
    content: ''; position: absolute; left: -28px; top: 6px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--accent); border: 2px solid var(--bg);
}
.tl-period {
    font-family: 'JetBrains Mono', monospace; font-size: 11px;
    color: var(--accent); letter-spacing: 1px; margin-bottom: 4px;
}
.tl-role { font-size: 18px; font-weight: 700; margin-bottom: 2px; }
.tl-company { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.tl-achievements { list-style: none; }
.tl-achievements li {
    font-size: 13px; color: var(--text); padding: 3px 0; padding-left: 16px;
    position: relative;
}
.tl-achievements li::before { content: '→'; position: absolute; left: 0; color: var(--accent); }
.tl-skills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tl-skill {
    font-size: 11px; font-family: 'JetBrains Mono', monospace;
    background: rgba(52, 152, 219, 0.15); color: var(--blue);
    padding: 3px 10px; border-radius: 4px;
}

/* ====== Skills ====== */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.skill-card {
    background: var(--card); border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px; padding: 20px 16px; text-align: center;
    transition: all 0.2s;
}
.skill-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.skill-icon { font-size: 28px; margin-bottom: 8px; }
.skill-name { font-size: 14px; font-weight: 600; }

/* ====== Projects ====== */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.project-card {
    background: var(--card); border: 1px solid rgba(255,255,255,0.05);
    border-radius: 10px; padding: 24px; transition: all 0.2s;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.project-name { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.project-desc { font-size: 13px; color: var(--muted); }

/* ====== Contact ====== */
#contact { background: var(--bg2); }
.contact-card {
    max-width: 400px; margin: 0 auto; background: var(--card);
    border: 1px solid rgba(241, 196, 15, 0.1); border-radius: 12px;
    padding: 30px; text-align: center;
}
.contact-item { padding: 10px 0; font-size: 15px; }
.contact-item a { color: var(--accent); text-decoration: none; }
.contact-item a:hover { text-decoration: underline; }

/* ====== Footer ====== */
footer {
    text-align: center; padding: 30px 24px; font-size: 12px; color: var(--muted);
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* ====== Fullscreen game ====== */
.game-wrapper.fullscreen {
    position: fixed; inset: 0; z-index: 9999; border-radius: 0; border: none;
    max-width: none;
}

/* ====== Mobile ====== */
@media (max-width: 640px) {
    .nav-links { display: none; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: rgba(10,10,26,0.95); padding: 20px; gap: 16px; }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }
    #hero h1 { font-size: 32px; }
    .hero-sub { font-size: 15px; }
    .hero-stats { gap: 24px; }
    .stat-num { font-size: 22px; }
    h2 { font-size: 26px; }
    .section-inner { padding: 50px 16px; }
}

/* ====== Animations ====== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeUp 0.6s ease forwards; }
