/* ═══════════════════════════════════════════════════════════════════════════
   Alex Chen · Portfolio · style.css
   Theme: Editorial Data — refined dark-first with precise typographic grid
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── CSS Custom Properties ──────────────────────────────────────────────── */
:root {
    /* Dark theme (default) */
    --bg: #0d1117;
    --bg-2: #161b22;
    --bg-3: #1c2433;
    --border: rgba(255, 255, 255, 0.07);
    --border-mid: rgba(255, 255, 255, 0.12);
    --text: #e8ecf0;
    --text-muted: #8b98a8;
    --text-dim: #4d5c6e;
    --accent: #3b82f6;
    /* blue — data / trust */
    --accent-2: #10b981;
    /* green — positive / growth */
    --accent-warm: #f59e0b;
    /* amber — highlight */
    --accent-glow: rgba(59, 130, 246, 0.18);
    --card-bg: #161b22;
    --card-hover: #1c2433;
    --nav-bg: rgba(13, 17, 23, 0.85);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.6);
    --radius: 10px;
    --radius-lg: 18px;
    --font-display: 'Syne', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --font-body: 'DM Sans', sans-serif;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg: #f5f7fa;
    --bg-2: #ffffff;
    --bg-3: #edf1f6;
    --border: rgba(0, 0, 0, 0.07);
    --border-mid: rgba(0, 0, 0, 0.13);
    --text: #111827;
    --text-muted: #4b5563;
    --text-dim: #9ca3af;
    --accent: #2563eb;
    --accent-2: #059669;
    --accent-warm: #d97706;
    --accent-glow: rgba(37, 99, 235, 0.1);
    --card-bg: #ffffff;
    --card-hover: #f0f4f9;
    --nav-bg: rgba(245, 247, 250, 0.9);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.15);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    transition: background var(--transition), color var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

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

a:hover {
    color: var(--accent-2);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: var(--font-body);
}

/* ─── Container ──────────────────────────────────────────────────────────── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.75rem 1.6rem;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-transform: uppercase;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: #2563eb;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent-glow);
    color: var(--accent);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.75rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ─── Section common styles ──────────────────────────────────────────────── */
section {
    padding: 96px 0;
    position: relative;
}

.section-header {
    margin-bottom: 3.5rem;
    text-align: center;
}

.section-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--text);
}

.section-sub {
    margin-top: 0.75rem;
    color: var(--text-muted);
    font-size: 1rem;
}

/* Utility */
.hidden {
    display: none !important;
}

/* ─── NAVBAR ─────────────────────────────────────────────────────────────── */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition), box-shadow var(--transition);
}

#navbar.scrolled {
    box-shadow: var(--shadow);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.05em;
}

.logo-bracket {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: all var(--transition);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: var(--border);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#theme-toggle {
    background: none;
    border: 1.5px solid var(--border-mid);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all var(--transition);
}

#theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Hamburger */
#hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 6px;
}

#hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition);
}

#hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#hamburger.open span:nth-child(2) {
    opacity: 0;
}

#hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
#mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
}

#mobile-menu.open {
    display: block;
}

#mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#mobile-menu .nav-link {
    display: block;
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
}

#mobile-menu .btn {
    margin-top: 0.75rem;
}

/* ─── HERO ───────────────────────────────────────────────────────────────── */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 2rem 80px;
    position: relative;
    overflow: hidden;
}

/* Grid background pattern */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.4;
    pointer-events: none;
}

/* Gradient fade at bottom */
#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(transparent, var(--bg));
    pointer-events: none;
}

.hero-grid {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-2);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-2);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.8);
    }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 1rem;
    color: var(--text);
}

