/* ============ RESET & VARS ============ */
:root {
    --bg: #0a0c10;
    --bg-alt: #0e1117;
    --surface: #141821;
    --surface-2: #1a1f2b;
    --border: #232938;
    --text: #e8ebf2;
    --text-dim: #9aa3b5;
    --text-mute: #6b7486;
    --accent: #6ee7c7;
    --accent-2: #7c9cff;
    --accent-grad: linear-gradient(100deg, #6ee7c7 0%, #7c9cff 100%);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --radius: 14px;
    --maxw: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.grad { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 13px 24px; border-radius: 10px;
    font-weight: 600; font-size: 14px; letter-spacing: -0.01em;
    transition: all .25s ease; cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #07120e; }
.btn-primary:hover { background: #8ff0d6; transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(110,231,199,.45); }
.btn-ghost { color: var(--text); border-color: var(--border); background: transparent; }
.btn-ghost:hover { border-color: var(--text-mute); background: var(--surface); }
.btn-outline { color: var(--text); border-color: var(--border); background: transparent; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 16px 32px; font-size: 15px; }
.arrow { transition: transform .25s ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* ============ NAV ============ */
.nav { position: fixed; top: 0; width: 100%; z-index: 100; transition: all .3s ease; padding: 20px 0; }
.nav.scrolled { background: rgba(10,12,16,.85); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); padding: 14px 0; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.03em; }
.brand-mark { position: relative; width: 24px; height: 24px; border: 2px solid var(--accent); border-radius: 7px; display: flex; align-items: center; justify-content: center; transform: rotate(-20deg); }
.brand-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 12px var(--accent); }
.brand-sep { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 34px; font-size: 14px; font-weight: 500; }
.nav-links a:not(.nav-cta) { color: var(--text-dim); transition: color .2s; }
.nav-links a:not(.nav-cta):hover { color: var(--text); }
.nav-cta { padding: 9px 18px; border: 1px solid var(--border); border-radius: 8px; transition: all .2s; }
.nav-cta:hover { border-color: var(--accent); color: var(--accent); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all .2s; }

/* ============ HERO ============ */
.hero { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 120px 0 80px; overflow: hidden; }
.hero-glow { position: absolute; width: 700px; height: 700px; top: -200px; right: -150px; background: radial-gradient(circle, rgba(124,156,255,.10) 0%, rgba(110,231,199,.05) 40%, transparent 70%); pointer-events: none; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 24px; }
.pulse { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 0 rgba(110,231,199,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(110,231,199,.5); } 70% { box-shadow: 0 0 0 10px rgba(110,231,199,0); } 100% { box-shadow: 0 0 0 0 rgba(110,231,199,0); } }
.hero h1 { font-size: clamp(2.6rem, 5.2vw, 4.4rem); line-height: 1.08; letter-spacing: -0.045em; font-weight: 800; margin-bottom: 24px; }
.hero-sub { color: var(--text-dim); font-size: 17px; max-width: 540px; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-meta { display: flex; gap: 44px; }
.meta-item { display: flex; flex-direction: column; }
.meta-item strong { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
.meta-item span { font-size: 12px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }

/* code card */
.hero-visual { display: flex; justify-content: center; }
.code-card { width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 80px -30px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.02) inset; transform: perspective(1000px) rotateY(-6deg) rotateX(3deg); transition: transform .5s ease; }
.code-card:hover { transform: perspective(1000px) rotateY(0) rotateX(0); }
.code-head { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.code-title { margin-left: 12px; font-family: var(--mono); font-size: 12px; color: var(--text-mute); }
.code-card pre { padding: 22px 20px; overflow-x: auto; font-family: var(--mono); font-size: 11.5px; line-height: 1.85; color: #c8d0e0; }
.c-key { color: #ff7ab2; } .c-fn { color: #7c9cff; } .c-str { color: #8ee0a8; } .c-com { color: #5f6b7f; font-style: italic; } .c-num { color: #ffb86b; } .c-typ { color: #6ee7c7; }
.scroll-hint { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--text-mute); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.scroll-hint span { width: 1px; height: 30px; background: linear-gradient(var(--accent), transparent); animation: scrollLine 2s infinite; }
@keyframes scrollLine { 0%,100% { opacity: .3; transform: scaleY(.6); } 50% { opacity: 1; transform: scaleY(1); } }

/* ============ TICKER ============ */
.ticker { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-alt); overflow: hidden; padding: 16px 0; }
.ticker-track { display: flex; gap: 36px; white-space: nowrap; width: max-content; animation: ticker 30s linear infinite; }
.ticker-track span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--text-mute); }
.ticker-track .tick-sep { color: var(--accent); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ============ SECTIONS ============ */
.section { padding: 110px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 50px; gap: 30px; }
.section-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--accent); margin-bottom: 16px; }
.section h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.04em; line-height: 1.15; font-weight: 800; margin-bottom: 14px; }
.section-desc { color: var(--text-dim); max-width: 560px; font-size: 15px; }
.text-link { color: var(--text-dim); font-size: 14px; font-weight: 500; white-space: nowrap; transition: color .2s; }
.text-link:hover { color: var(--accent); }
.text-link span { margin-left: 5px; }
.center { text-align: center; margin-top: 50px; }

/* ============ ARTICLES ============ */
.articles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; transition: all .3s ease; cursor: pointer; display: flex; flex-direction: column; }
.article:hover { border-color: rgba(110,231,199,.35); transform: translateY(-5px); background: var(--surface-2); }
.article-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.article-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; padding: 5px 10px; border-radius: 6px; background: rgba(110,231,199,.08); color: var(--accent); border: 1px solid rgba(110,231,199,.15); }
.article-date { font-size: 12px; color: var(--text-mute); }
.article h3 { font-size: 18px; letter-spacing: -0.02em; line-height: 1.4; margin-bottom: 12px; font-weight: 700; }
.article p { color: var(--text-dim); font-size: 13.5px; flex: 1; margin-bottom: 22px; }
.article-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 18px; }
.read-time { font-size: 12px; color: var(--text-mute); }
.article-link { font-size: 13px; color: var(--text); font-weight: 500; }
.article:hover .article-link { color: var(--accent); }
.article-link span { margin-left: 6px; transition: transform .2s; display: inline-block; }
.article:hover .article-link span { transform: translateX(4px); }

