/* ═══════════════════════════════════════════════
   RACCOON THEME — Main Stylesheet
   Minimal dark/light software house portfolio
   ═══════════════════════════════════════════════ */

/* ─── CSS Custom Properties ─── */
:root {
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 50%;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Layout */
    --max-width: 1200px;
    --header-height: 72px;

    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
}

/* ─── Dark Theme (Default) ─── */
[data-theme="dark"] {
    --bg-primary: #0a0a0b;
    --bg-secondary: #141416;
    --bg-tertiary: #1c1c1f;
    --bg-card: #18181b;
    --bg-card-hover: #1f1f23;

    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-tertiary: #95959e;
    --text-inverse: #0a0a0b;

    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-soft: rgba(99, 102, 241, 0.12);

    --border-color: #27272a;
    --border-color-hover: #3f3f46;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.6);
}

/* ─── Light Theme ─── */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fa;

    --text-primary: #18181b;
    --text-secondary: #52525b;
    --text-tertiary: #6e6e75;
    --text-inverse: #ffffff;

    --accent: #4f46e5;
    --accent-hover: #6366f1;
    --accent-soft: rgba(79, 70, 229, 0.08);

    --border-color: #e4e4e7;
    --border-color-hover: #d4d4d8;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color var(--transition-base), color var(--transition-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-hover); }
ul, ol { list-style: none; }

/* ─── Container ─── */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ─── Section ─── */
.section {
    padding: var(--space-4xl) 0;
}

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

.section__header {
    margin-bottom: var(--space-3xl);
    text-align: center;
}

.section__title {
    font-size: var(--text-4xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
}

/* ── Elementor Kit override ──
 * The site's Elementor Kit sets a global h1/h2/h3/h4/h5 color (#202020) and
 * font-family (Nunito), which bleeds into theme sections. Scope headings to
 * our theme containers so our tokens win on specificity.
 */
.site-header :is(h1, h2, h3, h4, h5, h6),
.site-main :is(h1, h2, h3, h4, h5, h6),
.site-footer :is(h1, h2, h3, h4, h5, h6) {
    color: var(--text-primary);
    font-family: var(--font-sans);
}

.section__subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    text-decoration: none;
}

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

.btn--primary:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn--outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ═══════════════════════════════════════
   HEADER
   ═══════════════════════════════════════ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-base), border-color var(--transition-base);
}

[data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.85);
}

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

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.site-logo:hover { color: var(--text-primary); }

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

.logo-accent {
    color: var(--accent);
    font-weight: 400;
}

.site-logo__img,
.site-logo--custom img,
.custom-logo {
    display: block;
    height: 40px;
    width: auto;
    max-height: 100%;
}

/* Two bundled logo variants — one per color mode. No filters. */
.site-logo__img--light { display: block; }
.site-logo__img--dark  { display: none; }

html[data-theme="dark"] .site-logo__img--light { display: none; }
html[data-theme="dark"] .site-logo__img--dark  { display: block; }

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    list-style: none;
}

.nav-list a {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition-base);
}

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

.nav-list a:hover::after,
.nav-list a.active::after {
    width: 100%;
}

/* Theme Toggle */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Theme Toggle button — defensive against plugin button styles (Elementor Kit
 * globally styles `button { background-color, padding, font-family, ... }`,
 * which would otherwise turn this into a giant blue rectangle). */
.site-header .theme-toggle,
button.theme-toggle,
.theme-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    background: var(--bg-secondary) !important;
    background-color: var(--bg-secondary) !important;
    background-image: none !important;
    color: var(--text-secondary) !important;
    font-family: var(--font-sans) !important;
    font-size: 0 !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast);
}

.site-header .theme-toggle:hover,
.site-header .theme-toggle:focus,
button.theme-toggle:hover,
button.theme-toggle:focus,
.theme-toggle:hover,
.theme-toggle:focus {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
    background: var(--bg-secondary) !important;
    background-color: var(--bg-secondary) !important;
    outline: none !important;
}

/* Icons inside the toggle — force currentColor so they pick up button's color */
.theme-toggle svg {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0;
    fill: none !important;
    stroke: currentColor !important;
    color: inherit !important;
    display: block;
}

/* Show one icon at a time, based on active theme */
.theme-toggle .icon-sun  { display: none !important; }
.theme-toggle .icon-moon { display: none !important; }

html[data-theme="dark"]  .theme-toggle .icon-sun  { display: block !important; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block !important; }

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-base);
}

.hamburger { position: relative; }
.hamburger::before, .hamburger::after { content: ''; position: absolute; left: 0; }
.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

.menu-toggle[aria-expanded="true"] .hamburger { background: transparent; }
.menu-toggle[aria-expanded="true"] .hamburger::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .hamburger::after { top: 0; transform: rotate(-45deg); }

