/* ================================================================
   ANDREW FIRMANSAPUTRA — PERSONAL PORTFOLIO & WRITING
   High-performance, ultra-clean aesthetic, zero heavy bloat
================================================================ */

:root {
    --bg-main: #07080c;
    --bg-surface: #0e111a;
    --bg-surface-elevated: #151926;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(255, 255, 255, 0.18);

    --accent-emerald: #10b981;
    --accent-emerald-dim: rgba(16, 185, 129, 0.15);
    --accent-cyan: #06b6d4;
    --accent-cyan-dim: rgba(6, 182, 212, 0.15);
    --accent-indigo: #6366f1;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --font-heading: 'Space Grotesk', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --container-width: 1040px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-main);
    color: var(--text-primary);
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(7, 8, 12, 0.8);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
    font-size: 1.15rem;
}

.brand-badge {
    background: linear-gradient(135deg, var(--accent-emerald), var(--accent-cyan));
    color: #000;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    line-height: 1;
}

.site-nav {
    display: flex;
    gap: 1.75rem;
}

.nav-link {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--text-primary);
}

/* Hero Section */
.hero-section {
    padding: 5rem 0 3.5rem;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    background: var(--accent-emerald-dim);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-emerald);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-emerald);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    max-width: 850px;
}

.hero-title .gradient-text {
    background: linear-gradient(120deg, #fff 30%, var(--accent-cyan) 80%, var(--accent-emerald) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin-bottom: 2.25rem;
    line-height: 1.75;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #fff;
    color: #07080c;
}

.btn-primary:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-focus);
}

/* Sections */
.section-wrapper {
    padding: 4rem 0;
    border-top: 1px solid var(--border-subtle);
}

.section-header {
    margin-bottom: 2.5rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 1.75rem;
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
}

.skill-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-focus);
    transform: translateY(-2px);
}

.skill-icon {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.skill-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.skill-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* Post Cards */
.posts-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 2rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.post-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-focus);
}

.post-meta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-emerald);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.post-title {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.post-title a:hover {
    color: var(--accent-cyan);
}

.post-excerpt {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.read-more-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-cyan);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.read-more-link:hover {
    gap: 0.6rem;
}

/* Article Detail */
.article-container {
    max-width: 760px;
    margin: 4rem auto;
    padding: 0 1.5rem;
}

.article-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-subtle);
}

.article-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.25;
    font-weight: 700;
    margin-bottom: 1rem;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.85;
    color: #e2e8f0;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body h2, .article-body h3 {
    font-family: var(--font-heading);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

/* Contact / Connect */
.connect-box {
    background: linear-gradient(180deg, var(--bg-surface-elevated), var(--bg-surface));
    border: 1px solid var(--border-subtle);
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

.connect-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.connect-desc {
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 2rem;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 2.5rem 0;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-tagline {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.system-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    padding: 0.35rem 0.75rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

.status-indicator {
    width: 6px;
    height: 6px;
    background: var(--accent-emerald);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent-emerald);
}

@media (max-width: 768px) {
    .site-nav {
        display: none;
    }
    .footer-container {
        flex-direction: column;
        align-items: flex-start;
    }
}
