:root {
    --bg: #0a0a0a;
    --bg-hover: #111111;
    --text: #c9d1d9;
    --text-dim: #8b949e;
    --text-bright: #e6edf3;
    --accent: #5eead4;
    --border: #21262d;
    --status-released: #3fb950;
    --status-live: #d29922;
    --status-dev: #8b949e;
    --font: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent);
    text-decoration: none;
}

.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* ============================================
   Header
   ============================================ */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0 2.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 3rem;
}

.header-id {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    opacity: 0.9;
    flex-shrink: 0;
}

.name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-bright);
    letter-spacing: 0.02em;
}

nav {
    display: flex;
    gap: 1.25rem;
}

nav a {
    color: var(--text-dim);
    font-size: 0.875rem;
    transition: color 0.15s;
}

nav a:hover {
    color: var(--accent);
}

/* ============================================
   Intro
   ============================================ */

#intro {
    margin-bottom: 4rem;
}

.prompt {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    min-height: 2em;
}

.prompt-symbol {
    color: var(--accent);
    margin-right: 0.5rem;
    user-select: none;
}

#cursor-text {
    color: var(--accent);
}

.cursor {
    color: var(--accent);
    animation: blink 0.8s step-end infinite;
    font-weight: 400;
}

@keyframes blink {
    50% { opacity: 0; }
}

.bio {
    color: var(--text);
    font-size: 0.9375rem;
    max-width: 620px;
    line-height: 1.8;
}

/* ============================================
   Section Headers
   ============================================ */

.section-header {
    font-size: 0.875rem;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    user-select: none;
}

/* ============================================
   Project Tree
   ============================================ */

#projects {
    margin-bottom: 4rem;
}

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

.project summary {
    display: flex;
    align-items: baseline;
    gap: 0.625rem;
    padding: 0.4rem 0.375rem;
    cursor: pointer;
    list-style: none;
    font-size: 0.875rem;
    border-radius: 3px;
    transition: background 0.1s;
}

.project summary::-webkit-details-marker {
    display: none;
}

.project summary:hover {
    background: var(--bg-hover);
}

.tree-prefix {
    color: var(--text-dim);
    flex-shrink: 0;
    user-select: none;
    font-size: 0.875rem;
}

.project-name {
    color: var(--accent);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.project-brief {
    color: var(--text-dim);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-status {
    font-size: 0.6875rem;
    white-space: nowrap;
    padding: 0.125rem 0.5rem;
    border-radius: 2px;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.status-released {
    color: var(--status-released);
    border: 1px solid var(--status-released);
}

.status-live {
    color: var(--status-live);
    border: 1px solid var(--status-live);
}

.status-dev {
    color: var(--status-dev);
    border: 1px solid var(--status-dev);
}

/* Expand indicator */
.project summary::after {
    content: '[+]';
    color: var(--text-dim);
    font-size: 0.75rem;
    flex-shrink: 0;
    margin-left: auto;
    opacity: 0.6;
}

.project[open] summary::after {
    content: '[-]';
}

/* ============================================
   Project Detail (expanded)
   ============================================ */

.project-detail {
    padding: 1.5rem 0 2rem 1.75rem;
    margin-bottom: 0.5rem;
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.project-tagline {
    color: var(--text);
    font-size: 0.875rem;
    font-style: italic;
    margin-bottom: 1.25rem;
    padding-left: 0.875rem;
    border-left: 2px solid var(--accent);
    line-height: 1.7;
}

/* Meta section */
.project-meta {
    font-size: 0.8125rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.meta-row {
    display: flex;
    gap: 0.75rem;
}

.meta-label {
    color: var(--text-dim);
    min-width: 4.5rem;
    flex-shrink: 0;
}

.meta-value {
    color: var(--text);
}

.meta-value a {
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
}

.meta-value a:hover {
    border-bottom-color: var(--accent);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.tech-tag {
    font-size: 0.75rem;
    color: var(--text-dim);
    border: 1px solid var(--border);
    padding: 0.0625rem 0.5rem;
    border-radius: 2px;
}

/* Highlights */
.project-highlights h4,
.project-arch h4 {
    font-size: 0.8125rem;
    color: var(--text-dim);
    font-weight: 500;
    margin-bottom: 0.625rem;
    text-transform: lowercase;
}

.project-highlights ul {
    list-style: none;
    font-size: 0.8125rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-highlights li {
    padding-left: 1rem;
    position: relative;
    line-height: 1.65;
}

.project-highlights li::before {
    content: '\00b7';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1.4;
}

.highlight-name {
    color: var(--text-bright);
    font-weight: 500;
}

/* Architecture */
.project-arch {
    margin-bottom: 1.25rem;
}

.project-arch ul {
    list-style: none;
    font-size: 0.8125rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    color: var(--text-dim);
}

.project-arch li {
    padding-left: 1rem;
    position: relative;
    line-height: 1.65;
}

.project-arch li::before {
    content: '\2192';
    position: absolute;
    left: 0;
    color: var(--border);
    font-size: 0.75rem;
    line-height: 1.85;
}

/* Project note / link */
.project-note {
    font-size: 0.8125rem;
    color: var(--text-dim);
    margin-top: 1rem;
    line-height: 1.65;
}

.project-note a {
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
}

.project-note a:hover {
    border-bottom-color: var(--accent);
}

.project-link {
    display: inline-block;
    font-size: 0.8125rem;
    color: var(--accent);
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
    margin-top: 0.75rem;
}

.project-link:hover {
    border-bottom-color: var(--accent);
}

/* Sub-projects (Vault apps) */
.sub-projects {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sub-project {
    padding-left: 1rem;
    border-left: 1px solid var(--border);
}

.sub-project-name {
    font-size: 0.8125rem;
    color: var(--accent);
    font-weight: 500;
}

.sub-project-desc {
    font-size: 0.8125rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ============================================
   About
   ============================================ */

#about {
    margin-bottom: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.about-text {
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.8;
    max-width: 620px;
}

.about-text p {
    margin-bottom: 0.875rem;
}

.about-text a {
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
}

.about-text a:hover {
    border-bottom-color: var(--accent);
}

/* ============================================
   Contact
   ============================================ */

#contact {
    margin-bottom: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.contact-list {
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.contact-row {
    display: flex;
    gap: 0.75rem;
}

.contact-label {
    color: var(--text-dim);
    min-width: 5rem;
}

.contact-value a {
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: color 0.15s, border-color 0.15s;
}

.contact-value a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ============================================
   Footer
   ============================================ */

footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 640px) {
    .container {
        padding: 1.25rem 1rem 3rem;
    }

    header {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding-bottom: 1.5rem;
        text-align: center;
    }

    .header-id {
        flex-direction: column;
        gap: 0.5rem;
    }

    .prompt {
        font-size: 1.0625rem;
    }

    .project summary {
        flex-wrap: wrap;
        gap: 0.375rem;
    }

    .project-brief {
        display: none;
    }

    .project-detail {
        padding-left: 1rem;
    }

    .meta-row {
        flex-direction: column;
        gap: 0.125rem;
    }

    .meta-label {
        min-width: unset;
    }

    .tech-tags {
        margin-top: 0.25rem;
    }
}