/* ============ PROJECTS ============ */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.project { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; transition: all .3s; position: relative; overflow: hidden; }
.project:hover { border-color: rgba(124,156,255,.35); transform: translateY(-4px); }
.project-icon { width: 46px; height: 46px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 22px; }
.project h3 { font-size: 19px; letter-spacing: -0.02em; margin-bottom: 10px; }
.project p { color: var(--text-dim); font-size: 14px; margin-bottom: 22px; }
.project-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.ptag { font-family: var(--mono); font-size: 10px; color: var(--text-mute); padding: 4px 9px; border: 1px solid var(--border); border-radius: 5px; }
.project-status { position: absolute; top: 28px; right: 28px; display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; color: var(--text-mute); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ============ ABOUT ============ */
.about-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 80px; align-items: center; }
.about-left h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 24px; }
.about-left p { color: var(--text-dim); margin-bottom: 18px; font-size: 15px; max-width: 600px; }
.about-left .btn { margin-top: 16px; }
.stack-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.stack-card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-mute); margin-bottom: 22px; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag { font-family: var(--mono); font-size: 12px; padding: 7px 13px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); transition: all .2s; }
.tag:hover { border-color: var(--accent); color: var(--accent); }
.stack-note { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-dim); display: flex; gap: 12px; line-height: 1.6; }
.stack-note-icon { color: var(--accent); font-size: 16px; }

/* ============ CONTACT ============ */
.contact { text-align: center; background: radial-gradient(ellipse at center, rgba(124,156,255,.06) 0%, transparent 60%); }
.contact-inner { display: flex; flex-direction: column; align-items: center; }
.contact .section-label { margin-bottom: 20px; }
.contact h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 18px; }
.contact p { color: var(--text-dim); font-size: 16px; max-width: 520px; margin-bottom: 34px; }

/* ============ FOOTER ============ */
.footer { border-top: 1px solid var(--border); padding: 40px 0; background: var(--bg-alt); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer p { color: var(--text-mute); font-size: 12px; }
.footer-links { display: flex; gap: 22px; font-size: 13px; color: var(--text-dim); }
.footer-links a:hover { color: var(--accent); }

/* ============ REVEAL ANIM ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; gap: 50px; }
    .hero-visual { display: none; }
    .articles { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: 1fr; gap: 50px; }
    .nav-toggle { display: flex; }
    .nav-links { position: absolute; top: 100%; left: 0; width: 100%; background: var(--bg-alt); border-bottom: 1px solid var(--border); flex-direction: column; gap: 0; padding: 0; max-height: 0; overflow: hidden; transition: max-height .3s ease; }
    .nav-links.open { max-height: 400px; }
    .nav-links li { width: 100%; }
    .nav-links a { display: block; padding: 16px 32px; border-bottom: 1px solid var(--border); }
    .nav-cta { border: none !important; }
}
@media (max-width: 640px) {
    .container { padding: 0 20px; }
    .articles, .projects { grid-template-columns: 1fr; }
    .hero-meta { gap: 24px; }
    .section { padding: 80px 0; }
    .section-head { flex-direction: column; align-items: flex-start; }
    .footer-inner { flex-direction: column; text-align: center; }
}