.hero-name {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.typed-word {
    color: var(--accent-warm);
    font-weight: 700;
}

.cursor {
    color: var(--accent);
    animation: blink 1s step-end infinite;
    font-weight: 300;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hero-bio {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 480px;
    margin-bottom: 2.25rem;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

/* Hero stats */
.hero-stats {
    display: flex;
    gap: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.stat {
    text-align: left;
}

.stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.2rem;
    display: block;
}

/* Profile blob */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-blob-wrapper {
    position: relative;
    width: 380px;
    height: 380px;
}

.profile-blob {
    width: 100%;
    height: 100%;
    border-radius: 60% 40% 55% 45% / 45% 55% 40% 60%;
    overflow: hidden;
    background: var(--bg-3);
    border: 2px solid var(--border-mid);
    box-shadow: var(--shadow-lg), 0 0 80px var(--accent-glow);
    animation: blob-morph 8s ease-in-out infinite;
    transition: box-shadow var(--transition);
}

.profile-blob:hover {
    box-shadow: var(--shadow-lg), 0 0 120px var(--accent-glow);
}

@keyframes blob-morph {

    0%,
    100% {
        border-radius: 60% 40% 55% 45% / 45% 55% 40% 60%;
    }

    25% {
        border-radius: 50% 50% 40% 60% / 60% 40% 55% 45%;
    }

    50% {
        border-radius: 40% 60% 50% 50% / 50% 45% 60% 40%;
    }

    75% {
        border-radius: 55% 45% 60% 40% / 40% 60% 45% 55%;
    }
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Floating badges */
.float-badge {
    position: absolute;
    background: var(--card-bg);
    border: 1px solid var(--border-mid);
    padding: 0.5rem 0.9rem;
    border-radius: 50px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: var(--shadow);
    animation: float 4s ease-in-out infinite;
    white-space: nowrap;
}

.badge-python {
    top: 5%;
    right: -10%;
    animation-delay: 0s;
}

.badge-sql {
    bottom: 20%;
    right: -12%;
    animation-delay: 1.2s;
}

.badge-ml {
    bottom: 5%;
    left: -8%;
    animation-delay: 0.6s;
}

.badge-github {
    bottom: 75%;
    left: -8%;
    animation-delay: 0.6s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-dim);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    z-index: 1;
    animation: scroll-hint-fade 2.5s ease-in-out infinite;
}

.scroll-arrow {
    width: 1px;
    height: 32px;
    background: linear-gradient(var(--accent), transparent);
}

@keyframes scroll-hint-fade {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

/* ─── ABOUT ──────────────────────────────────────────────────────────────── */
#about {
    background: var(--bg-2);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    line-height: 1.85;
}

.about-text strong {
    color: var(--text);
}

.about-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.detail-card {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    transition: all var(--transition);
}

.detail-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.detail-icon {
    font-size: 1.3rem;
    line-height: 1;
    margin-top: 0.15rem;
}

.detail-card strong {
    display: block;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.3rem;
}

.detail-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ─── SKILLS ─────────────────────────────────────────────────────────────── */
#skills {
    background: var(--bg);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 3.5rem;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform: scaleX(0);
    transition: transform var(--transition);
    transform-origin: left;
}

.skill-card:hover {
    border-color: var(--border-mid);
    background: var(--card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.skill-card:hover::before {
    transform: scaleX(1);
}

.skill-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.skill-icon {
    font-size: 1.5rem;
}

.skill-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.skill-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.1rem;
}

.skill-bar {
    height: 4px;
    background: var(--bg-3);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.skill-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 2px;
    width: 0%;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-level {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Chart */
.chart-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 520px;
    margin: 0 auto;
}

.chart-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
}

/* ─── PROJECTS ───────────────────────────────────────────────────────────── */
#projects {
    background: var(--bg-2);
}

.project-filters {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.filter-btn {
    background: transparent;
    border: 1.5px solid var(--border-mid);
    color: var(--text-muted);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 3rem;
}

/* Project card */
.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow), 0 0 24px var(--accent-glow);
}

.project-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.project-icon {
    font-size: 1.4rem;
}

.project-links {
    display: flex;
    gap: 0.5rem;
}

.project-link {
    color: var(--text-dim);
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all var(--transition);
    font-family: var(--font-mono);
}

.project-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.project-name {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.project-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-lang {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 0.25rem 0.6rem;
    background: var(--bg-3);
    border-radius: 4px;
    color: var(--text-muted);
}

.project-stars,
.project-forks {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

/* Skeleton loader */
.project-skeleton {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    height: 200px;
    position: relative;
    overflow: hidden;
}

.project-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--border-mid) 50%,
            transparent 100%);
    animation: shimmer 1.5s ease-in-out infinite;
    transform: translateX(-100%);
}

@keyframes shimmer {
    to {
        transform: translateX(100%);
    }
}

.projects-error {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.88rem;
}

.projects-cta {
    text-align: center;
}

