/* ══════════════════════════════════════
   Indie Maker — Clean, shadcn-inspired
   ══════════════════════════════════════ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #09090b;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}



/* ══════════════════════════════════════
   Page — White background
   ══════════════════════════════════════ */

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #e4e4e7;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1aa;
}

::selection {
    background: rgba(99, 102, 241, 0.15);
    color: #09090b;
}

/* ── Scroll Progress Bar ── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, #818cf8, #c084fc, #f472b6);
    z-index: 100;
    transition: width 0.1s linear;
}


/* ══════════════════════════════════════
   Layout
   ══════════════════════════════════════ */
main {
    position: relative;
    z-index: 2;
    max-width: 640px;
    margin: 0 auto;
    padding: 120px 32px 80px;
    opacity: 1;
}

/* ══════════════════════════════════════
   Hero
   ══════════════════════════════════════ */
.hero {
    margin-bottom: 72px;
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

.hero-identity {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.hero-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid #e4e4e7;
    object-fit: cover;
    object-position: center 10%;
}

.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #71717a;
    margin-bottom: 20px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    animation: ctaPulse 2s ease-in-out infinite;
}

.hero-name {
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 900;
    font-size: 48px;
    letter-spacing: -2px;
    color: #09090b;
}

.hero-name-text {
    position: relative;
    display: inline-block;
}

.hero-name-text::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #818cf8, #a78bfa, #e879f9, #f472b6, #fb923c, #818cf8);
    background-size: 300% 100%;
    animation: gradientScroll 6s ease-in-out infinite;
    border-radius: 3px;
    opacity: 0.35;
}

.hero-sub {
    font-size: 17px;
    line-height: 1.6;
    color: #3f3f46;
    max-width: 480px;
    margin-bottom: 28px;
}

.hero-links {
    display: flex;
    gap: 20px;
}

.hero-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 500;
    color: #52525b;
    text-decoration: none;
    transition: color 0.15s ease;
}

.hero-link:hover {
    color: #09090b;
}

.hero-link svg {
    flex-shrink: 0;
}

/* ══════════════════════════════════════
   Section
   ══════════════════════════════════════ */
.section {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards;
}

.section-label {
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #71717a;
    margin-bottom: 20px;
}

/* ══════════════════════════════════════
   Projects
   ══════════════════════════════════════ */
.projects {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Project Card ── */
.project-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;

    /* Scroll reveal */
    opacity: 0;
    transform: translateY(12px);
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.15s ease,
                border-color 0.15s ease,
                box-shadow 0.15s ease;
}

/* ── Card Hover ── */
.project-card:hover {
    background: #fafafa;
    border-color: #d4d4d8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.project-card:active {
    background: #f4f4f5;
}

/* ── Focus for keyboard ── */
.project-card:focus-visible {
    outline: 2px solid #18181b;
    outline-offset: 2px;
}

/* ── Logo ── */
.project-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #f4f4f5;
    border: 1px solid #f4f4f5;
    object-fit: contain;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ── Info ── */
.project-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.project-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Name ── */
.project-name {
    font-weight: 600;
    font-size: 15px;
    color: #09090b;
    letter-spacing: -0.2px;
}

/* ── Badge ── */
.project-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 1px 7px;
    border-radius: 50px;
    background: #dcfce7;
    color: #15803d;
    line-height: 1.5;
}

.badge-wip {
    background: #fef3c7;
    color: #a16207;
}

.project-users {
    font-size: 11px;
    font-weight: 500;
    color: #a1a1aa;
    letter-spacing: 0.2px;
}

/* ── Description ── */
.project-desc {
    font-size: 14px;
    color: #71717a;
    line-height: 1.5;
}

.project-card:hover .project-desc {
    color: #52525b;
}

/* ── Arrow ── */
.project-arrow {
    flex-shrink: 0;
    color: #d4d4d8;
    margin-top: 2px;
    transition: color 0.15s ease, transform 0.15s ease;
}

.project-card:hover .project-arrow {
    color: #71717a;
    transform: translate(1px, -1px);
}

/* ── Bottom Bar ── */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #818cf8, #a78bfa, #e879f9, #f472b6, #fb923c, #818cf8);
    background-size: 300% 100%;
    animation: gradientScroll 6s ease-in-out infinite;
    z-index: 201;
}

/* ══════════════════════════════════════
   Footer
   ══════════════════════════════════════ */
.footer {
    margin-top: 80px;
    padding-top: 32px;
    border-top: 1px solid #e4e4e7;
    text-align: center;
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

.footer-text {
    font-size: 14px;
    color: #71717a;
    margin-bottom: 6px;
}

.footer-copy {
    font-size: 12px;
    color: #a1a1aa;
}

/* ══════════════════════════════════════
   Contact Popup
   ══════════════════════════════════════ */
.popup-backdrop {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.popup-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.popup {
    position: relative;
    background: #ffffff;
    width: 280px;
    border: 1px solid #e4e4e7;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: 0.05s;
    overflow: hidden;
}

.popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #818cf8, #a78bfa, #e879f9, #f472b6, #fb923c, #818cf8);
    background-size: 300% 100%;
    animation: gradientScroll 6s ease-in-out infinite;
}

.popup-backdrop.active .popup {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #a1a1aa;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}

.popup-close:hover {
    color: #52525b;
    background: #f4f4f5;
}

.popup-title {
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.5px;
    color: #09090b;
    margin-bottom: 6px;
}

.popup-desc {
    font-size: 13px;
    line-height: 1.5;
    color: #71717a;
    margin-bottom: 18px;
}

.popup-links {
    display: flex;
    gap: 8px;
}

.popup-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    color: #3f3f46;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid #e4e4e7;
    background: #ffffff;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.popup-btn:hover {
    background: #fafafa;
    border-color: #d4d4d8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.popup-btn svg {
    flex-shrink: 0;
    width: 13px;
    height: 13px;
    color: #71717a;
}

/* ══════════════════════════════════════
   Keyframes
   ══════════════════════════════════════ */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ctaPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

@keyframes gradientScroll {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 300% 50%; }
    100% { background-position: 0% 50%; }
}

