/* ==========================================================================
   NOTTY PEPE - HOME PAGE STYLESHEET
   Shadcn-inspired Dark Theme with Google Comfortaa Typography
   ========================================================================== */

:root {
    --bg-canvas: #09090b;
    --card-bg: #121217;
    --card-bg-hover: #17171f;
    --card-border: #27272a;
    --card-border-hover: #3f3f46;
    
    --text-primary: #f4f4f5;
    --text-muted: #a1a1aa;
    --text-dim: #71717a;
    
    /* Accents */
    --accent-emerald: #10b981;
    --accent-cyan: #00f3ff;
    --accent-violet: #a855f7;
    --accent-zinc: #e4e4e7;
    
    --font-family: 'Comfortaa', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --footer-theme: var(--accent-emerald);

    /* Theme Variable Aliases for Widgets */
    --bg-card: #121217;
    --bg-card-subtle: #18181f;
    --border-color: #27272a;
    --text-secondary: #d4d4d8;
    --primary-blue: #3b82f6;
    --primary-blue-light: rgba(59, 130, 246, 0.12);
    --primary-blue-glow: rgba(59, 130, 246, 0.3);
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    min-height: 100vh;
    min-height: 100dvh;
    background-color: var(--bg-canvas);
    color: var(--text-primary);
    font-family: var(--font-family);
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
}

/* Subtle Ambient Background */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 0;
}

/* Clean Top-Right Navigation Trigger */
.top-corner-nav {
    position: absolute;
    top: 24px;
    right: 28px;
    z-index: 100;
    pointer-events: auto;
}

@media (max-width: 600px) {
    .top-corner-nav {
        top: 16px;
        right: 16px;
        z-index: 100;
    }
}

.main-container {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 56px 24px 48px 24px;
    position: relative;
    z-index: 1;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    text-align: center;
    margin-bottom: 44px;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    min-height: 1.6rem;
    font-weight: 500;
}

#typing-text::after {
    content: '_';
    color: var(--accent-emerald);
    font-weight: 700;
    margin-left: 3px;
    animation: blinkCursor 1s step-end infinite;
}

@keyframes blinkCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ==========================================================================
   PRIMARY PORTAL GRID (SHADCN STYLE)
   ========================================================================== */
.portal-section {
    width: 100%;
    margin-bottom: 40px;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Portal Card */
.portal-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 28px 24px 22px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: space-between;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.portal-card:hover {
    background: var(--card-bg-hover);
    border-color: var(--card-border-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.6);
}

/* Accent Borders on Hover */
.portal-card-emerald:hover {
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: 0 12px 28px -10px rgba(16, 185, 129, 0.15);
}

.portal-card-cyan:hover {
    border-color: rgba(0, 243, 255, 0.45);
    box-shadow: 0 12px 28px -10px rgba(0, 243, 255, 0.15);
}

.portal-card-violet:hover {
    border-color: rgba(168, 85, 247, 0.45);
    box-shadow: 0 12px 28px -10px rgba(168, 85, 247, 0.15);
}

.portal-card-zinc:hover {
    border-color: rgba(228, 228, 231, 0.4);
    box-shadow: 0 12px 28px -10px rgba(255, 255, 255, 0.1);
}

/* Card Header */
.card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 18px;
    position: static;
}

.card-icon-box {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color, var(--accent-emerald));
    margin-top: 8px;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.portal-card:hover .card-icon-box {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px -2px var(--accent-color, rgba(16, 185, 129, 0.4));
}

.card-icon {
    width: 28px;
    height: 28px;
}

.card-badges {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 6px;
}

.card-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

/* Card Body */
.card-body {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.card-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    font-weight: 400;
    max-width: 92%;
    margin: 0 auto;
}

/* Card Footer */
.card-footer {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.card-action {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    transition: color 0.2s ease;
}

.portal-card:hover .card-action {
    color: var(--text-primary);
}

.card-arrow {
    width: 16px;
    height: 16px;
    color: var(--text-dim);
    transition: transform 0.25s ease, color 0.2s ease;
}

.portal-card:hover .card-arrow {
    transform: translateX(4px);
    color: var(--text-primary);
}

/* ==========================================================================
   OPTION B: QUICK LAUNCH BAR
   ========================================================================== */
.quick-launch-section {
    width: 100%;
    background: rgba(18, 18, 23, 0.6);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quick-launch-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
}

.quick-icon {
    width: 16px;
    height: 16px;
    color: var(--accent-emerald);
}

.quick-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.quick-launch-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 9999px;
    min-height: 44px; /* Touch target */
    transition: all 0.2s ease;
}

.quick-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-emerald);
    color: #ffffff;
    transform: translateY(-1px);
}

.pill-icon {
    width: 15px;
    height: 15px;
    color: var(--accent-emerald);
    flex-shrink: 0;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE-FIRST PRECISION)
   ========================================================================== */
@media (max-width: 767px) {
    .main-container {
        padding: 40px 16px 40px 16px;
    }

    .hero-title {
        font-size: 2.3rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    /* Exactly 2 tiles per row on phones */
    .portal-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .portal-card {
        padding: 22px 14px 16px;
        border-radius: 12px;
    }

    .card-badges {
        top: 10px;
        right: 10px;
    }

    .card-icon-box {
        width: 44px;
        height: 44px;
        margin-top: 4px;
    }

    .card-icon {
        width: 22px;
        height: 22px;
    }

    .card-badge {
        font-size: 0.62rem;
        padding: 2px 6px;
    }

    .card-title {
        font-size: 1.05rem;
        margin-bottom: 6px;
    }

    .card-desc {
        font-size: 0.78rem;
        line-height: 1.45;
        /* Limit text on mobile tiles for clean balance */
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .card-footer {
        padding-top: 10px;
    }

    .card-action {
        font-size: 0.72rem;
    }

    .quick-launch-section {
        padding: 16px;
    }

    .quick-pill {
        flex: 1 1 calc(50% - 10px);
        justify-content: center;
        padding: 8px 12px;
        font-size: 0.78rem;
    }
}

/* Very Small Screens (< 420px): Exactly 1 tile per row */
@media (max-width: 419px) {
    .portal-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card-desc {
        -webkit-line-clamp: 4;
    }

    .quick-pill {
        flex: 1 1 100%;
        justify-content: flex-start;
    }
}

/* ==========================================================================
   Mobile Anti-Zoom & Touch Safeguards
   ========================================================================== */
html, body {
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

input, select, textarea, button, a {
    touch-action: manipulation;
}

@media screen and (max-width: 850px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

