:root {
    --bg: #0f1115;
    --bg-soft: #161a21;
    --border: #232933;
    --text: #e6e9ef;
    --muted: #8b93a3;
    --accent: #61b3ff;
    --accent-soft: #1d2b3d;
    --accent2: #7ee0a3;
    --accent2-soft: #14281c;
    --radius: 12px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.page { min-height: 100vh; display: flex; flex-direction: column; }
.container { max-width: 1060px; margin: 0 auto; padding: 0 24px; width: 100%; }

/* ---------------- Hero ---------------- */
.hero {
    background: radial-gradient(1200px 500px at 70% -10%, #1b2331 0%, var(--bg) 60%);
    border-bottom: 1px solid var(--border);
    padding: 96px 24px 88px;
    text-align: center;
}

.hero-title {
    margin: 0;
    font-size: clamp(2.8rem, 6vw, 4.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(120deg, #ffffff, #7fc2ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-tagline {
    margin: 14px 0 6px;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--accent);
}

.hero-sub {
    margin: 0 auto;
    max-width: 560px;
    color: var(--muted);
    font-size: 1.05rem;
}

.hero-links { margin-top: 28px; }

.pill {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 999px;
    background: var(--accent);
    color: #08101a !important;
    font-weight: 600;
    border: none;
    transition: transform 0.15s ease, background 0.2s ease;
}
.pill:hover { background: #74c0ff; transform: translateY(-1px); text-decoration: none; }

/* ---------------- Projects grid ---------------- */
.projects { padding: 64px 0 24px; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.tile {
    display: flex;
    flex-direction: column;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 22px 18px;
    color: var(--text);
    transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    position: relative;
    overflow: hidden;
}
.tile:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    background: #1a2029;
    box-shadow: 0 12px 32px rgba(0,0,0,0.45);
    text-decoration: none;
}
.tile::after {
    content: "→";
    position: absolute;
    right: 18px;
    top: 18px;
    color: var(--accent);
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.tile:hover::after { opacity: 1; transform: translateX(0); }

.tile-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.tile-name { font-size: 1.15rem; font-weight: 600; }
.tile-lang {
    font-size: 0.72rem;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid #2a3e57;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.tile-desc { margin: 10px 0 0; color: var(--muted); font-size: 0.95rem; }

/* ---------------- About ---------------- */
.about { padding: 40px 0 72px; }
.about h2 {
    font-size: 1.4rem;
    margin: 0 0 12px;
    color: var(--text);
}
.about p { color: var(--muted); max-width: 640px; margin: 0; }

/* ---------------- Footer ---------------- */
footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding: 28px 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    background: var(--bg-soft);
}
footer p { margin: 4px 0; }

::selection { background: var(--accent); color: #08101a; }

/* ---------------- Secondary pill (outline) ---------------- */
.pill--ghost {
    background: transparent;
    color: var(--accent) !important;
    border: 1px solid var(--accent);
    margin-left: 10px;
}
.pill--ghost:hover {
    background: var(--accent-soft);
    border-color: #74c0ff;
    transform: translateY(-1px);
}

/* ---------------- Solid alt pill (green) ---------------- */
.pill--alt {
    background: var(--accent2);
    color: #08100b !important;
}
.pill--alt:hover { background: #96eab6; }

/* ---------------- Inner page hero (shorter) ---------------- */
.hero--sub { padding: 72px 24px 60px; }
.hero-tagline--alt { color: var(--accent2); }

/* ---------------- Android / GSI teaser banner ---------------- */
.teaser {
    margin: 48px 0 8px;
    padding: 28px 30px;
    background: linear-gradient(135deg, #15241b 0%, var(--bg-soft) 65%);
    border: 1px solid #24402f;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    flex-wrap: wrap;
}
.teaser h2 { margin: 0 0 6px; font-size: 1.25rem; }
.teaser p { margin: 0; color: var(--muted); max-width: 540px; }
.teaser .pill { flex-shrink: 0; }

/* ---------------- Alt language pill (android page) ---------------- */
.tile-lang--alt {
    color: var(--accent2);
    background: var(--accent2-soft);
    border-color: #2b4a36;
}

@media (max-width: 640px) {
    .hero { padding: 64px 24px 56px; }
    .hero--sub { padding: 56px 24px 48px; }
    .grid { grid-template-columns: 1fr; }
}
