/* ============================================
   Dashboard — Brendan Mahon
   Dark theme, Bloomberg meets Apple
   ============================================ */

:root {
    --bg:           #0a0a0f;
    --bg-card:      #12121a;
    --bg-card-hover:#1a1a26;
    --border:       #1e1e2e;
    --border-light: #2a2a3a;
    --text:         #e4e4ef;
    --text-muted:   #8888a0;
    --text-dim:     #555568;
    --accent:       #6c9bff;
    --accent-glow:  rgba(108, 155, 255, 0.12);
    --red:          #ff5c5c;
    --red-bg:       rgba(255, 92, 92, 0.08);
    --amber:        #ffb347;
    --amber-bg:     rgba(255, 179, 71, 0.08);
    --blue:         #6c9bff;
    --blue-bg:      rgba(108, 155, 255, 0.08);
    --green:        #4cda8b;
    --green-bg:     rgba(76, 218, 139, 0.08);
    --purple:       #b48cff;
    --purple-bg:    rgba(180, 140, 255, 0.08);
    --radius:       10px;
    --radius-sm:    6px;
    --shadow:       0 1px 3px rgba(0,0,0,0.4);
    --shadow-lg:    0 8px 30px rgba(0,0,0,0.5);
    --font:         -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono:    'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    --transition:   0.2s ease;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Animations ---- */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

.loading { color: var(--text-dim); animation: pulse 1.5s ease infinite; }

/* ---- Navigation ---- */

#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.nav-links { display: flex; gap: 4px; }

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

.nav-links a:hover {
    color: var(--text);
    background: var(--bg-card);
}

/* ---- Hero ---- */

.hero {
    padding: 100px 0 48px;
    animation: fadeIn 0.6s ease;
}

.hero-greeting {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #fff;
    margin-bottom: 12px;
}

.hero-meta {
    margin-bottom: 20px;
}

.hero-datetime {
    font-size: 15px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-weight: 400;
}

.hero-quote {
    font-size: 15px;
    color: var(--text-dim);
    font-style: italic;
    max-width: 560px;
    line-height: 1.6;
}

/* ---- Bible Quote ---- */

.bible-quote-card {
    margin-top: 20px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(180, 140, 255, 0.06), rgba(108, 155, 255, 0.04));
    border: 1px solid rgba(180, 140, 255, 0.15);
    border-radius: var(--radius);
    max-width: 600px;
    position: relative;
}

.bible-icon {
    font-size: 18px;
    margin-bottom: 8px;
    opacity: 0.8;
}

.bible-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    font-style: italic;
}

.bible-ref {
    font-size: 13px;
    color: var(--purple);
    margin-top: 10px;
    font-weight: 500;
    font-style: normal;
}

.bible-reflection {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: normal;
    padding-top: 8px;
    border-top: 1px solid rgba(180, 140, 255, 0.1);
}

/* ---- Sections ---- */

.section {
    padding: 48px 0;
    animation: fadeInUp 0.5s ease both;
}

.section:nth-child(1) { animation-delay: 0.05s; }
.section:nth-child(2) { animation-delay: 0.1s; }
.section:nth-child(3) { animation-delay: 0.15s; }
.section:nth-child(4) { animation-delay: 0.2s; }
.section:nth-child(5) { animation-delay: 0.25s; }

.section-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

/* ---- Briefing ---- */

.briefing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color var(--transition);
}

.briefing-card:hover { border-color: var(--border-light); }

.briefing-date {
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-dim);
    margin-bottom: 12px;
}

.briefing-summary {
    font-size: 15px;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 20px;
}

