/* CSS Variables */
:root {
    --white: #FFFFFF;
    --black: #000000;
    --border: #E0E0E0;
    --border-dark: #000000;
}

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

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--white);
    color: var(--black);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}

/* Menu Container & Dropdown */
.menu-container {
    position: relative;
    width: 40px;
}

.header-menu {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: opacity 0.2s ease;
    padding: 0;
}

.header-menu:hover {
    opacity: 0.6;
}

.header-menu svg {
    width: 24px;
    height: 24px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.75rem;
    background: var(--white);
    border: 1px solid var(--border);
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 100;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s ease;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background-color: var(--black);
    color: var(--white);
}

/* Logo with Instrument Sans */
.header-logo {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header-spacer {
    width: 40px;
}

/* Grid Container */
.grid-container {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-left: 1px solid var(--border);
}

.grid-cell {
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    position: relative;
}

/* App Link */
.app-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 3rem;
    width: 100%;
    height: 100%;
    justify-content: center;
}

.app-icon {
    width: 140px;
    height: 140px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.app-link:hover .app-icon {
    transform: scale(1.08);
}

/* App Name Box */
.app-name {
    display: inline-block;
    border: 2px solid var(--black);
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.app-link:hover .app-name {
    background-color: var(--black);
    color: var(--white);
}

/* Disabled App Link */
.app-link.disabled {
    cursor: not-allowed;
    opacity: 0.5;
    position: relative;
}

.app-link.disabled:hover .app-icon {
    transform: none;
}

.app-link.disabled:hover .app-name {
    background-color: transparent;
    color: var(--black);
}

/* Coming Soon Badge */
.coming-soon {
    position: absolute;
    bottom: 2.5rem;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #999;
}

/* Footer */
.footer {
    padding: 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer p {
    font-size: 0.75rem;
    color: #666;
    letter-spacing: 0.02em;
}

/* Responsive */
@media (max-width: 900px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .header {
        padding: 1rem 1.5rem;
    }

    .header-logo {
        font-size: 1rem;
    }

    .grid-container {
        grid-template-columns: 1fr;
        border-left: none;
    }

    .grid-cell {
        min-height: 300px;
        border-left: none;
        border-right: none;
    }

    .grid-cell:last-child {
        grid-column: auto;
    }

    .app-icon {
        width: 100px;
        height: 100px;
    }

    .app-link {
        padding: 2rem;
        gap: 1.5rem;
    }

    .app-name {
        font-size: 0.8125rem;
        padding: 0.4rem 1.25rem;
    }
}

/* About Page */
.about-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.about-content {
    max-width: 500px;
    text-align: center;
}

.about-title {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.about-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #444;
    margin-bottom: 1.5rem;
}

.about-link {
    display: inline-block;
    border: 2px solid var(--black);
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.about-link:hover {
    background-color: var(--black);
    color: var(--white);
}

/* Team From Section */
.team-from {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.team-from-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #999;
    margin-bottom: 1.25rem;
}

.team-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
    flex-wrap: wrap;
}

.team-logo {
    height: 18px;
    width: auto;
    opacity: 0.4;
}

.team-logo-text {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--black);
    opacity: 0.4;
    letter-spacing: -0.01em;
}

.team-logo-text.berkeley {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* Contact Page */
.contact-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.contact-content {
    max-width: 500px;
    text-align: center;
}

.contact-title {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.contact-subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
}

.contact-email {
    display: inline-block;
    border: 2px solid var(--black);
    padding: 0.75rem 2rem;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
}

.contact-email:hover {
    background-color: var(--black);
    color: var(--white);
}
