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

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --text-primary: #1a1a1a;
    --text-secondary: #6e6e73;
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-border: rgba(0, 0, 0, 0.06);
    --card-shadow: rgba(0, 0, 0, 0.04);
    --card-hover-shadow: rgba(0, 0, 0, 0.12);
    --section-bg: rgba(0, 0, 0, 0.02);
    --section-border: rgba(0, 0, 0, 0.04);
    --footer-bg: rgba(0, 0, 0, 0.02);
    --footer-border: rgba(0, 0, 0, 0.06);
    --accent: #4b5563;
    --accent-glow: rgba(75, 85, 99, 0.3);
    --header-bg: rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.06);
    --card-shadow: rgba(0, 0, 0, 0.2);
    --card-hover-shadow: rgba(64, 224, 208, 0.2);
    --section-bg: rgba(255, 255, 255, 0.02);
    --section-border: rgba(255, 255, 255, 0.04);
    --footer-bg: rgba(0, 0, 0, 0.3);
    --footer-border: rgba(255, 255, 255, 0.06);
    --header-bg: rgba(10, 10, 15, 0.75);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(145deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-primary);
    line-height: 1.6;
    transition: color 0.4s ease;
}

[data-theme="dark"] body { background: transparent; }

[data-theme="dark"] body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    background: 
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(64, 224, 208, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 70%, rgba(138, 43, 226, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 70% 50% at 50% 50%, rgba(30, 144, 255, 0.08) 0%, transparent 60%),
        linear-gradient(180deg, #0a0a0f 0%, #0f0f18 50%, #0a0a0f 100%);
}

/* Header */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 60px;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    z-index: 100;
    transition: all 0.3s ease;
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon { width: 36px; height: 36px; }
.logo-icon circle { fill: none; stroke: var(--text-primary); stroke-width: 1.5; }
.logo-icon .figure { fill: none; stroke: var(--text-primary); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="dark"] .logo-icon circle { stroke: #fff; }
[data-theme="dark"] .logo-icon .figure { stroke: #fff; }

.logo-text { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.02em; }
.logo-text .suffix { font-weight: 400; opacity: 0.6; }

.header-nav { display: flex; align-items: center; gap: 2rem; }
.nav-links { display: flex; gap: 1.5rem; list-style: none; }

.nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover { color: var(--text-primary); }
.nav-link::after {
    content: "";
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 1px;
    background: var(--accent);
    transition: width 0.2s ease;
}
.nav-link:hover::after { width: 100%; }
[data-theme="dark"] .nav-link::after { background: #40e0d0; }

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 24px; height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 100%; height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Nav */
.mobile-nav {
    display: none;
    position: fixed;
    top: 60px; left: 0; right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 2rem;
    z-index: 99;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.mobile-nav.active { opacity: 1; transform: translateY(0); }
.mobile-nav-links { list-style: none; display: flex; flex-direction: column; gap: 1rem; }

.mobile-nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

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

/* Layout */
.main { flex: 1; padding: 2rem; padding-top: calc(60px + 2rem); }
.container { max-width: 1100px; margin: 0 auto; width: 100%; }
.container-narrow { max-width: 900px; }
.container-wide { max-width: 1100px; }

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

.column-left, .column-right { display: flex; flex-direction: column; gap: 1.5rem; }

/* Sections */
.section {
    background: var(--section-bg);
    border: 1px solid var(--section-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.section:last-child {
    margin-bottom: 0;
}

.column-left .section,
.column-right .section {
    margin-bottom: 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::before {
    content: "";
    height: 1px; width: 20px;
    background: var(--card-border);
}

/* Projects List (Homepage) */
.projects { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }

.project {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.project::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.project:hover::before { left: 100%; }

.project:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 8px 24px var(--card-hover-shadow);
    border-color: var(--accent);
}

.project:active { transform: scale(0.98); transition: transform 0.1s ease; }

.project-screenshot {
    width: 72px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--card-border);
    flex-shrink: 0;
}

.project-info { flex: 1; min-width: 0; }
.project-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.25rem; }
.project-name { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }
.project-tagline { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

/* Badges */
.badge {
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-live {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid #10b981;
    box-shadow: none;
}

.badge-live::before {
    content: "";
    width: 5px; height: 5px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

[data-theme="dark"] .badge-live {
    background: rgba(64, 224, 208, 0.15);
    color: #40e0d0;
    border-color: #40e0d0;
}

[data-theme="dark"] .badge-live::before {
    background: #40e0d0;
}

.badge-soon {
    background: rgba(255, 149, 0, 0.1);
    color: #f59e0b;
    border: 1px solid #f59e0b;
    box-shadow: none;
}

[data-theme="dark"] .badge-soon {
    background: rgba(255, 149, 0, 0.15);
    color: #fbbf24;
    border-color: #fbbf24;
}

/* Animations */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes swipe { from { left: -100%; } to { left: 100%; } }

/* Tag Filters */
.tag-filters { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.tag-filter {
    font-size: 0.65rem;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tag-filter::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: none;
}

.tag-filter:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.tag-filter:hover::before { animation: swipe 0.5s ease; }

.tag-filter.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--card-bg);
}

[data-theme="dark"] .tag-filter.active {
    color: #fff;
    background: var(--accent);
}

/* Posts */
.posts { display: flex; flex-direction: column; gap: 0.75rem; }

.post {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    cursor: pointer;
}

.post:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px var(--card-hover-shadow);
}

.post.hidden { display: none; }

.post-reading { display: flex; gap: 1rem; align-items: flex-start; }

.post-book-cover {
    width: 56px;
    height: 80px;
    object-fit: cover;
    border-radius: 0px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.post-reading .post-body { flex: 1; min-width: 0; }

.post-reading-expanded {
    display: none !important;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
}

.post.expanded .post-reading-expanded { 
    display: flex !important; 
    flex-direction: column;
    align-items: center;
}

.post-book-cover-large {
    width: 120px;
    height: 180px;
    object-fit: cover;
    border-radius: 0px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    margin-bottom: 0.75rem;
    display: block;
}

.post-book-notes {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

.post-screenshot {
    width: 100%;
    height: 230px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    margin-top: 1rem;
    display: none;
}

.content-with-sidebar .post-screenshot {
    height: 320px;
}

.post.expanded .post-screenshot { display: block; }

.expand-btn {
    position: absolute;
    top: 0.6rem;
    right: 0.75rem;
    font-size: 0.55rem;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 3px;
    padding: 0.15rem 0.4rem;
    pointer-events: none;
    transition: all 0.2s ease;
}

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

.post-meta {
    font-size: 0.7rem;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-content {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-content,
.post-content strong,
.post-content b,
.post-content p {
    font-weight: 300;
}

.post.expanded .post-content {
    display: block;
    -webkit-line-clamp: unset;
}

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

.post-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    color: var(--accent);
    background: var(--card-bg);
    border: 1px solid var(--accent);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

[data-theme="dark"] .post-tag {
    color: #fff;
    background: var(--accent);
}

/* About Card */
.about-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: all 0.3s ease;
}

.about-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px var(--card-hover-shadow);
}

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

/* Tech Stack */
.tech-stack { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

.tech-badge {
    font-size: 0.7rem;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    cursor: default;
    transition: all 0.3s ease;
}

.tech-badge::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: none;
}

.tech-badge:hover {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
    color: var(--text-primary);
}

.tech-badge:hover::before { animation: swipe 0.5s ease; }

.tech-badge::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: var(--bg-primary);
    font-size: 0.65rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
    max-width: 200px;
    white-space: normal;
    text-align: center;
}

.tech-badge:hover::after { opacity: 1; }

/* Social Links */
.social-links { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: none;
}

.social-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--card-hover-shadow);
}

.social-link:hover::before { animation: swipe 0.5s ease; }
.social-link svg { width: 20px; height: 20px; fill: currentColor; }

/* Footer */
footer {
    padding: 1.5rem 2rem;
    background: var(--footer-bg);
    border-top: 1px solid var(--footer-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

footer .copyright { font-size: 0.85rem; color: var(--text-secondary); }
footer .motto { font-size: 0.85rem; color: var(--text-secondary); text-align: center; }

/* Footer Legal Links */
.footer-legal {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.footer-legal a {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

[data-theme="dark"] .footer-legal a:hover {
    color: #40e0d0;
}

/* Footer Controls */
.footer-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* RSS Feed Link */
.rss-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

[data-theme="dark"] .rss-link:hover {
    color: #40e0d0;
}

.rss-label {
    font-size: 0.75rem;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
}

.rss-link svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.theme-toggle span { font-size: 0.85rem; color: var(--text-secondary); }

.toggle-track {
    width: 48px; height: 26px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 13px;
    position: relative;
    transition: all 0.3s ease;
}

.toggle-thumb {
    position: absolute;
    top: 2px; left: 2px;
    width: 20px; height: 20px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-thumb svg {
    width: 12px; height: 12px;
    fill: none;
    stroke: var(--text-secondary);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

[data-theme="dark"] .toggle-thumb { left: 24px; }
[data-theme="dark"] .toggle-thumb svg { stroke: #fff; }

.theme-label {
    font-size: 0.75rem;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
}

.sun-icon { display: none; }
.moon-icon { display: none; }
.system-icon { display: none; }

[data-theme-mode="system"] .system-icon { display: block; }
[data-theme-mode="light"] .sun-icon { display: block; }
[data-theme-mode="dark"] .moon-icon { display: block; }

/* Focus States */
.project:focus-visible,
.theme-toggle:focus-visible,
.tag-filter:focus-visible,
.expand-btn:focus-visible,
.social-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.project:focus,
.theme-toggle:focus,
.tag-filter:focus,
.expand-btn:focus,
.social-link:focus { outline: none; }

/* ========================================
   FEATURED PROJECT
   ======================================== */

.featured-project {
    display: block;
    text-align: center;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-project::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.featured-project:hover::before {
    left: 100%;
}

.featured-project:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 12px 32px var(--card-hover-shadow);
}

[data-theme="dark"] .featured-project:hover {
    border-color: #40e0d0;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    border-radius: 4px;
    margin-bottom: 1rem;
}

[data-theme="dark"] .featured-badge {
    background: rgba(64, 224, 208, 0.15);
    border-color: #40e0d0;
}

.featured-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

[data-theme="dark"] .featured-dot {
    background: #40e0d0;
}

.featured-badge span:last-child {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #10b981;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
}

[data-theme="dark"] .featured-badge span:last-child {
    color: #40e0d0;
}

.featured-title {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    background: linear-gradient(90deg, #2563eb 0%, #2563eb 30%, #e879f9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.featured-tagline {
    font-size: 1.35rem;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto 0.25rem auto;
}

.featured-tagline:last-of-type {
    margin-bottom: 1.5rem;
}

.featured-link {
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

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

[data-theme="dark"] .featured-project:hover .featured-link {
    color: #40e0d0;
}

/* ========================================
   VIEW ALL LINK & BUTTON
   ======================================== */

.view-all-link {
    font-size: 0.75rem;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.view-all-link:hover {
    color: var(--accent);
}

[data-theme="dark"] .view-all-link:hover {
    color: #40e0d0;
}

.view-all-btn {
    display: block;
    margin-top: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    background: var(--card-bg);
    border: 1px solid var(--accent);
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
}

.view-all-btn:hover {
    background: rgba(75, 85, 99, 0.1);
    transform: translateY(-2px);
}

[data-theme="dark"] .view-all-btn {
    color: #40e0d0;
    border-color: #40e0d0;
}

[data-theme="dark"] .view-all-btn:hover {
    background: rgba(64, 224, 208, 0.1);
}

/* ========================================
   PAGINATION
   ======================================== */

.pagination {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--card-border);
}

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

.pagination-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-link svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.pagination-link:not(.disabled):hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}

[data-theme="dark"] .pagination-link:not(.disabled):hover {
    color: #40e0d0;
    border-color: #40e0d0;
}

.pagination-link.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 0.75rem;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    color: var(--text-secondary);
}

/* ========================================
   PROJECT PAGES
   ======================================== */

/* Page Header */
.page-header {
    margin-bottom: 2rem;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.page-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover { color: var(--accent); }
[data-theme="dark"] .breadcrumb a:hover { color: #40e0d0; }
.breadcrumb span { margin: 0 0.5rem; opacity: 0.5; }

/* Project Hero */
.project-hero {
    background: var(--section-bg);
    border: 1px solid var(--section-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.project-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.project-hero .project-tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.project-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn svg {
    width: 16px; height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.btn-primary {
    background: rgba(75, 85, 99, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--accent);
    border: 1px solid var(--accent);
}

[data-theme="dark"] .btn-primary {
    background: rgba(64, 224, 208, 0.1);
    color: #40e0d0;
    border-color: #40e0d0;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 16px var(--accent-glow);
    background: rgba(75, 85, 99, 0.25);
}

[data-theme="dark"] .btn-primary:hover {
    box-shadow: 0 0 16px rgba(64, 224, 208, 0.3);
    background: rgba(64, 224, 208, 0.2);
}

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

.btn-secondary:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px var(--card-hover-shadow);
}

[data-theme="dark"] .btn-secondary:hover { border-color: #40e0d0; }

/* Hero Sidebar */
.hero-screenshot {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

[data-theme="dark"] .hero-screenshot {
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.project-meta {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.25rem;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--card-border);
}

.meta-row:last-child { border-bottom: none; }

.meta-label {
    font-size: 0.75rem;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-value {
    font-size: 0.85rem;
    color: var(--text-primary);
    text-align: right;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
}

/* Project Body */
.project-body {
    background: var(--section-bg);
    border: 1px solid var(--section-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.project-body h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-body h2:first-child { margin-top: 0; }

.project-body p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.project-body ul {
    list-style: none;
    margin-bottom: 1rem;
}

.project-body li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding-left: 1.25rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.project-body li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
}

[data-theme="dark"] .project-body li::before { color: #40e0d0; }

/* Project Body Code Blocks */
.project-body pre {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.project-body code {
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.project-body p code {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

/* Related Projects */
.related-section {
    background: var(--section-bg);
    border: 1px solid var(--section-border);
    border-radius: 16px;
    padding: 1.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.related-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

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

[data-theme="dark"] .related-card:hover { border-color: #40e0d0; }

.related-thumb {
    width: 48px; height: 32px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--card-border);
}

.related-info { flex: 1; min-width: 0; }
.related-name { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
.related-tagline {
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Projects Index Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
}

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

[data-theme="dark"] .project-card:hover { border-color: #40e0d0; }

.project-card-screenshot {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-bottom: 1px solid var(--card-border);
}

.project-card-body { padding: 1rem; }

.project-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.project-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.project-card-tagline {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.project-card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.tech-badge-small {
    font-size: 0.6rem;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    color: var(--text-secondary);
    background: var(--section-bg);
    border: 1px solid var(--card-border);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
}

/* ========================================
   FEATURED ARTICLE ROW
   ======================================== */

.featured-article-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.featured-article-row:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--card-hover-shadow);
}

[data-theme="dark"] .featured-article-row:hover {
    border-color: #40e0d0;
}

.featured-article-badge {
    flex-shrink: 0;
}

.featured-article-badge span {
    font-size: 0.6rem;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    background: var(--section-bg);
    border: 1px solid var(--card-border);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
}

[data-theme="dark"] .featured-article-badge span {
    color: #40e0d0;
}

.featured-article-content {
    flex: 1;
    min-width: 0;
}

.featured-article-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.featured-article-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-article-link {
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.featured-article-row:hover .featured-article-link {
    color: var(--accent);
}

[data-theme="dark"] .featured-article-row:hover .featured-article-link {
    color: #40e0d0;
}

/* ========================================
   CONTACT FORM
   ======================================== */

.contact-page {
    max-width: 600px;
    margin: 0 auto;
}

.contact-page h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.contact-page > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    transition: all 0.2s ease;
}

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

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
    border-color: #40e0d0;
    box-shadow: 0 0 0 3px rgba(64, 224, 208, 0.2);
}

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

.contact-page .btn {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    font-size: 1rem;
    background: var(--accent);
    color: #fff;
    border: none;
}

.contact-page .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

[data-theme="dark"] .contact-page .btn {
    background: #40e0d0;
    color: #0a0a0f;
}

.contact-page .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#form-success {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
}

#form-success p {
    font-size: 1.1rem;
    color: var(--text-primary);
}

#form-error {
    text-align: center;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    margin-bottom: 1rem;
}

#form-error p {
    font-size: 0.9rem;
    color: #ef4444;
    margin: 0;
}

.hidden {
    display: none;
}

/* ========================================
   LEGAL PAGES (Imprint, Privacy)
   ======================================== */

.legal-page {
    max-width: 700px;
    margin: 0 auto;
}

.legal-page h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.legal-page h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.legal-page p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.legal-page a {
    color: var(--accent);
    text-decoration: none;
}

.legal-page a:hover {
    text-decoration: underline;
}

[data-theme="dark"] .legal-page a {
    color: #40e0d0;
}

.legal-page ul {
    list-style: none;
    margin-bottom: 1rem;
}

.legal-page li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding-left: 1.25rem;
    position: relative;
    margin-bottom: 0.4rem;
}

.legal-page li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
}

[data-theme="dark"] .legal-page li::before {
    color: #40e0d0;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .mobile-nav { display: block; pointer-events: none; }
    .mobile-nav.active { pointer-events: auto; }
    
    .columns { grid-template-columns: 1fr; }
    .header-container { padding: 0 1rem; }
    .project-screenshot { width: 56px; height: 40px; }
    .tech-badge::after { display: none; }
    
    footer { flex-direction: column; text-align: center; }
    
    .footer-controls {
        flex-direction: row;
        justify-content: center;
    }
    
    .hero-content { grid-template-columns: 1fr; }
    .hero-sidebar { order: -1; }
    .project-title { font-size: 1.5rem; }
    .related-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .page-title { font-size: 2rem; }
    
    .featured-title {
        font-size: 2rem;
    }
    
    .featured-tagline {
        font-size: 1.1rem;
    }
    
    .featured-project {
        padding: 2rem 1.5rem;
    }
    
    .pagination-inner {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-info {
        order: -1;
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .featured-article-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .featured-article-desc {
        white-space: normal;
    }
    
    .featured-article-link {
        align-self: flex-end;
    }
}

/* Visitor Counter */
.visitor-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.counter-label {
    font-size: 0.75rem;
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    color: var(--text-secondary);
}

.counter-digits {
    display: flex;
    gap: 2px;
}

.counter-flap {
    position: relative;
    width: 1rem;
    height: 1.25rem;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .counter-flap {
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.counter-flap .split-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--bg-primary);
    z-index: 1;
}

.counter-flap .digit {
    font-family: "SF Mono", "Fira Code", Menlo, monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}