:root {
    /* Monochromatic Palette */
    --bg-body: #09090b;
    /* neutral-950 */
    --bg-card: #09090b;
    --bg-hover: #18181b;
    /* neutral-900 */
    --fg-primary: #fafafa;
    /* neutral-50 */
    --fg-secondary: #a1a1aa;
    /* neutral-400 */
    --fg-muted: #71717a;
    /* neutral-500 */
    --border: #27272a;
    /* neutral-800 */
    --accent: #ffffff;

    --spacing-unit: 1rem;
    --container-width: 960px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-body);
    color: var(--fg-primary);
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4,
p {
    font-weight: 400;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 0.95;
    font-weight: 700;
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

ul {
    list-style: none;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.grid {
    display: grid;
    gap: 1px;
    background-color: var(--border);
    border: 1px solid var(--border);
}

.grid-item {
    background-color: var(--bg-card);
    padding: 2rem;
}

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

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

@media (min-width: 768px) {
    .grid-cols-2 {
        grid-template-columns: 1fr 1fr;
    }

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

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background-color: rgba(9, 9, 11, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    z-index: 50;
    display: flex;
    align-items: center;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.03em;
}

/* Mobile Menu - CSS Only with Checkbox Hack */
#menu-toggle {
    display: none;
}

.nav-links {
    display: none;
    gap: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background-color: rgba(9, 9, 11, 0.98);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 1rem;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
        position: static;
        background-color: transparent;
        border-bottom: none;
        flex-direction: row;
        padding: 0;
    }
}

#menu-toggle:checked+.nav-inner .nav-links {
    display: flex;
}

.nav-links a:hover {
    color: var(--fg-muted);
}

.nav-links a {
    padding: 0.5rem 0;
}

@media (min-width: 768px) {
    .nav-links a {
        padding: 0;
    }
}

/* Hamburger Menu Label */
.mobile-menu-label {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
}

@media (min-width: 768px) {
    .mobile-menu-label {
        display: none;
    }
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: white;
    color: black;
    border-color: white;
}

.btn-primary:hover {
    background-color: #e5e5e5;
    border-color: #e5e5e5;
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border-color: var(--fg-muted);
}

.btn-secondary:hover {
    border-color: white;
    background-color: rgba(255, 255, 255, 0.05);
}

.tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border);
    color: var(--fg-muted);
    display: inline-block;
}

/* Tech Strip - Fixed Overflow */
.tech-strip {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background-color: #18181b33;
    padding: 2rem 0;
    overflow-x: auto;
    white-space: nowrap;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.tech-strip::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.tech-strip-inner {
    display: flex;
    width: 100%;
}

.tech-strip span {
    margin-right: 2rem;
    color: var(--fg-muted);
    font-size: 0.875rem;
}

.tech-strip span:last-child {
    margin-right: 0;
}

/* Project Cards */
.project-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.project-card {
    flex-direction: column;
}

@media (min-width: 768px) {
    .project-card {
        flex-direction: row;
    }
}

.project-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 140px;
}

.lab-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    gap: 0.5rem;
}

.lab-item:hover {
    background-color: var(--bg-hover);
}

.contact-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 12rem;
    border: 1px solid var(--border);
    padding: 2rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.contact-card:hover {
    border-color: white;
    background-color: var(--bg-hover);
}

.icon-box {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Utils */
.text-muted {
    color: var(--fg-secondary);
}

.text-sm {
    font-size: 0.875rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.uppercase {
    text-transform: uppercase;
}

.font-mono {
    font-family: monospace;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    font-size: 0.75rem;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

footer .flex {
    justify-content: space-between;
}

@media (max-width: 768px) {
    footer .flex {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}

/* SVG Icons */
svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-sm {
    width: 16px;
    height: 16px;
}

.icon-md {
    width: 24px;
    height: 24px;
}

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