/* --- theme tokens (mirrors thomaslenh-v2) --- */
:root {
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --text-primary: #18181b;
    --text-secondary: #3f3f46;
    --text-muted: #52525b;
    --text-subtle: #71717a;
    --text-faint: #a1a1aa;
    --border-color: #e4e4e7;
    --tag-bg: #f4f4f5;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--bg-primary);
}

/* animated quasicrystal background — fixed behind everything */
#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* background control panel — top-left */
#bg-controls {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 20;
    width: 150px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid var(--border-color);
    font-family: "Geist Mono", ui-monospace, monospace;
    font-size: 10px;
    color: var(--text-muted);
}

#bg-controls .bgc-head {
    all: unset;
    cursor: pointer;
    text-transform: lowercase;
    letter-spacing: 0.04em;
    color: var(--text-subtle);
    font-family: inherit;
    font-size: 10px;
}

#bg-controls .bgc-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

#bg-controls.collapsed .bgc-body {
    display: none;
}

#bg-controls label {
    display: flex;
    justify-content: space-between;
    text-transform: lowercase;
    margin-top: 4px;
}

#bg-controls label span {
    color: var(--text-faint);
}

#bg-controls input[type="range"] {
    width: 100%;
    height: 12px;
    margin: 0;
    accent-color: #92560e;
    cursor: pointer;
}

body {
    margin: 0;
    background: transparent;
    color: var(--text-secondary);
    font-family: "Geist", system-ui, -apple-system, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background: var(--border-color);
    color: var(--text-primary);
}

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

/* --- nav: just the MLH mark + light links --- */
.nav-bar {
    background: transparent;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 36rem;
    margin: 0 auto;
    padding: 16px 24px;
}

.nav-logo {
    display: inline-flex;
    align-items: center;
}

.nav-logo img {
    height: 22px;
    width: auto;
    display: block;
}

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

.nav-link {
    color: var(--text-subtle);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

/* --- shared page width --- */
.page {
    max-width: 36rem;
    margin: 20px auto 44px;
    padding: 44px 34px;
    background: rgba(255, 255, 255, 0.5);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
    backdrop-filter: blur(16px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow:
        0 12px 44px rgba(24, 24, 27, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

/* --- hero --- */
.hero {
    margin-bottom: 56px;
}

.hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.hero h1 {
    margin: 0;
    font-size: 3rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--text-primary);
    text-transform: lowercase;
}

.socials {
    display: flex;
    align-items: center;
    gap: 16px;
}

.social {
    display: inline-flex;
    color: var(--text-subtle);
    transition: color 0.2s ease, filter 0.2s ease;
}

.social:hover {
    color: var(--text-primary);
    filter: drop-shadow(0 0 8px rgba(24, 24, 27, 0.25));
}

.bio {
    max-width: 100%;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.bio-lead {
    margin: 0 0 4px;
}

.bio-line {
    margin: 2px 0 0 16px;
    color: var(--text-muted);
}

.arrow {
    color: var(--text-faint);
}

/* --- sections --- */
.section {
    margin-bottom: 44px;
}

.section-title {
    margin: 0 0 18px;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--text-muted);
    text-transform: lowercase;
}

/* --- work / education cards --- */
.work-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 100%;
}

.work-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
    transition: opacity 0.2s ease;
}

a.work-card:hover {
    opacity: 0.65;
}

.work-card--static {
    cursor: default;
}

.work-logo {
    width: 48px;
    height: 48px;
    border-radius: 0;
    overflow: hidden;
    flex-shrink: 0;
}

.work-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.work-logo--dark {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.work-logo--dark img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.work-meta {
    flex: 1;
    min-width: 0;
}

.work-company {
    display: block;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    color: #1a1a1a;
    text-transform: lowercase;
}

.work-role {
    display: block;
    margin-top: 2px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: lowercase;
}

.work-note {
    display: block;
    margin-top: 1px;
    font-size: 0.8rem;
    color: var(--text-faint);
    text-transform: lowercase;
}

.work-period {
    flex-shrink: 0;
    font-size: 0.9rem;
    color: var(--text-faint);
    text-align: right;
    text-transform: lowercase;
}

/* --- projects --- */
.project-intro {
    margin: -6px 0 22px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.project-intro p {
    margin: 0 0 4px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px 20px;
}

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

.project-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 0;
    background: #e4e4e7;
    margin-bottom: 12px;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.project-card:hover .project-img img {
    transform: scale(1.04);
}

.project-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.project-name {
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
    color: #1a1a1a;
    text-transform: lowercase;
    transition: opacity 0.2s ease;
}

.project-name:hover {
    opacity: 0.65;
}

.project-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-link {
    display: inline-flex;
    color: var(--text-subtle);
    transition: color 0.2s ease;
}

.project-link:hover {
    color: var(--text-primary);
}

.project-link svg {
    width: 14px;
    height: 14px;
}

.project-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 6px;
}

.project-badge {
    flex-shrink: 0;
    font-size: 0.7rem;
    padding: 2px 9px;
    border-radius: 0;
    background: #fdeccd;
    color: #92560e;
    text-transform: lowercase;
    white-space: nowrap;
}

.project-desc {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--text-subtle);
    text-transform: lowercase;
}

/* --- travel map --- */
#map {
    height: 320px;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    border: 1px solid var(--border-color);
    margin-bottom: 14px;
    z-index: 0;
}

