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

        :root {
            --bg: #FAFAF9;
            --text: #1A1A1A;
            --text-muted: #6B6B6B;
            --accent: #2D2D2D;
            --border: #E5E5E5;
            --card-bg: #FFFFFF;
            --tag-bg: #F0F0F0;
            --code-bg: #1E1E1E;
            --highlight-blue: #3B82F6;
            --highlight-purple: #8B5CF6;
            --app-dark-bg: #1e293b;
            --app-darker-bg: #0f172a;
            --app-card-bg: #1e293b;
        }

        [data-theme="dark"] {
            --bg: #0F0F0F;
            --text: #E5E5E5;
            --text-muted: #A0A0A0;
            --accent: #E5E5E5;
            --border: #2A2A2A;
            --card-bg: #1A1A1A;
            --tag-bg: #252525;
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            font-family: 'DM Sans', sans-serif;
            background: var(--bg);
            color: var(--text);
            line-height: 1.6;
            font-size: 17px;
            -webkit-font-smoothing: antialiased;
            transition: background-color 0.3s ease, color 0.3s ease;
        }

        /* Navigation */
        nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            background: rgba(250, 250, 249, 0.9);
            backdrop-filter: blur(10px);
            z-index: 100;
            border-bottom: 1px solid var(--border);
            transition: background-color 0.3s ease, border-color 0.3s ease;
        }

        [data-theme="dark"] nav {
            background: rgba(15, 15, 15, 0.9);
        }

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

        .back-link {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            text-decoration: none;
            color: var(--text-muted);
            font-size: 0.9rem;
            transition: color 0.2s ease;
        }

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

        .back-link svg {
            width: 16px;
            height: 16px;
        }

        .logo {
            font-family: 'Instrument Serif', serif;
            font-size: 1.5rem;
            text-decoration: none;
            color: var(--text);
            letter-spacing: -0.02em;
        }

        /* Hero */
        .case-hero {
            padding: 10rem 2rem 5rem;
            max-width: 900px;
            margin: 0 auto;
        }

        .case-label {
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 0.15em;
            color: var(--text-muted);
            margin-bottom: 1.5rem;
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .case-label span {
            width: 40px;
            height: 1px;
            background: var(--border);
        }

        .case-hero h1 {
            font-family: 'Instrument Serif', serif;
            font-size: clamp(2.5rem, 5vw, 3.5rem);
            font-weight: 400;
            line-height: 1.15;
            letter-spacing: -0.03em;
            margin-bottom: 1.5rem;
        }

        .case-subtitle {
            font-size: 1.25rem;
            color: var(--text-muted);
            max-width: 650px;
            line-height: 1.6;
        }

        .case-meta {
            display: flex;
            gap: 3rem;
            margin-top: 3rem;
            padding-top: 2rem;
            border-top: 1px solid var(--border);
        }

        .meta-item {
            display: flex;
            flex-direction: column;
            gap: 0.3rem;
        }

        .meta-label {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
        }

        .meta-value {
            font-weight: 500;
        }

        .meta-value a {
            color: var(--text);
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
        }

        .meta-value a:hover {
            text-decoration: underline;
        }

        .meta-value svg {
            width: 14px;
            height: 14px;
        }

        /* Main Image */
        .case-image-hero {
            max-width: 1100px;
            margin: 0 auto 5rem;
            padding: 0 2rem;
        }

        .case-image-hero img {
            display: block;
            width: 100%;
            height: auto;
        }

        /* Content */
        .case-content {
            max-width: 750px;
            margin: 0 auto;
            padding: 0 2rem;
        }

        .case-content h2 {
            font-family: 'Instrument Serif', serif;
            font-size: 2rem;
            font-weight: 400;
            letter-spacing: -0.02em;
            margin: 4rem 0 1.5rem;
        }

        .case-content h2:first-child {
            margin-top: 0;
        }

        .case-content p {
            color: var(--text-muted);
            line-height: 1.8;
            margin-bottom: 1.5rem;
        }

        .case-content strong {
            color: var(--text);
            font-weight: 500;
        }

        .case-content ul {
            color: var(--text-muted);
            margin-bottom: 1.5rem;
            padding-left: 1.5rem;
        }

        .case-content li {
            margin-bottom: 0.5rem;
            line-height: 1.7;
        }

        /* Why I Built This */
        .motivation-card {
            background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
            border: 1px solid rgba(139, 92, 246, 0.2);
            border-radius: 12px;
            padding: 2rem;
            margin: 2.5rem 0;
        }

        .motivation-card h3 {
            font-family: 'Instrument Serif', serif;
            font-size: 1.3rem;
            font-weight: 400;
            margin-bottom: 1rem;
            color: var(--text);
        }

        .motivation-card p {
            margin: 0;
            font-size: 1rem;
        }

        /* Feature List */
        .feature-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1.5rem;
            margin: 2.5rem 0;
        }

        .feature-item {
            display: flex;
            gap: 1rem;
            align-items: flex-start;
        }

        .feature-icon {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            background: var(--tag-bg);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .feature-icon svg {
            width: 20px;
            height: 20px;
            color: var(--text-muted);
        }

        .feature-text h4 {
            font-size: 1rem;
            font-weight: 500;
            margin-bottom: 0.3rem;
        }

        .feature-text p {
            font-size: 0.9rem;
            margin: 0;
            line-height: 1.6;
        }

        /* Code Block */
        .code-block {
            background: var(--code-bg);
            border-radius: 12px;
            padding: 1.5rem;
            margin: 2rem 0;
            overflow-x: auto;
        }

        .code-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .code-filename {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.8rem;
            color: rgba(255, 255, 255, 0.5);
        }

        .code-block pre {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.85rem;
            line-height: 1.7;
            color: #E0E0E0;
            margin: 0;
        }

        .code-comment {
            color: #6A9955;
        }

        .code-keyword {
            color: #C586C0;
        }

        .code-string {
            color: #CE9178;
        }

        .code-type {
            color: #4EC9B0;
        }

        .code-function {
            color: #DCDCAA;
        }

        .code-variable {
            color: #9CDCFE;
        }

        .code-tag {
            color: #569CD6;
        }

        .code-attr {
            color: #92C5F8;
        }

        /* Tech Stack */
        .tech-list {
            display: flex;
            flex-wrap: wrap;
            gap: 0.6rem;
            margin: 1.5rem 0;
        }

        .tech-tag {
            font-size: 0.85rem;
            padding: 0.5rem 1rem;
            background: var(--card-bg);
            border: 1px solid var(--border);
            border-radius: 50px;
            font-weight: 400;
        }

        /* Stack Section */
        .stack-section {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2rem;
            margin: 2rem 0;
        }

        .stack-group h4 {
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
            margin-bottom: 0.75rem;
        }

        .stack-group .tech-list {
            margin: 0;
        }

        /* App UI Mockup - Matching Actual Design */
        .app-mockup {
            background: var(--app-darker-bg);
            border-radius: 16px;
            margin: 2.5rem 0;
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
        }

        .app-header {
            background: var(--app-dark-bg);
            padding: 1rem 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }

        .app-back-btn {
            color: rgba(255, 255, 255, 0.6);
            font-size: 1.2rem;
            cursor: pointer;
        }

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

        .app-btn {
            padding: 0.5rem 1.2rem;
            border-radius: 6px;
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            border: none;
        }

        .app-btn.edit {
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
        }

        .app-btn.delete {
            background: #ef4444;
            color: #fff;
        }

        .app-content {
            padding: 3rem;
        }

        .app-note-title {
            font-size: 2.5rem;
            font-weight: 700;
            color: #fff;
            margin-bottom: 1rem;
        }

        .app-tags {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1rem;
        }

        .app-tag {
            padding: 0.3rem 0.8rem;
            background: #3b82f6;
            color: #fff;
            border-radius: 50px;
            font-size: 0.75rem;
            font-weight: 500;
        }

        .app-metadata {
            color: rgba(255, 255, 255, 0.4);
            font-size: 0.85rem;
            margin-bottom: 2rem;
        }

        .app-note-content {
            color: rgba(255, 255, 255, 0.8);
            line-height: 1.8;
            font-size: 0.95rem;
        }

        /* Dashboard Mockup */
        .dashboard-mockup {
            background: var(--app-darker-bg);
            border-radius: 16px;
            margin: 2.5rem 0;
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
            padding: 3rem;
        }

        .dashboard-welcome {
            margin-bottom: 2rem;
        }

        .dashboard-welcome h2 {
            font-size: 2.5rem;
            font-weight: 700;
            color: #fff;
            margin-bottom: 0.5rem;
        }

        .dashboard-welcome p {
            color: rgba(255, 255, 255, 0.5);
            font-size: 1rem;
        }

        .dashboard-search {
            display: grid;
            grid-template-columns: 1fr 300px;
            gap: 1rem;
            margin-bottom: 2rem;
        }

        .dashboard-search-input {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            padding: 0.75rem 1rem;
            color: rgba(255, 255, 255, 0.8);
            font-size: 0.9rem;
        }

        .dashboard-create-btn {
            background: #f8fafc;
            color: var(--app-darker-bg);
            padding: 0.75rem 1.5rem;
            border-radius: 8px;
            font-weight: 600;
            font-size: 0.9rem;
            text-align: center;
            margin-left: auto;
            width: fit-content;
            margin-bottom: 2rem;
        }

        .note-card {
            background: var(--app-card-bg);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            padding: 1.5rem;
            max-width: 400px;
        }

        .note-card-title {
            font-size: 1.25rem;
            font-weight: 600;
            color: #fff;
            margin-bottom: 0.75rem;
        }

        .note-card-meta {
            color: rgba(255, 255, 255, 0.4);
            font-size: 0.8rem;
            margin-bottom: 1rem;
        }

        .note-card-preview {
            color: rgba(255, 255, 255, 0.6);
            font-size: 0.9rem;
            line-height: 1.6;
        }

        /* Screenshots Gallery */
        .screenshots-gallery {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.5rem;
            margin: 2.5rem 0;
        }

        .screenshot-item {
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        }

        .screenshot-item img {
            width: 100%;
            height: auto;
            display: block;
        }

        /* Learnings */
        .learnings-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.5rem;
            margin: 2rem 0;
        }

        .learning-card {
            padding: 1.5rem;
            background: var(--card-bg);
            border: 1px solid var(--border);
            border-radius: 10px;
        }

        .learning-card h4 {
            font-size: 1rem;
            font-weight: 500;
            margin-bottom: 0.5rem;
        }

        .learning-card p {
            font-size: 0.9rem;
            margin: 0;
            line-height: 1.6;
        }

        /* Architecture Diagram */
        .architecture-diagram {
            background: var(--card-bg);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 2rem;
            margin: 2rem 0;
        }

        .architecture-flow {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .arch-box {
            padding: 1rem 1.5rem;
            border-radius: 8px;
            text-align: center;
            font-weight: 500;
            font-size: 0.9rem;
        }

        .arch-frontend {
            background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
            color: #fff;
        }

        .arch-api {
            background: var(--accent);
            color: #fff;
        }

        .arch-db {
            background: #059669;
            color: #fff;
        }

        .arch-arrow {
            color: var(--text-muted);
            font-size: 1.5rem;
        }

        .arch-label {
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-top: 0.5rem;
        }

        /* CTA */
        .case-cta {
            text-align: center;
            padding: 5rem 2rem;
            margin-top: 3rem;
            border-top: 1px solid var(--border);
        }

        .case-cta h2 {
            font-family: 'Instrument Serif', serif;
            font-size: 2rem;
            font-weight: 400;
            margin-bottom: 1rem;
        }

        .case-cta p {
            color: var(--text-muted);
            margin-bottom: 2rem;
        }

        .btn-group {
            display: flex;
            gap: 1rem;
            justify-content: center;
            flex-wrap: wrap;
        }

        .btn {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.9rem 1.8rem;
            text-decoration: none;
            font-size: 0.9rem;
            font-weight: 500;
            border-radius: 6px;
            transition: all 0.25s ease;
        }

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

        .btn-primary:hover {
            background: #000;
            transform: translateY(-2px);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
        }

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

        .btn-secondary:hover {
            border-color: var(--text);
            transform: translateY(-2px);
        }

        /* Responsive */
        @media (max-width: 900px) {
            .dashboard-search {
                grid-template-columns: 1fr;
            }

            .screenshots-gallery {
                grid-template-columns: 1fr;
            }

            .stack-section {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 768px) {

            .feature-grid,
            .learnings-grid {
                grid-template-columns: 1fr;
            }

            .case-meta {
                flex-wrap: wrap;
                gap: 1.5rem;
            }

            .btn-group {
                flex-direction: column;
                align-items: center;
            }

            .architecture-flow {
                flex-direction: column;
            }

            .arch-arrow {
                transform: rotate(90deg);
            }
        }

        /* Theme Toggle */
        .theme-toggle {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            background: transparent;
            border: 1px solid var(--border);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
        }

        .theme-toggle:hover {
            background: var(--tag-bg);
            transform: scale(1.05);
        }

        .theme-toggle svg {
            width: 18px;
            height: 18px;
            color: var(--text);
            transition: all 0.3s ease;
        }

        .theme-toggle .sun-icon {
            position: absolute;
            opacity: 1;
        }

        .theme-toggle .moon-icon {
            position: absolute;
            opacity: 0;
        }

        [data-theme="dark"] .theme-toggle .sun-icon {
            opacity: 0;
        }

        [data-theme="dark"] .theme-toggle .moon-icon {
            opacity: 1;
        }

        /* Scroll to Top Button */
        .scroll-to-top {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            width: 50px;
            height: 50px;
            background: var(--accent);
            color: #fff;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            z-index: 90;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        [data-theme="dark"] .scroll-to-top {
            background: var(--accent);
            color: #000;
        }

        .scroll-to-top.visible {
            opacity: 1;
            visibility: visible;
        }

        .scroll-to-top:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
        }

        .scroll-to-top svg {
            width: 24px;
            height: 24px;
        }

        .scroll-to-top::before {
            content: 'Back to top';
            position: absolute;
            right: 60px;
            background: var(--card-bg);
            color: var(--text);
            padding: 0.5rem 0.75rem;
            border-radius: 6px;
            font-size: 0.85rem;
            white-space: nowrap;
            opacity: 0;
            visibility: hidden;
            transition: all 0.2s ease;
            pointer-events: none;
            border: 1px solid var(--border);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .scroll-to-top:hover::before {
            opacity: 1;
            visibility: visible;
            right: 65px;
        }

        @media (max-width: 600px) {
            .scroll-to-top {
                bottom: 1.5rem;
                right: 1.5rem;
                width: 45px;
                height: 45px;
            }

            .scroll-to-top::before {
                display: none;
            }
        }