.briefing-highlights {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.briefing-highlights li {
    font-size: 13px;
    color: var(--text-muted);
    padding-left: 18px;
    position: relative;
}

.briefing-highlights li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.briefing-section {
    margin-top: 16px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

.briefing-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 8px;
}

.briefing-section-body {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ---- Calendar ---- */

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.cal-day {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px;
    min-height: 80px;
    transition: border-color var(--transition), transform var(--transition);
    position: relative;
}

.cal-day:hover {
    border-color: var(--border-light);
    transform: translateY(-1px);
}

.cal-day.today {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.cal-day-num {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    font-family: var(--font-mono);
}

.cal-day-name {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.cal-event {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 3px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-event.birthday {
    background: var(--purple-bg);
    color: var(--purple);
}

.cal-event.anniversary {
    background: var(--red-bg);
    color: var(--red);
}

.cal-event.work {
    background: var(--blue-bg);
    color: var(--blue);
}

.cal-event.personal {
    background: var(--green-bg);
    color: var(--green);
}

.cal-event.deadline {
    background: var(--amber-bg);
    color: var(--amber);
}

/* ---- Tasks ---- */

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.task-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), transform var(--transition);
}

.task-item:hover {
    border-color: var(--border-light);
    transform: translateX(2px);
}

.task-item.completed { opacity: 0.4; }
.task-item.completed .task-text { text-decoration: line-through; }

.priority-badge {
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
    padding: 3px 8px;
    border-radius: 4px;
    flex-shrink: 0;
    min-width: 32px;
    text-align: center;
}

.priority-badge.p1 { background: var(--red-bg); color: var(--red); }
.priority-badge.p2 { background: var(--amber-bg); color: var(--amber); }
.priority-badge.p3 { background: var(--blue-bg); color: var(--blue); }

.task-text {
    font-size: 14px;
    color: var(--text);
    flex: 1;
    min-width: 0;
}

.task-category {
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    flex-shrink: 0;
}

.task-due {
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    flex-shrink: 0;
}

.task-note {
    font-size: 11px;
    color: var(--text-dim);
    font-style: italic;
    margin-top: 3px;
    width: 100%;
    flex-basis: 100%;
}

.task-item.p1-accent { border-left: 3px solid var(--red); }
.task-item.p2-accent { border-left: 3px solid var(--amber); }
.task-item.p3-accent { border-left: 3px solid var(--blue); }

/* ---- Projects ---- */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.project-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.project-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.green  { background: var(--green);  box-shadow: 0 0 8px var(--green); }
.status-dot.amber  { background: var(--amber);  box-shadow: 0 0 8px var(--amber); }
.status-dot.red    { background: var(--red);     box-shadow: 0 0 8px var(--red); }

.project-status {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.project-desc {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 12px;
}

.project-note {
    font-size: 11px;
    color: var(--accent);
    font-style: italic;
    margin-top: 4px;
    margin-bottom: 4px;
}

.project-updated {
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

/* ---- Quick Links ---- */

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color var(--transition), transform var(--transition), background var(--transition);
}

.link-card:hover {
    border-color: var(--border-light);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.link-icon { font-size: 24px; }

.link-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

/* ---- Footer ---- */

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

.footer p {
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
    font-family: var(--font-mono);
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
    .nav-links { display: none; }

    .hero { padding: 76px 0 28px; }
    .hero-greeting { font-size: 28px !important; }

    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cal-day { min-height: 64px; }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .links-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .task-item {
        flex-wrap: wrap;
        gap: 8px;
    }

    .task-category, .task-due {
        font-size: 10px;
    }

    .section { padding: 24px 0; }
    .section-title { font-size: 18px !important; }

    .bible-quote-card {
        padding: 16px 18px;
    }

    .bible-text { font-size: 14px; }

    .briefing-summary { font-size: 14px !important; }
}

@media (max-width: 480px) {
    .container { padding: 0 14px; }

    .hero { padding: 68px 0 24px; }
    .hero-greeting { font-size: 24px !important; }
    .hero-datetime { font-size: 12px !important; }
    .hero-quote { font-size: 13px; }

    .calendar-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .cal-day { padding: 8px; min-height: 56px; }
    .cal-event { font-size: 10px; padding: 2px 4px; }

    .links-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .link-card { padding: 14px 8px; }
    .link-icon { font-size: 20px; }

    .task-item { padding: 12px 14px; }
    .task-text { font-size: 13px; }

    .project-card { padding: 16px; }

    .bible-quote-card { padding: 14px 16px; max-width: 100%; }
    .bible-text { font-size: 13px; line-height: 1.6; }
    .bible-ref { font-size: 12px; }
    .bible-reflection { font-size: 12px; }

    .section { padding: 20px 0; }

    .footer { padding: 16px 0; font-size: 11px; }
}

/* ---- Scrollbar ---- */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
