@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@500;700;900&display=swap');

:root {
    --bg: #F8F3E4;
    --surface: #FFFDF7;
    --surface-raised: #FFFFFF;
    --text: #333333;
    --text-secondary: #6B6558;
    --accent: #7B61B8;
    --accent-strong: #6549A3;
    --accent-soft: rgba(123, 97, 184, 0.12);
    --border: rgba(51, 51, 51, 0.09);
    --shadow: 0 12px 32px rgba(51, 40, 20, 0.08);
}

:root[data-theme="dark"] {
    --bg: #0E1116;
    --surface: #171B22;
    --surface-raised: #1D222B;
    --text: #F0F0F0;
    --text-secondary: #9AA0AC;
    --accent: #A692DD;
    --accent-strong: #BCA9EA;
    --accent-soft: rgba(166, 146, 221, 0.16);
    --border: rgba(240, 240, 240, 0.09);
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0E1116;
        --surface: #171B22;
        --surface-raised: #1D222B;
        --text: #F0F0F0;
        --text-secondary: #9AA0AC;
        --accent: #A692DD;
        --accent-strong: #BCA9EA;
        --accent-soft: rgba(166, 146, 221, 0.16);
        --border: rgba(240, 240, 240, 0.09);
        --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    }
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.2s ease, color 0.2s ease;
}

h1, h2, h3, .display {
    font-family: "Zen Maru Gothic", -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
    font-weight: 700;
    line-height: 1.4;
    text-wrap: balance;
    margin: 0;
}

a { color: inherit; }

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

.container {
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    background: color-mix(in srgb, var(--bg) 75%, transparent);
    border-bottom: 1px solid var(--border);
    box-shadow: inset 0 -1px 0 color-mix(in srgb, white 25%, transparent);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    padding-bottom: 16px;
}

.site-header .brand {
    font-family: "Zen Maru Gothic", sans-serif;
    font-weight: 700;
    font-size: 17px;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.site-header nav {
    display: flex;
    gap: 24px;
}

.site-header nav a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.site-header nav a:hover,
.site-header nav a.active {
    color: var(--accent);
}

/* Hero */

.hero {
    padding: 72px 0 56px;
}

.hero .eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(28px, 5vw, 40px);
    margin-bottom: 16px;
}

.hero p.lead {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 56ch;
    margin-bottom: 0;
}

.avatar-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
}

.avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--accent), var(--accent-strong));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: white;
    font-family: "Zen Maru Gothic", sans-serif;
    font-weight: 700;
    font-size: 26px;
    flex-shrink: 0;
    box-shadow: var(--shadow);
}

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

/* Sections */

section.block {
    padding: 48px 0;
}

section.block h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

section.block .section-lead {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 32px;
}

/* App cards */

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.app-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: color-mix(in srgb, var(--surface) 62%, transparent);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
    border-radius: 20px;
    padding: 24px;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow), inset 0 1px 0 color-mix(in srgb, white 45%, transparent);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.app-card:hover { transform: translateY(-3px); }

.app-card:active {
    transform: scale(0.97);
    transition: transform 0.12s ease-out;
}

.app-card .app-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.app-card .app-icon img { width: 100%; height: 100%; object-fit: cover; }

.app-card h3 {
    font-size: 17px;
}

.app-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    flex-grow: 1;
}

.app-card .card-cta {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
}

.app-card.coming-soon {
    opacity: 0.55;
    pointer-events: none;
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.btn:active {
    transform: scale(0.94);
    transition: transform 0.12s ease-out;
}

.btn-primary {
    background: var(--accent);
    background-image: linear-gradient(160deg, color-mix(in srgb, white 18%, var(--accent)), var(--accent-strong));
    color: white;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 45%, transparent), inset 0 1px 0 color-mix(in srgb, white 35%, transparent);
}

.btn-secondary {
    background: color-mix(in srgb, var(--surface) 55%, transparent);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    color: var(--text);
    border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
    box-shadow: inset 0 1px 0 color-mix(in srgb, white 40%, transparent);
}

/* App detail hero */

.app-hero {
    display: flex;
    gap: 28px;
    align-items: center;
    padding: 56px 0 40px;
    flex-wrap: wrap;
}