/* ─── BLOG ───────────────────────────────────────────────────────────────── */
#blog {
    background: var(--bg);
}

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Blog item — alternating layout */
.blog-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
    background: var(--card-bg);
    transition: all var(--transition);
    cursor: pointer;
}

.blog-item:hover {
    border-color: var(--border-mid);
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

/* Even items: image on right */
.blog-item.reverse {
    direction: rtl;
}

.blog-item.reverse>* {
    direction: ltr;
}

.blog-img {
    position: relative;
    overflow: hidden;
    min-height: 260px;
}

.blog-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-item:hover .blog-img img {
    transform: scale(1.04);
}

.blog-img-placeholder {
    width: 100%;
    height: 100%;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    background: var(--bg-3);
}

.blog-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.85rem;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.blog-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    background: var(--accent-glow);
    color: var(--accent);
    border: 1px solid var(--accent);
}

.blog-date {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-dim);
}

.blog-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.25;
}

.blog-summary {
    font-size: 0.93rem;
    color: var(--text-muted);
    line-height: 1.75;
}

.blog-read-more {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap var(--transition);
    margin-top: 0.5rem;
}

.blog-item:hover .blog-read-more {
    gap: 0.8rem;
}

/* ─── MODAL ──────────────────────────────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
}

.modal-overlay.open {
    display: flex;
}

.modal-box {
    background: var(--bg-2);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius-lg);
    max-width: 760px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 3rem;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modal-enter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modal-enter {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(16px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Modal inner content */
.modal-header {
    margin-bottom: 1.5rem;
}

.modal-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    background: var(--accent-glow);
    color: var(--accent);
    border: 1px solid var(--accent);
}

.modal-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    margin: 0.75rem 0 0.5rem;
}

.modal-date {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-dim);
}

.modal-img {
    width: 100%;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    max-height: 360px;
    object-fit: cover;
}

.modal-body {
    font-size: 0.97rem;
    color: var(--text-muted);
    line-height: 1.85;
}

.modal-body p {
    margin-bottom: 1rem;
}

/* ─── CONTACT ────────────────────────────────────────────────────────────── */
#contact {
    background: var(--bg-2);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-card {
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    transition: all var(--transition);
}

.contact-card:hover {
    border-color: var(--accent);
    transform: translateX(4px);
}

.contact-icon {
    font-size: 1.3rem;
}

.contact-card strong {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    margin-bottom: 0.2rem;
}

.contact-card a {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color var(--transition);
}

.contact-card a:hover {
    color: var(--accent);
}

/* Form */
#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    background: var(--bg-3);
    border: 1.5px solid var(--border);
    color: var(--text);
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-dim);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-feedback {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    text-align: center;
    padding: 0.75rem;
    border-radius: var(--radius);
}

.form-feedback.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-2);
    border: 1px solid var(--accent-2);
}

.form-feedback.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid #ef4444;
}

/* ─── FOOTER ─────────────────────────────────────────────────────────────── */
#footer {
    padding: 2.5rem 0;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

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

.footer-logo {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.footer-copy {
    font-size: 0.82rem;
    color: var(--text-dim);
    text-align: center;
}

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

.footer-links a {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-dim);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color var(--transition);
}

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

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-content {
        order: 2;
    }

    .hero-visual {
        order: 1;
    }

    .hero-bio {
        max-width: 100%;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-label {
        justify-content: center;
    }

    .profile-blob-wrapper {
        width: 280px;
        height: 280px;
    }

    .badge-python {
        top: 0%;
        right: 0%;
    }

    .badge-sql {
        bottom: 15%;
        right: 0%;
    }

    .badge-ml {
        bottom: 0%;
        left: 0%;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-details {
        grid-template-columns: 1fr 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr 1fr;
    }

    .blog-item {
        grid-template-columns: 1fr;
    }

    .blog-item.reverse {
        direction: ltr;
    }

    .blog-img {
        min-height: 220px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 640px) {
    section {
        padding: 72px 0;
    }

    .nav-links {
        display: none;
    }

    .nav-actions .btn {
        display: none;
    }

    #hamburger {
        display: flex;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .about-details {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .modal-box {
        padding: 1.75rem;
    }
}

/* ─── AOS custom overrides ───────────────────────────────────────────────── */
[data-aos] {
    transition-duration: 700ms !important;
}