/* =========================================
   CORE VARIABLES
   ========================================= */
:root {
    --bg-paper: #EDEBE6;
    --ink-black: #161615;
    --ink-dark: #333231;
    --ink-mid: #555453;
    --accent: #B23A25;

    --line: 1px solid rgba(90, 90, 88, 0.15);

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'Courier New', Courier, monospace;
    --font-serif: 'Cormorant Garamond', 'Garamond', serif;
}

/* =========================================
   RESET
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
    background-color: var(--bg-paper);
    color: var(--ink-black);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--accent); color: var(--bg-paper); }

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

/* =========================================
   LAYOUT
   ========================================= */
.layout {
    display: flex;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 48px;
}

/* =========================================
   LEFT RAIL
   ========================================= */
.rail {
    width: 300px;
    flex-shrink: 0;
    padding: 80px 0;
    margin-right: 40px;
}

.rail-inner { position: sticky; top: 80px; }

.rail-photo {
    width: 170px;
    height: 170px;
    object-fit: cover;
    display: block;
    margin-bottom: 32px;
}

.rail-identity { margin-bottom: 38px; }

.rail-identity h1 {
    font-family: var(--font-serif);
    font-size: 4.5rem;
    font-weight: 600;
    line-height: 0.9;
    letter-spacing: 0.01em;
    margin: -0.1em 0 32px;
}

.credential {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--ink-mid);
    line-height: 1.65;
}

.credential a {
    color: var(--ink-black);
    text-decoration: none;
    border-bottom: 1px solid rgba(90, 90, 88, 0.25);
    transition: color 0.3s ease, border-color 0.3s ease;
}
.credential a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.research-interests {
    margin-top: 1.5rem;
    max-width: 260px;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--ink-mid);
}

.research-interests span {
    display: block;
    margin-bottom: 0.15rem;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink-dark);
}

.rail-links { display: flex; flex-direction: column; gap: 0.625rem; }

.rail-links a {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-black);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    width: max-content;
}
.rail-links a:hover { color: var(--accent); transform: translateX(4px); }

/* =========================================
   MAIN CONTENT
   ========================================= */
.content {
    flex: 1;
    min-width: 0;
    max-width: 760px;
    padding: 80px 0 100px 40px;
    border-left: var(--line);
}

.section { margin-bottom: 3.5rem; }
.section:last-child { margin-bottom: 0; }

.section-title {
    font-family: var(--font-serif);
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--ink-black);
    margin-bottom: 1.75rem;
}

/* =========================================
   PUBLICATIONS
   ========================================= */
.pub-item { padding-bottom: 1.8rem; }
.pub-item + .pub-item { padding-top: 1.8rem; border-top: var(--line); }
.pub-item:last-child { padding-bottom: 0; }

#publications .section-title { margin-bottom: 1.5rem; }

.pub-cite {
    max-width: 44rem;
    margin-bottom: 0.8rem;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--ink-mid);
}
.pub-cite strong { font-weight: 600; color: var(--ink-black); }
.pub-title { color: var(--ink-black); font-weight: 500; }
.pub-venue { color: var(--ink-dark); }

.pub-desc {
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
    border-left: 2px solid rgba(90, 90, 88, 0.18);
    font-size: 0.8125rem;
    color: var(--ink-mid);
    line-height: 1.6;
}

.links { display: flex; gap: 1.2rem; }

.links a {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
}
.links a::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 1px;
    background: rgba(178, 58, 37, 0.35);
    transition: background-color 0.3s ease;
}
.links a:hover::after { background: var(--accent); }

/* FELT demo videos */
.felt-demos {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

.felt-demos video {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    background: #e8e4dd;
}

.felt-caption {
    margin-top: 0.45rem;
    font-size: 0.6875rem;
    font-style: italic;
    color: var(--ink-mid);
}

/* =========================================
   EXPERIENCE
   ========================================= */
.exp-item { padding-bottom: 1.5rem; }
.exp-item + .exp-item { padding-top: 1.5rem; border-top: var(--line); }
.exp-item:last-child { padding-bottom: 0; }

.exp-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1.5rem;
    margin-bottom: 0.375rem;
}

.exp-head h3 {
    font-family: var(--font-serif);
    font-size: 1.375rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink-black);
}

.exp-date {
    flex-shrink: 0;
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    color: var(--ink-mid);
}

.exp-desc {
    font-size: 0.875rem;
    color: var(--ink-dark);
    line-height: 1.6;
}

/* =========================================
   ABOUT
   ========================================= */
.about-text { font-size: 0.9375rem; line-height: 1.8; margin-bottom: 1.25rem; color: var(--ink-dark); }
.about-text:last-child { margin-bottom: 0; }

/* =========================================
   EDUCATION
   ========================================= */
.edu-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 1.5rem;
}
.edu-item + .edu-item { padding-top: 1.5rem; border-top: var(--line); }
.edu-item:last-child { padding-bottom: 0; }

.edu-school {
    font-family: var(--font-serif);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--ink-black);
    line-height: 1.25;
}

.edu-meta { text-align: right; }
.edu-degree {
    display: block;
    font-family: var(--font-mono);
    color: var(--ink-dark);
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    margin-bottom: 0.25rem;
}
.edu-date {
    display: block;
    font-family: var(--font-mono);
    color: var(--ink-mid);
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}

/* =========================================
   MOBILE
   ========================================= */
@media (max-width: 859px) {
    .layout { flex-direction: column; padding: 24px 24px 48px; }

    .rail {
        width: auto;
        padding: 24px 0 32px;
        margin-right: 0;
        border-bottom: var(--line);
        margin-bottom: 40px;
    }
    .rail-inner { position: static; }
    .rail-identity h1 { font-size: 3.2rem; margin-bottom: 1.5rem; }
    .rail-links { flex-direction: row; flex-wrap: wrap; gap: 0.8rem 1.2rem; }
    .rail-links a:hover { transform: none; }

    .content {
        max-width: none;
        padding: 0 0 24px;
        border-left: none;
    }

    .exp-head { flex-direction: column; gap: 0.25rem; }
    .edu-item { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
    .edu-meta { text-align: left; }
}
