@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg:         #0d1117;
    --bg-soft:    #161b22;
    --bg-hover:   #1c2128;
    --border:     #30363d;
    --text:       #e6edf3;
    --text-muted: #8b949e;
    --text-dim:   #484f58;
    --accent:     #c87941;
    --nav-w:      240px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

#wrapper {
    display: grid;
    grid-template-columns: var(--nav-w) 1fr;
    grid-template-rows: auto 1fr auto;
    grid-template-areas: "nv hdr" "nv mn" "nv ftr";
    min-height: 100vh;
}

nav {
    grid-area: nv;
    background: var(--bg-soft);
    border-right: 1px solid var(--border);
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-brand {
    padding: 6px 16px 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

.nav-brand strong {
    display: block;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 2px;
}

nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    margin: 0 8px;
    transition: background 0.12s, color 0.12s;
}

nav a i { font-size: 12px; width: 14px; flex-shrink: 0; }

nav a:hover, nav a.active { background: var(--bg-hover); color: var(--text); }

nav a.active { font-weight: 500; }

.campfire {
    margin-top: auto;
    display: block;
    width: 170px;
    margin-left: auto;
    margin-right: auto;
    padding-top: 20px;
    opacity: 0.7;
}

header {
    grid-area: hdr;
    padding: 16px 32px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-soft);
    display: flex;
    align-items: center;
}

header h1 {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
}

header h1 b { color: var(--text); font-weight: 500; }

main {
    grid-area: mn;
    padding: 36px 48px 56px;
    max-width: 1200px;
}

main section { margin-bottom: 44px; }

main section:last-child { margin-bottom: 0; }

h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

section p {
    color: var(--text-muted);
    margin-bottom: 10px;
    max-width: 680px;
}

section p:last-child { margin-bottom: 0; }

section p strong { color: var(--text); font-weight: 500; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* intro */
.intro {
    padding: 8px 0 36px;
    margin-bottom: 36px !important;
    border-bottom: 1px solid var(--border);
}

.intro h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.intro .sub { font-size: 14px; color: var(--text-muted); }

/* info table */
.info-table {
    display: grid;
    grid-template-columns: 140px 1fr;
    row-gap: 10px;
    column-gap: 16px;
}

.info-table dt { font-size: 13px; color: var(--text-dim); padding-top: 1px; }
.info-table dd { font-size: 13px; color: var(--text-muted); }

/* timeline */
.timeline-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 0 24px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
}

.timeline-item:last-child { border-bottom: 1px solid var(--border); }

.timeline-date { font-size: 12px; color: var(--text-dim); padding-top: 2px; }

.timeline-content p { margin-bottom: 2px; max-width: none; }
.timeline-content p:first-child { color: var(--text); font-weight: 500; font-size: 13px; }
.timeline-content p:not(:first-child) { font-size: 12px; color: var(--text-dim); }

/* interests */
section.editorial-section {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
}

.page-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    display: block;
    margin-bottom: 36px;
    letter-spacing: -0.3px;
}

.interest-row {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: center;
    padding: 32px 0;
    border-top: 1px solid var(--border);
}

.interest-row:last-child { border-bottom: 1px solid var(--border); }

.interest-row.reverse { grid-template-columns: 340px 1fr; }
.interest-row.reverse .interest-text { order: 2; }
.interest-row.reverse .interest-img { order: 1; }

.interest-text .label {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.interest-text h2 { font-size: 15px; margin-bottom: 10px; }
.interest-text p { font-size: 13.5px; color: var(--text-muted); max-width: none; }

.interest-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    display: block;
}

/* projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 4px;
}

.project-card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    transition: border-color 0.15s;
}

.project-card:hover { border-color: #484f58; }

.project-card h3 { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.project-card p { font-size: 12.5px; color: var(--text-muted); margin: 0; max-width: none; line-height: 1.6; }

/* contact */
.contact-main section ul {
    list-style: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.contact-main section ul li {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 12px;
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.contact-main section ul li:last-child { border-bottom: none; }

.contact-main section ul li strong {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

form {
    display: flex;
    flex-direction: column;
    max-width: 480px;
    gap: 12px;
    margin-top: 4px;
}

.form-group { display: flex; flex-direction: column; gap: 5px; }

label { font-size: 12px; font-weight: 500; color: var(--text-muted); }

input, textarea {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
}

input:focus, textarea:focus {
    border-color: #388bfd;
    box-shadow: 0 0 0 3px rgba(56,139,253,0.1);
}

textarea { resize: vertical; min-height: 100px; }

button[type="submit"] {
    align-self: flex-start;
    background: var(--accent);
    border: none;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 20px;
    cursor: pointer;
    border-radius: 6px;
    transition: opacity 0.15s;
}

button[type="submit"]:hover { opacity: 0.88; }

.links { font-size: 13px; color: var(--accent); }

/* footer */
footer {
    grid-area: ftr;
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: var(--nav-w) 1fr;
}

.footer-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 14px 16px;
    border-right: 1px solid var(--border);
}

.footer-logo { height: 26px; opacity: 0.55; filter: brightness(10); display: block; }

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    gap: 16px;
}

.footer-content p { font-size: 12px; color: var(--text-dim); margin: 0; }

.footer-links { display: flex; gap: 16px; }

.footer-links a {
    font-size: 12px;
    color: var(--text-dim);
    transition: color 0.12s;
    text-decoration: none;
}

.footer-links a:hover { color: var(--text); }

/* responsive */
@media (max-width: 900px) {
    :root { --nav-w: 200px; }
    main { padding: 24px 28px 48px; }
}

@media (max-width: 700px) {
    #wrapper {
        grid-template-columns: 1fr;
        grid-template-areas: "nv" "hdr" "mn" "ftr";
    }
    nav {
        height: auto;
        position: relative;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 8px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .nav-brand, .campfire { display: none; }
    nav a { padding: 6px 10px; font-size: 12px; }
    header { padding: 16px 20px; }
    main { padding: 16px 20px 40px; }
    footer { grid-template-columns: 1fr; }
    .footer-logos { border-right: none; border-bottom: 1px solid var(--border); justify-content: flex-start; padding: 12px 20px; }
    .footer-content { padding: 12px 20px; flex-wrap: wrap; gap: 8px; }
    .interest-row, .interest-row.reverse { grid-template-columns: 1fr; gap: 16px; }
    .interest-row.reverse .interest-text { order: 1; }
    .interest-row.reverse .interest-img { order: 2; }
    .interest-item { grid-template-columns: 1fr; gap: 14px; }
    .info-table { grid-template-columns: 110px 1fr; }
}