/* TechToday — dark theme stylesheet */

:root {
    --bg: #121212;
    --bg-elevated: #1e1e1e;
    --border: #2c2c2c;
    --text: #e0e0e0;
    --text-muted: #9e9e9e;
    --text-faint: #757575;
    --accent: #90caf9;
    --bg-elevated-2: #2a2a2a;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: 90%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header / Nav */

header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text);
}

.brand:hover {
    text-decoration: none;
}

.brand .logo {
    width: 28px;
    height: 28px;
}

.study-dropdown {
    position: relative;
}

.study-dropdown>summary {
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    list-style: none;
    user-select: none;
}

.study-dropdown summary::-webkit-details-marker,
.study-group summary::-webkit-details-marker {
    display: none;
}

.study-dropdown>summary::after {
    content: "\25BE";
    display: inline-block;
    margin-left: 0.4rem;
    color: var(--accent);
    transition: transform 0.15s ease;
}

.study-dropdown[open]>summary::after {
    transform: rotate(180deg);
}

.study-dropdown>summary:hover,
.study-dropdown>summary:focus-visible {
    color: var(--text);
}

.study-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    width: max-content;
    min-width: 210px;
    max-height: min(60vh, 360px);
    overflow-y: auto;
    padding: 0.4rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.study-dropdown-menu a {
    display: block;
    padding: 0.55rem 0.7rem;
    color: var(--text-muted);
    border-radius: 5px;
    white-space: nowrap;
}

.study-dropdown-menu a:hover,
.study-dropdown-menu a:focus-visible {
    color: var(--text);
    background: #282828;
    text-decoration: none;
}

.study-dropdown-menu [hidden],
[hidden] {
    display: none !important;
}

.study-group+.study-group {
    border-top: 1px solid var(--border);
}

.study-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.7rem;
    color: var(--text);
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    list-style: none;
    user-select: none;
}

.study-group summary::after {
    content: "\25B8";
    margin-left: 1rem;
    color: var(--accent);
    transition: transform 0.15s ease;
}

.study-group[open] summary::after {
    transform: rotate(90deg);
}

.study-group summary:hover,
.study-group summary:focus-visible {
    background: #282828;
}

.study-group-links {
    padding: 0 0.25rem 0.4rem;
}

.study-group-links a {
    padding-left: 1rem;
}

/* Hero */

.hero {
    padding: 0.65rem 0;
    text-align: left;
}

.hero .container {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 0.75rem;
}

.hero h1 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1.3;
}

.hero .subtitle {
    color: var(--text-faint);
    font-size: 0.8125rem;
    margin: 0;
    white-space: nowrap;
}

.hero .subtitle::before {
    content: "\2022";
    margin-right: 0.75rem;
    color: var(--border);
}

/* Sections */

section {
    padding: 0.75rem 0;
}

/* Project / feature cards */

.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    counter-reset: project-card;
}

.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.9rem 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card {
    counter-increment: project-card;
}

.card-header::before {
    content: counter(project-card);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 50%;
    border: 1px solid #4caf50;
    color: #ff9800;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1;
}

.card .icon {
    font-size: 1.25rem;
}

.card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.card p {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.card .status {
    display: inline-block;
    width: fit-content;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    margin-top: 0.25rem;
}

.status.live {
    background: rgba(102, 187, 106, 0.15);
    color: #81c784;
}

.status.coming-soon {
    background: rgba(255, 183, 77, 0.15);
    color: #ffb74d;
}

/* Info Link */
.info-link {
    position: relative;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 1rem;
    line-height: 1;
    color: #4caf50;
}

.info-link:hover {
    color: #ff9800;
    text-decoration: none;
}

.info-link::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 135%;
    right: 0;
    white-space: nowrap;
    background: var(--bg-elevated-2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.6875rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
    z-index: 20;
}

.info-link:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Footer */

footer {
    border-top: 1px solid var(--border);
    padding: 1rem 0;
    text-align: center;
    color: var(--text-faint);
    font-size: 0.8125rem;
}

/* Responsive */

@media (max-width: 980px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .study-dropdown>summary {
        font-size: 0.75rem;
    }

    .study-dropdown-menu {
        max-width: calc(100vw - 3rem);
    }

    .hero .container {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.1rem;
    }

    .hero .subtitle::before {
        content: none;
    }

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