/* ═══════════════════════════════════════
   HERO
   ═══════════════════════════════════════ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-soft), transparent 70%);
    pointer-events: none;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
}

.hero__content {
    position: relative;
    z-index: 1;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.45rem 1.1rem;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 999px;
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-xl);
}

.hero__badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero__title {
    font-size: var(--text-6xl);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
}

.hero__title span {
    background: linear-gradient(135deg, var(--accent), #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__description {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-2xl);
    max-width: 520px;
}

.hero__actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.hero__stats {
    display: flex;
    gap: var(--space-2xl);
    margin-top: var(--space-3xl);
}

.hero__stat-number {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--text-primary);
}

.hero__stat-label {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

.hero__visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero__code-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: 1.8;
    width: 100%;
    max-width: 450px;
    overflow: hidden;
}

.code-line { display: block; }
.code-keyword { color: #c084fc; }
.code-function { color: #60a5fa; }
.code-string { color: #34d399; }
.code-comment { color: var(--text-tertiary); }
.code-property { color: #f472b6; }
.code-bracket { color: var(--text-tertiary); }

/* ═══════════════════════════════════════
   SKILLS
   ═══════════════════════════════════════ */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
    max-width: 800px;
    margin: 0 auto;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.skill-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-2px);
}

/* ═══════════════════════════════════════
   EXPERIENCE
   ═══════════════════════════════════════ */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    padding-left: var(--space-3xl);
    padding-bottom: var(--space-2xl);
    position: relative;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background: var(--accent);
    border: 3px solid var(--bg-primary);
}

.timeline-item__period {
    font-size: var(--text-sm);
    color: var(--accent);
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.timeline-item__role {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.timeline-item__company {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.timeline-item__tasks {
    list-style: none;
}

.timeline-item__tasks li {
    position: relative;
    padding-left: var(--space-lg);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.8;
}

.timeline-item__tasks li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 600;
}

/* ═══════════════════════════════════════
   PROJECTS
   ═══════════════════════════════════════ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-xl);
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-base);
}

.project-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.project-card__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-tertiary);
}

/* Placeholder shown when the project has no featured image — gradient + initials.
 * Hue is derived from the title hash so each project gets a unique-but-stable color. */
a.project-card__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    overflow: hidden;
    position: relative;
    text-align: center;
    padding: var(--space-md);
    transition: filter var(--transition-fast);
}

a.project-card__placeholder::before {
    /* Subtle dot grid for texture, doesn't compete with the gradient */
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.06) 1px, transparent 0);
    background-size: 18px 18px;
    pointer-events: none;
    opacity: 0.9;
}

a.project-card__placeholder::after {
    /* Soft inner highlight to give the card depth */
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top left, rgba(255, 255, 255, 0.10), transparent 60%);
    pointer-events: none;
}

a.project-card__placeholder:hover {
    filter: brightness(1.1) saturate(1.15);
}

