/* ============================================
   Works / Linktree page — QR-friendly, mobile-first
   ============================================ */

:root {
    --bg: #040810;
    --bg-card: rgba(17, 28, 46, 0.85);
    --accent: #00d4ff;
    --text: #f0f6fc;
    --muted: #94a3b8;
    --border: rgba(0, 212, 255, 0.14);
    --font: 'DM Sans', system-ui, sans-serif;
    --display: 'Syne', Georgia, serif;
    --radius: 16px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100dvh;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 212, 255, 0.12), transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(99, 102, 241, 0.06), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.works-page {
    position: relative;
    z-index: 1;
    max-width: 520px;
    margin: 0 auto;
    padding: 1.75rem 1.15rem 3rem;
}

.works-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.works-brand {
    display: inline-block;
    margin-bottom: 0.75rem;
}

.works-brand img {
    height: 42px;
    width: auto;
    display: block;
}

.works-tagline {
    font-size: 0.9rem;
    color: var(--muted);
}

/* Quick links */
.quick-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.55rem;
    margin-bottom: 2rem;
}

.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 0.35rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.7rem;
    font-weight: 600;
    transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}

.quick-link:active,
.quick-link:hover {
    transform: scale(0.97);
    border-color: var(--accent);
}

.ql-icon { font-size: 1.15rem; line-height: 1; }

/* Sections */
.works-section {
    margin-bottom: 2rem;
}

.works-section-title {
    font-family: var(--display);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.works-section-note {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.85rem;
}

.works-section-title + .works-grid {
    margin-top: 0.85rem;
}

/* Tile grid */
.works-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7rem;
}

.work-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 112px;
    padding: 1rem 0.65rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    text-align: center;
    transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
    -webkit-tap-highlight-color: transparent;
}

.work-tile:hover,
.work-tile:focus-visible {
    border-color: rgba(0, 212, 255, 0.45);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
    outline: none;
}

.work-tile:active {
    transform: scale(0.98);
}

.work-tile--more {
    opacity: 0.55;
    cursor: default;
    pointer-events: none;
}

.work-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.work-logo img {
    max-width: 78%;
    max-height: 78%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.work-logo img.logo-dark {
    max-width: 70%;
}

.work-logo--app {
    background: #fff;
}

.work-logo--init {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.25), rgba(99, 102, 241, 0.35));
    color: var(--accent);
    font-family: var(--display);
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    box-shadow: none;
    border: 1px solid var(--border);
}

.work-title {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.work-title small {
    font-weight: 500;
    color: var(--accent);
    font-size: 0.7rem;
}

.works-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--muted);
}

.works-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin: 0.35rem 0;
}

.works-footer-hint {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.7;
}

@media (min-width: 480px) {
    .works-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .works-page {
        padding-top: 2.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .work-tile,
    .quick-link {
        transition: none;
    }
}
