/* ==========================================================================
   ENES CİVELEK — MONOKROM EDITORIAL v3
   Saf Siyah-Beyaz · Büyük Tipografi · Galeri Tarzı
   Inspired by Apple / Stripe / Rauno.me
   ========================================================================== */

/* ─── Design Tokens ─── */
:root {
    --bg: #050505;
    --bg-elevated: #0c0c0c;
    --bg-card: #111111;
    --bg-hover: #181818;

    --border: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(255, 255, 255, 0.14);

    --text-primary: #f5f5f5;
    --text-secondary: #888888;
    --text-tertiary: #555555;
    --text-ghost: #333333;

    --white: #ffffff;
    --black: #000000;

    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --fast: 120ms;
    --normal: 250ms;
    --slow: 600ms;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

/* ─── Light Theme ─── */
[data-theme="light"] {
    --bg: #fafafa;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f0f0f0;

    --border: rgba(0, 0, 0, 0.06);
    --border-hover: rgba(0, 0, 0, 0.12);

    --text-primary: #0a0a0a;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --text-ghost: #cccccc;

    --white: #000000;
    --black: #ffffff;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background: var(--bg);
}

body {
    font-family: var(--font-display);
    color: var(--text-primary);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--text-primary);
    color: var(--bg);
}

::-webkit-scrollbar { width: 0; }

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ─── Layout ─── */
.w {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ─── Scroll Progress ─── */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 1px;
    width: 0%;
    background: var(--text-primary);
    z-index: 10000;
    transition: width 80ms linear;
}

/* ==========================================================================
   Reveal Animations
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }

/* ==========================================================================
   Navigation
   ========================================================================== */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    padding: 1.25rem 0;
    transition: all var(--normal) var(--ease);
}

.site-nav.scrolled {
    padding: 0.65rem 0;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border);
}

[data-theme="light"] .site-nav.scrolled {
    background: rgba(250, 250, 250, 0.8);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.logo-mark {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--text-primary);
    color: var(--bg);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

/* Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
}

.nav-links a {
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-tertiary);
    border-radius: var(--radius-full);
    transition: color var(--fast), background var(--fast);
    letter-spacing: -0.01em;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* Nav Controls */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: var(--font-display);
    transition: all var(--fast);
}

.nav-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: var(--bg-hover);
}

.mobile-toggle { display: none; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 10rem 0 6rem;
    position: relative;
}

.hero-content {
    max-width: 720px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.85rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    letter-spacing: 0.02em;
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
    animation: pulse-dot 2.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.hero h1 {
    font-size: clamp(3.2rem, 7vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 0.95;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.hero-role {
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 400;
    color: var(--text-tertiary);
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.75;
    max-width: 560px;
    margin-bottom: 2.5rem;
}

.hero-cta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.6rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.88rem;
    font-family: var(--font-display);
    cursor: pointer;
    border: none;
    transition: all var(--normal) var(--ease);
    letter-spacing: -0.01em;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .btn-primary:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    border-color: var(--border-hover);
    background: var(--bg-hover);
    transform: translateY(-2px);
}

/* Social */
.social-row {
    display: flex;
    gap: 0.5rem;
}

.social-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-tertiary);
    display: grid;
    place-items: center;
    font-size: 1.05rem;
    transition: all var(--fast);
}

.social-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: var(--bg-hover);
    transform: translateY(-2px);
}

/* ─── Right Hero Card ─── */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 5rem;
    align-items: center;
}

.hero-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    overflow: hidden;
}

.hero-card-header {
    padding: 1.4rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.hero-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: grid;
    place-items: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.hero-card-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.hero-card-header p {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 1px;
}

.spec-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid var(--border);
    transition: background var(--fast);
}

.spec-row:last-child { border-bottom: none; }
.spec-row:hover { background: var(--bg-hover); }

.spec-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-tertiary);
}

.spec-val {
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.spec-val.status { color: #22c55e; }

/* ==========================================================================
   Metrics Strip
   ========================================================================== */
.metrics {
    padding: 2rem 0 5rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.metric-item {
    background: var(--bg-card);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: background var(--normal);
}

.metric-item:hover {
    background: var(--bg-hover);
}

.metric-num {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    font-family: var(--font-display);
    color: var(--text-primary);
}

.metric-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-top: 0.3rem;
    letter-spacing: 0.01em;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
    padding: 6rem 0;
}

.section-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.1;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 580px;
    line-height: 1.75;
    margin-bottom: 3rem;
}

/* Divider */
.section + .section {
    border-top: 1px solid var(--border);
}

/* ==========================================================================
   About Pillars
   ========================================================================== */
.pillars-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.pillars-grid.pillars-3 {
    grid-template-columns: repeat(3, 1fr);
}

.pillar {
    background: var(--bg-card);
    padding: 2.5rem;
    transition: background var(--normal);
}

.pillar:hover { background: var(--bg-hover); }

.pillar-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: grid;
    place-items: center;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.pillar h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.85rem;
    letter-spacing: -0.02em;
}

.pillar p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.pillar p + p { margin-top: 0.85rem; }

.edu-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.edu-block {
    margin-top: 0;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    transition: border-color var(--normal);
}

.edu-block:hover {
    border-color: var(--border-hover);
}

.edu-date {
    font-size: 0.68rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.edu-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.2rem;
}

