/* Caltech HPC Landing Page Styles */
/* Brand: https://identity.caltech.edu */

:root {
    /* Official Caltech Colors */
    --caltech-orange: #FF6C0C;      /* PMS 1585c - Primary */
    --caltech-orange-dark: #E55A00;
    --caltech-orange-light: #FF8533;

    /* Neutral Colors */
    --caltech-gray: #76777B;        /* Cool Gray 9 */
    --caltech-gray-light: #C8C8C8;  /* Cool Grey 3c */

    /* Deep Colors */
    --caltech-deep-blue: #003B4C;   /* PMS 548c */
    --caltech-deep-teal: #005851;   /* PMS 3292c */

    /* Accent Colors */
    --caltech-blue: #00A1DF;        /* PMS 299c */
    --caltech-teal: #1E988A;        /* PMS 7473c */

    /* UI Colors */
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: var(--caltech-gray);
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-dark: var(--caltech-deep-blue);
    --border-color: #e5e7eb;

    /* Effects */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    /* Caltech brand: Helvetica Neue, fallback to Arial */
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    height: 36px;
    width: auto;
}

.brand-text {
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--caltech-orange);
}

/* Maintenance / Outage Banner (hidden by default) */
.maintenance-banner {
    background: var(--caltech-orange-dark);
    color: white;
    padding: 0.65rem 2rem;
    text-align: center;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.maintenance-banner a {
    color: white;
    text-decoration: underline;
}

.maintenance-banner a:hover {
    opacity: 0.85;
}

.maintenance-banner strong {
    margin-right: 0.4em;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10rem 2rem 5rem;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-content {
    max-width: 700px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--caltech-orange);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    cursor: pointer;
}

.btn-primary {
    background: var(--caltech-orange);
    color: white;
    border: 2px solid var(--caltech-orange);
}

.btn-primary:hover {
    background: var(--caltech-orange-dark);
    border-color: var(--caltech-orange-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--caltech-orange);
    color: var(--caltech-orange);
}

/* News Section */
.news {
    background: var(--bg-secondary);
    padding: 3rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.news-container {
    max-width: 1200px;
    margin: 0 auto;
}

.news h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    text-align: center;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.news-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    border-color: var(--caltech-orange);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.news-card:hover .news-link {
    text-decoration: underline;
}

.news-date {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--caltech-orange);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.news-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.news-summary {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 1rem;
    flex: 1;
}

.news-link {
    font-size: 0.9rem;
    color: var(--caltech-orange);
    font-weight: 500;
    margin-top: auto;
}

/* Stats Section */
.stats {
    background: var(--bg-dark);
    padding: 1rem 2rem;
}

.stats-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.stat-card {
    text-align: center;
    padding: 0.75rem 1rem;
}

.stat-number {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--caltech-orange);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

/* Cluster Status Section */
.cluster-status {
    padding: 6rem 2rem;
    background: var(--bg-secondary);
}

.status-container {
    max-width: 1280px;
    margin: 0 auto;
}

.cluster-status h2 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

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

.dashboard-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.dashboard-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Accessibility: skip-to-content link, off-screen until keyboard-focused. */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 1rem;
    background: var(--caltech-orange, #FF6C0C);
    color: #fff;
    font-weight: 600;
    border-radius: 0 0 var(--radius-sm, 4px) 0;
}

.skip-link:focus {
    left: 0;
}

/* Make sure the [hidden] attribute always wins — used by the maintenance
   banner and by the news section's empty/error fallback. */
[hidden] {
    display: none !important;
}

.dashboard-frame {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.dashboard-frame iframe {
    display: block;
    border: none;
}

/* Quick Links Section */
.quick-links {
    padding: 6rem 2rem;
}

.links-container {
    max-width: 1280px;
    margin: 0 auto;
}

.quick-links h2 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.link-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.link-card:hover {
    border-color: var(--caltech-orange);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.link-card:hover .link-icon {
    color: var(--caltech-orange);
}

.link-icon {
    color: var(--text-muted);
    margin-bottom: 1rem;
    transition: color 0.2s;
}

.link-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.link-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 4rem 2rem 2rem;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
}

.footer-logo {
    height: 40px;
    width: auto;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.footer-address {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-column a {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.375rem 0;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: var(--caltech-orange);
}

.footer-bottom {
    max-width: 1280px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero {
        padding-top: 6rem;
    }

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

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

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

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

    .footer-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 640px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    .stats-container {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .dashboard-grid,
    .dashboard-grid-2 {
        grid-template-columns: 1fr;
    }

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

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

    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