.app-hero .app-icon-lg {
    width: 108px;
    height: 108px;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.app-hero .app-icon-lg img { width: 100%; height: 100%; object-fit: cover; }

.app-hero .tagline {
    color: var(--text-secondary);
    font-size: 16px;
    margin-top: 10px;
}

.badge-row {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Feature grid */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.feature-card {
    background: color-mix(in srgb, var(--surface) 62%, transparent);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
    border-radius: 18px;
    padding: 22px;
    box-shadow: inset 0 1px 0 color-mix(in srgb, white 40%, transparent);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
}

.feature-card .icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    margin-bottom: 14px;
}

.feature-card h3 {
    font-size: 15px;
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin: 0;
}

/* Screenshot strip */

.screenshot-strip {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 0 16px;
    -webkit-overflow-scrolling: touch;
}

.screenshot-img {
    flex: 0 0 auto;
    width: 220px;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.screenshot-placeholder {
    flex: 0 0 auto;
    width: 200px;
    aspect-ratio: 9 / 19.5;
    border-radius: 24px;
    background: linear-gradient(160deg, var(--accent-soft), var(--surface));
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 12px;
    text-align: center;
    padding: 16px;
}

/* Dev notes */

.note-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.note-card {
    display: block;
    background: color-mix(in srgb, var(--surface) 62%, transparent);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
    border-radius: 18px;
    padding: 22px 24px;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow), inset 0 1px 0 color-mix(in srgb, white 45%, transparent);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.note-card:hover { transform: translateY(-2px); }

.note-card:active {
    transform: scale(0.98);
    transition: transform 0.12s ease-out;
}

.note-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.note-app-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 3px 10px;
    border-radius: 999px;
}

.note-date {
    font-size: 13px;
    color: var(--text-secondary);
}

.note-card h3 {
    font-size: 17px;
    margin-bottom: 6px;
}

.note-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.note-article .note-meta { margin-bottom: 4px; }

.note-article h1 {
    font-size: clamp(24px, 4vw, 32px);
    margin-top: 10px;
    margin-bottom: 24px;
}

.note-article .prose h2 {
    font-size: 18px;
}

.note-article table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    margin: 16px 0;
}

.note-article th, .note-article td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.note-article th {
    color: var(--text);
    font-weight: 700;
}

.note-article code {
    background: var(--accent-soft);
    color: var(--accent-strong);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.9em;
}

/* Prose (privacy / support) */

.prose h2 {
    font-size: 19px;
    margin-top: 40px;
    margin-bottom: 12px;
}

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

.prose p, .prose li {
    font-size: 15px;
    color: var(--text-secondary);
}

.prose ul { padding-left: 20px; }

.updated-note {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: -8px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.tech-pill {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-strong);
    background: color-mix(in srgb, var(--accent-soft) 80%, transparent);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
    padding: 4px 11px;
    border-radius: 999px;
    box-shadow: inset 0 1px 0 color-mix(in srgb, white 35%, transparent);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tech-pill:active {
    transform: scale(0.92);
    transition: transform 0.12s ease-out;
}

.contact-card {
    background: color-mix(in srgb, var(--surface) 62%, transparent);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
    border-radius: 18px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: inset 0 1px 0 color-mix(in srgb, white 40%, transparent);
}

/* Footer */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 0 48px;
    margin-top: 40px;
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.site-footer nav { display: flex; gap: 20px; }

.site-footer nav a {
    text-decoration: none;
    font-size: 13px;
    color: var(--text-secondary);
}

.site-footer .copyright {
    font-size: 13px;
    color: var(--text-secondary);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    margin: 28px 0 0;
}

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

@media (max-width: 640px) {
    .site-header .container {
        flex-wrap: wrap;
        row-gap: 10px;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .site-header nav {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px 16px;
    }

    .site-header nav a {
        font-size: 13px;
    }

    .site-footer .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .site-footer nav {
        flex-wrap: wrap;
        gap: 8px 16px;
    }

    .avatar-row {
        flex-wrap: wrap;
    }

    .app-hero {
        flex-wrap: wrap;
    }

    .hero { padding: 48px 0 36px; }
    section.block { padding: 36px 0; }
    .app-hero { padding: 40px 0 28px; }
}
