:root {
    --bg:        #111111;
    --bg-nav:    #161616;
    --bg-card:   #1a1a1a;
    --bg-card2:  #1f1f1f;
    --border:    #242424;
    --border-h:  #333333;
    --accent:    #e85d26;
    --accent-d:  #b84010;
    --text-1:    #f0f0f0;
    --text-2:    #999999;
    --text-3:    #666666;
    --text-link: #e85d26;
    --font-d:    'Outfit', sans-serif;
    --font-m:    'IBM Plex Mono', monospace;
}

[data-theme="light"] {
    --bg:        #f8f8f8;
    --bg-nav:    #f0f0f0;
    --bg-card:   #ffffff;
    --bg-card2:  #f4f4f4;
    --border:    #e4e4e4;
    --border-h:  #cccccc;
    --accent:    #c44d1a;
    --accent-d:  #9e3c12;
    --text-1:    #111111;
    --text-2:    #555555;
    --text-3:    #777777;
    --text-link: #c44d1a;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text-1);
    font-family: var(--font-d);
    font-size: 16px;
    line-height: 1.7;
    transition: background .25s, color .25s;
}

a { color: var(--text-link); text-decoration: none; transition: opacity .15s; }
a:hover { opacity: .7; }

/* ── Skip link ── */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 999;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-m);
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 0 0 6px 6px;
    text-decoration: none;
    transition: top .15s;
}
.skip-link:focus { top: 0; opacity: 1; }

/* ── Focus styles ── */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
    opacity: 1;
}

/* ── sec-line as hr ── */
hr.sec-line {
    flex: 1;
    height: 1px;
    border: none;
    background: var(--border);
}

/* ── NAV ── */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 99;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    transition: background .25s, border-color .25s;
}
.nav-inner {
    max-width: 1020px;
    margin: 0 auto;
    padding: 0 28px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-brand {
    font-family: var(--font-d);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--text-1);
    text-decoration: none;
}
.nav-brand span { color: var(--accent); }
.nav-right {
    display: flex;
    align-items: center;
    gap: 2px;
}
.nav-link {
    font-family: var(--font-m);
    font-size: 11px;
    color: var(--text-2);
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: color .15s, background .15s;
    letter-spacing: .02em;
}
.nav-link i { margin-right: 5px; font-size: 9px; }
.nav-link:hover { color: var(--text-1); background: var(--border); opacity: 1; }

.tog {
    margin-left: 10px;
    width: 34px; height: 34px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    transition: color .15s, background .15s, border-color .15s;
}
.tog:hover { color: var(--text-1); background: var(--border); border-color: var(--border-h); }

.nav-hamburger {
    display: none;
    width: 34px; height: 34px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    align-items: center; justify-content: center;
    font-size: 13px;
    margin-left: 8px;
}

@media (max-width: 640px) {
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
    .nav-right.open .nav-links {
        display: flex; flex-direction: column;
        position: absolute; top: 56px; left: 0; right: 0;
        background: var(--bg-nav);
        border-bottom: 1px solid var(--border);
        padding: 8px 16px 14px; gap: 2px;
    }
}

/* ── LAYOUT ── */
.page {
    max-width: 1020px;
    margin: 0 auto;
    padding: 50px 28px 50px;
}

/* ── HERO ── */
.hero {
    padding: 64px 0 72px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 72px;
}
.hero-name {
    font-size: clamp(36px, 5.5vw, 60px);
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.05;
    color: var(--text-1);
    margin-bottom: 20px;
}
.hero-name .accent { color: var(--accent); }

.hero-rule {
    width: 40px;
    height: 2px;
    background: var(--accent);
    margin-bottom: 24px;
}

.hero-bio {
    font-size: 16px;
    color: var(--text-2);
    max-width: 1000px;
    line-height: 1.8;
    margin-bottom: 28px;
    font-weight: 300;
}

.tags {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 36px;
}
.tag {
    font-family: var(--font-m);
    font-size: 10.5px;
    color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 10px;
    letter-spacing: .02em;
    transition: border-color .15s, color .15s;
}
.tag:hover { border-color: var(--accent); color: var(--accent); }
.tag i { margin-right: 5px; font-size: 9px; }

.hero-contact {
    font-family: var(--font-m);
    font-size: 12px;
    color: var(--text-3);
}
.hero-contact a { color: var(--accent); }
.hero-contact a:hover { text-decoration: underline; opacity: 1; }
.hero-contact i { margin-right: 6px; }

/* ── SECTIONS ── */
section { margin-bottom: 72px; }

.sec-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}
.sec-num {
    font-family: var(--font-m);
    font-size: 10px;
    color: var(--accent);
    letter-spacing: .1em;
}
.sec-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.025em;
    color: var(--text-1);
}

/* ── PROJECT CARDS ── */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 600px) { .projects-grid { grid-template-columns: 1fr; } }

.proj-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: border-color .2s, transform .2s;
}
.proj-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.proj-img {
    background: var(--bg-card2);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    height: 156px;
    padding: 24px;
}
.proj-img img {
    max-height: 108px;
    max-width: 100%;
    object-fit: contain;
    transition: transform .2s;
}
.proj-card:hover .proj-img img { transform: scale(1.04); }

.proj-body {
    padding: 20px 22px;
    flex: 1; display: flex; flex-direction: column;
}
.proj-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.02em;
    margin-bottom: 10px;
}
.proj-title a { color: var(--text-1); text-decoration: none; }
.proj-card:hover .proj-title a { color: var(--accent); }
.proj-text {
    font-size: 13.5px;
    color: var(--text-2);
    line-height: 1.7;
    font-weight: 300;
    flex: 1;
}
.proj-foot {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.proj-date {
    font-family: var(--font-m);
    font-size: 10.5px;
    color: var(--text-3);
}
.proj-date i { margin-right: 5px; }
.proj-link {
    font-family: var(--font-m);
    font-size: 10.5px;
    color: var(--accent);
    display: flex; align-items: center; gap: 5px;
    text-decoration: none;
}
.proj-link:hover { text-decoration: underline; opacity: 1; }
.proj-link i { font-size: 9px; }

/* ── PUBLICATIONS ── */
.pub-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.pub-icon {
    width: 46px; height: 46px;
    background: var(--bg-card2);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
    font-size: 18px;
    flex-shrink: 0;
}
.pub-text { font-size: 15px; color: var(--text-2); font-weight: 300; }
.pub-text a { font-weight: 600; }

/* ── AWARDS ── */
.awards-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.award-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}
.award-row:last-child { border-bottom: none; }
.award-row:hover { background: var(--bg-card2); }
.award-year {
    padding: 20px 16px;
    font-family: var(--font-m);
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    border-right: 1px solid var(--border);
    display: flex; align-items: flex-start; justify-content: center;
}
.award-body {
    padding: 18px 22px;
    font-size: 14px;
    color: var(--text-2);
    font-weight: 300;
    line-height: 1.65;
}
.award-body i { color: var(--accent); margin-right: 8px; font-size: 12px; }
.award-body a { font-weight: 400; }

/* ── FOOTER ── */
footer {
    border-top: 1px solid var(--border);
    padding: 28px;
    text-align: center;
}
.footer-inner {
    max-width: 1020px;
    margin: 0 auto;
    font-family: var(--font-m);
    font-size: 11px;
    color: var(--text-3);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero    { animation: fadeUp .55s ease both; }
section  { animation: fadeUp .55s ease both; }
section:nth-child(2) { animation-delay: .07s; }
section:nth-child(3) { animation-delay: .14s; }
section:nth-child(4) { animation-delay: .21s; }