/* ══════════════════════════════════════
   Responsive — Tablet
   ══════════════════════════════════════ */
@media (max-width: 768px) {
    main {
        padding: 72px 24px 60px;
    }

    .hero {
        margin-bottom: 44px;
    }

    .theme-toggle {
        top: 16px;
        left: 16px;
    }
}

/* ══════════════════════════════════════
   Responsive — Small phones
   ══════════════════════════════════════ */
@media (max-width: 480px) {
    main {
        padding: 56px 16px 48px;
    }

    .hero-identity {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .hero-avatar {
        width: 56px;
        height: 56px;
    }

    .hero-name {
        font-size: 32px;
    }

    .hero-sub {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .hero-links {
        gap: 16px;
        flex-wrap: wrap;
    }

    .hero-link {
        font-size: 13px;
    }

    .project-card {
        padding: 14px;
        gap: 12px;
    }

    .project-logo {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }

    .project-header {
        flex-wrap: wrap;
        gap: 6px;
    }

    .project-name {
        font-size: 14px;
    }

    .project-desc {
        font-size: 13px;
    }

    .project-arrow {
        display: none;
    }

    .section-label {
        font-size: 12px;
    }

    .popup-backdrop {
        top: auto;
        bottom: 16px;
        right: 0;
        left: 0;
        display: flex;
        justify-content: center;
    }

    .popup {
        width: calc(100vw - 32px);
        max-width: 320px;
        padding: 18px;
        transform: translateY(12px) scale(0.98);
    }

    .popup-backdrop.active .popup {
        transform: translateY(0) scale(1);
    }

    .footer {
        margin-top: 48px;
        padding-top: 24px;
    }

    .theme-toggle {
        top: 12px;
        left: 12px;
        padding: 5px;
    }

    .theme-toggle svg {
        width: 14px;
        height: 14px;
    }
}

/* ══════════════════════════════════════
   Theme Toggle Button
   ══════════════════════════════════════ */
.theme-toggle {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 150;
    background: none;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
    color: #71717a;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: #09090b;
    border-color: #d4d4d8;
    background: #f4f4f5;
}

.theme-icon-moon { display: none; }
.theme-icon-sun { display: block; }

html[data-theme="dark"] .theme-icon-moon { display: block; }
html[data-theme="dark"] .theme-icon-sun { display: none; }

/* ══════════════════════════════════════
   Dark Mode
   ══════════════════════════════════════ */
html[data-theme="dark"] {
    body {
        color: #fafafa;
        background: #09090b;
    }

    ::selection {
        background: rgba(129, 140, 248, 0.25);
        color: #fafafa;
    }

    ::-webkit-scrollbar-thumb {
        background: #27272a;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #3f3f46;
    }

    .hero-avatar {
        border-color: #27272a;
    }

    .hero-name {
        color: #fafafa;
    }

    .hero-name-text::after {
        opacity: 0.5;
    }

    .hero-sub {
        color: #a1a1aa;
    }

    .hero-link {
        color: #a1a1aa;
    }

    .hero-link:hover {
        color: #fafafa;
    }

    .section-label {
        color: #71717a;
    }

    .project-card {
        background: #0a0a0a;
        border-color: #27272a;
    }

    .project-card:hover {
        background: #18181b;
        border-color: #3f3f46;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .project-card:active {
        background: #1a1a1e;
    }

    .project-card:focus-visible {
        outline-color: #fafafa;
    }

    .project-logo {
        background: #18181b;
        border-color: #27272a;
    }

    .project-name {
        color: #fafafa;
    }

    .project-badge {
        background: #064e3b;
        color: #6ee7b7;
    }

    .badge-wip {
        background: #451a03;
        color: #fbbf24;
    }

    .project-users {
        color: #52525b;
    }

    .project-desc {
        color: #71717a;
    }

    .project-card:hover .project-desc {
        color: #a1a1aa;
    }

    .project-arrow {
        color: #27272a;
    }

    .project-card:hover .project-arrow {
        color: #52525b;
    }

    .footer {
        border-top-color: #27272a;
    }

    .footer-text {
        color: #71717a;
    }

    .footer-copy {
        color: #3f3f46;
    }

    .popup {
        background: #18181b;
        border-color: #27272a;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }

    .popup-close {
        color: #52525b;
    }

    .popup-close:hover {
        color: #a1a1aa;
        background: #27272a;
    }

    .popup-title {
        color: #fafafa;
    }

    .popup-desc {
        color: #71717a;
    }

    .popup-btn {
        color: #a1a1aa;
        border-color: #27272a;
        background: #18181b;
    }

    .popup-btn:hover {
        background: #27272a;
        border-color: #3f3f46;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }

    .popup-btn svg {
        color: #52525b;
    }

    .theme-toggle {
        border-color: #27272a;
        color: #71717a;
    }

    .theme-toggle:hover {
        color: #fafafa;
        border-color: #3f3f46;
        background: #27272a;
    }
}