.edu-school {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.cert-list {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.85;
    margin-top: 0.75rem;
}

.about-values {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 1.25rem;
}

/* ==========================================================================
   Career Timeline
   ========================================================================== */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.timeline-card {
    padding: 1.75rem 2rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    transition: background var(--normal);
}

.timeline-card:last-child { border-bottom: none; }
.timeline-card:hover { background: var(--bg-hover); }

.timeline-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.timeline-role {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.timeline-company {
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: 0.15rem;
}

.timeline-date {
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.timeline-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.timeline-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.timeline-bullets li {
    position: relative;
    padding-left: 1.25rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.timeline-bullets li::before {
    content: "•";
    position: absolute;
    left: 0.2rem;
    top: 0;
    color: var(--text-tertiary);
    font-weight: 700;
}

/* ==========================================================================
   Projects
   ========================================================================== */
.filter-row {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-tertiary);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: var(--font-display);
    cursor: pointer;
    transition: all var(--fast);
    letter-spacing: -0.01em;
}

.filter-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: var(--bg-hover);
}

.filter-btn.active {
    background: var(--text-primary);
    color: var(--bg);
    border-color: transparent;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.project-card {
    background: var(--bg-card);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 240px;
    transition: background var(--normal);
}

.project-card:hover { background: var(--bg-hover); }

.project-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.project-badge {
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.project-gh {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--text-tertiary);
    display: grid;
    place-items: center;
    font-size: 0.85rem;
    transition: all var(--fast);
}

.project-gh:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.project-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.project-card .desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.tag {
    font-size: 0.65rem;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    padding: 0.18rem 0.45rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    transition: color var(--fast);
    letter-spacing: 0.01em;
}

.tag:hover { color: var(--text-secondary); }

/* ==========================================================================
   Skills
   ========================================================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.skill-card {
    background: var(--bg-card);
    padding: 1.75rem;
    transition: background var(--normal);
}

.skill-card:hover { background: var(--bg-hover); }

.skill-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.skill-heading i {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.1;
}

.contact-info > p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.75;
}

.channels {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.channel-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    transition: background var(--normal);
}

.channel-link:last-child { border-bottom: none; }
.channel-link:hover { background: var(--bg-hover); }

.channel-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: grid;
    place-items: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.channel-link .meta {
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-ghost);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.channel-link .value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 1px;
    letter-spacing: -0.01em;
}

/* Form */
.form-frame {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    background: var(--bg-card);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

.form-group label .req { color: #ef4444; }

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--fast);
}

.form-input:focus {
    border-color: var(--text-tertiary);
}

.form-input::placeholder {
    color: var(--text-ghost);
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

/* ==========================================================================
   Toast
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    transition: all var(--normal) var(--ease);
}

.toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast.success { border-left: 3px solid #22c55e; }
.toast.success i { color: #22c55e; }
.toast.error { border-left: 3px solid #ef4444; }
.toast.error i { color: #ef4444; }

/* Back to Top */
.back-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: all var(--normal) var(--ease);
    font-size: 0.85rem;
}

.back-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-top:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.footer-links {
    display: flex;
    gap: 1.25rem;
}

.footer-links a {
    color: var(--text-tertiary);
    font-weight: 500;
    transition: color var(--fast);
}

.footer-links a:hover { color: var(--text-primary); }

/* ==========================================================================
   Blog
   ========================================================================== */
.blog-hero {
    padding: 8rem 0 2rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.blog-card {
    background: var(--bg-card);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 260px;
    transition: background var(--normal);
}

.blog-card:hover { background: var(--bg-hover); }

.blog-date {
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.blog-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.blog-card .desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.blog-read-more {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.blog-empty {
    text-align: center;
    padding: 5rem 1rem;
    color: var(--text-secondary);
}

/* ─── Post Detail ─── */
.post-content {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-secondary);
}

.post-content h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    margin: 2.5rem 0 1rem;
}

.post-content h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    letter-spacing: -0.01em;
    margin: 2rem 0 0.85rem;
}

.post-content p { margin-bottom: 1.25rem; }
.post-content ul, .post-content ol { margin: 0 0 1.25rem 1.5rem; }
.post-content li { margin-bottom: 0.5rem; }

.post-content a {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-content code {
    font-family: var(--font-mono);
    background: var(--bg-card);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--text-primary);
}

.post-content pre {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.post-content pre code { background: none; padding: 0; }

.post-content blockquote {
    border-left: 3px solid var(--border-hover);
    padding-left: 1.25rem;
    color: var(--text-tertiary);
    font-style: italic;
    margin: 1.5rem 0;
}

.post-content img {
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    width: 100%;
}

.post-cta {
    max-width: 760px;
    margin: 3rem auto 0;
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
}

.post-cta p { color: var(--text-secondary); margin-bottom: 1rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .hero-card { max-width: 440px; }
    .hero { padding: 8rem 0 4rem; }
    .pillars-grid.pillars-3 { grid-template-columns: 1fr; }
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .skills-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 768px) {
    .w { padding: 0 1.25rem; }

    .nav-links {
        position: fixed;
        top: 56px;
        left: 0;
        width: 100%;
        background: var(--bg-elevated);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem;
        gap: 0.15rem;
        transform: translateY(-110%);
        opacity: 0;
        pointer-events: none;
        transition: all var(--normal) var(--ease);
        z-index: 998;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-toggle { display: grid; }

    .hero { min-height: auto; padding: 7rem 0 3rem; }
    .hero h1 { font-size: 2.6rem; }
    .hero-cta { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
    .pillars-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { flex-direction: column; align-items: center; text-align: center; }
    .section { padding: 4rem 0; }
    .post-content { font-size: 1rem; }
}

@media (max-width: 480px) {
    .metrics-grid { grid-template-columns: 1fr 1fr; }
    .hero h1 { font-size: 2.2rem; }
}