.places {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0;
    max-width: 100%;
}

.places li {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 5px 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: lowercase;
}

/* --- skills --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    max-width: 100%;
}

.skill-group-title {
    margin: 0 0 10px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-faint);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: var(--tag-bg);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 4px 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: lowercase;
}

/* --- week 1 learnings --- */
.learnings {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    max-width: 100%;
}

.learnings li {
    margin: 0 0 8px;
    color: var(--text-muted);
    font-size: 1rem;
}

/* --- hobbies --- */
.hobby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    max-width: 100%;
}

.hobby-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    overflow: hidden;
}

.hobby-card img,
.hobby-icon {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    object-fit: cover;
}

.hobby-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: var(--tag-bg);
}

.hobby-card h3 {
    margin: 12px 16px 4px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: lowercase;
}

.hobby-card p {
    margin: 0 16px 14px;
    font-size: 0.85rem;
    color: var(--text-subtle);
}

/* --- timeline --- */
.timeline-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.timeline-form-row {
    display: flex;
    gap: 10px;
}

.timeline-form-row input {
    flex: 1;
    min-width: 0;
}

.timeline-form input,
.timeline-form textarea {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-primary);
    resize: vertical;
}

.timeline-form input::placeholder,
.timeline-form textarea::placeholder {
    color: var(--text-faint);
    text-transform: lowercase;
}

.timeline-form input:focus,
.timeline-form textarea:focus {
    outline: none;
    border-color: var(--text-faint);
}

.timeline-form-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.timeline-form button {
    margin-left: auto;
    background: #fdeccd;
    color: #92560e;
    border: 1px solid #f3d9a4;
    border-radius: 0;
    padding: 6px 18px;
    font-family: inherit;
    font-size: 0.9rem;
    text-transform: lowercase;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.timeline-form button:hover {
    opacity: 0.75;
}

.timeline-form button:disabled {
    opacity: 0.45;
    cursor: default;
}

.timeline-status {
    font-size: 0.85rem;
    color: var(--text-faint);
    text-transform: lowercase;
}

.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline-empty {
    margin: 0;
    color: var(--text-faint);
    font-size: 0.95rem;
}

.timeline-post {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
}

.timeline-avatar {
    width: 40px;
    height: 40px;
    border-radius: 0;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    background: var(--tag-bg);
}

.timeline-body {
    flex: 1;
    min-width: 0;
}

.timeline-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.timeline-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    text-transform: lowercase;
    overflow-wrap: anywhere;
}

.timeline-date {
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--text-faint);
}

.timeline-content {
    margin: 4px 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

/* --- footer socials --- */
.site-footer {
    max-width: 36rem;
    margin: 0 auto;
    padding: 8px 24px 56px;
}

/* --- responsive --- */
@media (max-width: 640px) {
    .hero h1 {
        font-size: 2.25rem;
    }

    .page {
        margin: 12px auto 28px;
        padding: 28px 20px;
    }
}