.project-card__placeholder-mark {
    font-family: var(--font-mono);
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(255, 255, 255, 0.97);
    letter-spacing: -0.04em;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.project-card__placeholder-name {
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-card__content {
    padding: var(--space-xl);
}

.project-card__title {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.project-card__title a {
    color: var(--text-primary);
}

.project-card__title a:hover {
    color: var(--accent);
}

.project-card__excerpt {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

.project-card__link {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

.project-card__link::after {
    content: '→';
    transition: transform var(--transition-fast);
}

.project-card__link:hover::after {
    transform: translateX(4px);
}

/* ═══════════════════════════════════════
   BLOG
   ═══════════════════════════════════════ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-xl);
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    transition: all var(--transition-base);
}

.blog-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
}

.blog-card__meta {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-card__title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.blog-card__title a {
    color: var(--text-primary);
}

.blog-card__title a:hover {
    color: var(--accent);
}

.blog-card__excerpt {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ═══════════════════════════════════════
   EDUCATION
   ═══════════════════════════════════════ */
.education-list {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: var(--space-xl);
}

.education-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    transition: border-color var(--transition-fast);
}

.education-item:hover {
    border-color: var(--border-color-hover);
}

.education-item__period {
    font-size: var(--text-sm);
    color: var(--accent);
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.education-item__title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.education-item__school {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.education-item__desc {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    line-height: 1.7;
}

/* ═══════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    max-width: 800px;
    margin: 0 auto;
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.contact-info-item__icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--accent);
    flex-shrink: 0;
}

.contact-info-item__label {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.contact-info-item__value {
    font-size: var(--text-base);
    color: var(--text-primary);
}

.contact-info-item__value a {
    color: var(--text-primary);
}

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

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
.site-footer {
    background: rgba(10, 10, 11, 0.85);
    border-top: 1px solid var(--border-color);
    padding: var(--space-3xl) 0 var(--space-xl);
    transition: background-color var(--transition-base), border-color var(--transition-base);
}

[data-theme="light"] .site-footer {
    background: rgba(255, 255, 255, 0.85);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-tagline {
    color: var(--text-tertiary);
    font-size: var(--text-sm);
    margin-top: var(--space-md);
}

.site-footer .footer-col-title,
.footer-links h4,
.footer-contact h4,
.footer-social h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    letter-spacing: normal;
}

.footer-nav,
.footer-contact ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-nav a,
.footer-contact a,
.footer-contact li {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.footer-nav a:hover,
.footer-contact a:hover {
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: var(--space-md);
}

.social-links a {
    color: var(--text-tertiary);
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

/* ═══════════════════════════════════════
   BLOG SINGLE / ARCHIVE
   ═══════════════════════════════════════ */
.page-header {
    padding: calc(var(--header-height) + var(--space-3xl)) 0 var(--space-2xl);
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-header__title {
    font-size: var(--text-4xl);
    font-weight: 700;
}

.single-content {
    padding: var(--space-3xl) 0;
    max-width: 760px;
    margin: 0 auto;
}

.single-content h1,
.single-content h2,
.single-content h3,
.single-content h4 {
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.single-content h1 { font-size: var(--text-4xl); }
.single-content h2 { font-size: var(--text-3xl); }
.single-content h3 { font-size: var(--text-2xl); }

.single-content p {
    margin-bottom: var(--space-lg);
    color: var(--text-secondary);
    line-height: 1.8;
}

.single-content ul,
.single-content ol {
    margin-bottom: var(--space-lg);
    padding-left: var(--space-xl);
}

.single-content li {
    color: var(--text-secondary);
    line-height: 1.8;
    list-style: disc;
}

.single-content code {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    background: var(--bg-tertiary);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.single-content pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--space-lg);
    overflow-x: auto;
    margin-bottom: var(--space-lg);
}

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

.single-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: var(--space-lg);
    margin: var(--space-lg) 0;
    color: var(--text-secondary);
    font-style: italic;
}

.single-meta {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    margin-bottom: var(--space-xl);
}

.single-meta a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.single-meta a:hover {
    color: var(--accent);
}

/* 404 */
.error-404 {
    text-align: center;
    padding: var(--space-4xl) 0;
}

.error-404 h1 {
    font-size: 6rem;
    font-weight: 800;
    color: var(--accent);
}

/* ═══════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════ */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .hero__title {
        font-size: var(--text-5xl);
    }

    .hero__visual {
        display: none;
    }

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

@media (max-width: 768px) {
    :root {
        --space-4xl: 4rem;
    }

    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-primary);
        padding: var(--space-xl);
        transform: translateX(100%);
        transition: transform var(--transition-base);
        z-index: 999;
    }

    .main-nav.is-open {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xl);
    }

    .nav-list a {
        font-size: var(--text-xl);
    }

    .hero__title {
        font-size: var(--text-4xl);
    }

    .hero__stats {
        gap: var(--space-xl);
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

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

@media (max-width: 480px) {
    .hero__title {
        font-size: var(--text-3xl);
    }

    .section__title {
        font-size: var(--text-3xl);
    }

    .hero__actions {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }
}

/* ─── Single project (raccoon-projects plugin meta) ───────────────────────
   Selectors prefixed with .single-content where needed to outrank the
   inherited `.single-content li { list-style: disc }` / `.single-content ul
   { padding-left }` defaults from the article styles above. */
.project-release-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono, monospace);
    font-size: 0.85em;
    color: var(--text-secondary);
}

.single-content .project-stack {
    list-style: none;
    padding-left: 0;
    margin: 0 0 var(--space-xl);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.single-content .project-stack li.project-stack__chip {
    list-style: none;
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    background: var(--bg-tertiary, transparent);
    line-height: 1.4;
    margin: 0;
}

.single-content .project-downloads {
    margin: var(--space-2xl) 0;
    padding: var(--space-xl);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
}

.single-content .project-downloads__title {
    margin-top: 0;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--space-sm);
    color: var(--text-primary);
}

.single-content .project-downloads__version {
    font-family: var(--font-mono, monospace);
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    font-weight: 400;
}

.single-content .project-downloads__group + .project-downloads__group {
    margin-top: var(--space-lg);
}

.single-content .project-downloads__os {
    margin: 0 0 var(--space-sm);
    font-size: var(--text-base);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.single-content .project-downloads__list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.single-content .project-downloads__list li {
    list-style: none;
    margin: 0;
    color: inherit;
    line-height: inherit;
}

.single-content .project-downloads__btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-primary);
}

.single-content .project-downloads__btn:hover {
    color: var(--accent);
}

.single-content .project-downloads__size {
    color: var(--text-tertiary);
    font-weight: 400;
}

.single-content .project-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin: var(--space-2xl) 0 var(--space-xl);
}

.single-content .project-nav {
    margin-top: var(--space-3xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
}

/* Page-header subtitle sometimes lives outside single-content */
.page-header__subtitle {
    max-width: 720px;
    margin: var(--space-md) auto 0;
    color: var(--text-secondary);
    font-size: var(--text-lg);
    line-height: 1.5;
}
