:root {
    --bg: #f7f6f3;
    --card: #ffffff;
    --text: #14213d;
    --text-soft: #3a4256;
    --text-muted: #6b7280;
    --accent: #c8541a;
    --accent-soft: #e8703a;
    --accent-glow: rgba(200, 84, 26, 0.08);
    --border: rgba(20, 33, 61, 0.10);
    --shadow: 0 1px 2px rgba(20, 33, 61, 0.04), 0 8px 24px rgba(20, 33, 61, 0.05);
    --radius: 12px;
    --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html { font-size: 16px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 140px 140px;
}

::selection {
    background: var(--accent);
    color: #fff;
}

.page {
    max-width: 720px;
    margin: 0 auto;
}

/* Hero image */
.hero-img {
    position: relative;
    width: 100vw;
    max-width: 1000px;
    margin-left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
}

.hero-img img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    animation: fadeIn 0.8s ease forwards 0.1s;
}

.hero-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(to top, var(--bg) 6%, transparent);
    pointer-events: none;
}

/* Content */
.content {
    padding: 0 1.75rem 3.5rem;
    margin-top: -2.5rem;
    position: relative;
    z-index: 1;
}

.name {
    font-family: 'Playfair Display', serif;
    font-size: 2.9rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fadeIn 0.6s ease forwards 0.2s;
}

.dot { color: var(--accent); }

.tag {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 1.25rem;
    opacity: 0;
    animation: fadeIn 0.6s ease forwards 0.3s;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    opacity: 0;
    animation: fadeIn 0.6s ease forwards 0.35s;
}

.badge {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--text-soft);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    box-shadow: var(--shadow);
}

.bio {
    font-size: 0.95rem;
    color: var(--text-soft);
    line-height: 1.75;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeIn 0.6s ease forwards 0.4s;
}

.bio:last-of-type { margin-bottom: 1.5rem; }

.quote {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    line-height: 1.4;
    font-style: italic;
    color: var(--text);
    border-left: 3px solid var(--accent);
    padding: 0.25rem 0 0.25rem 1.25rem;
    margin-bottom: 2.25rem;
    opacity: 0;
    animation: fadeIn 0.6s ease forwards 0.45s;
}

.quote cite {
    display: block;
    margin-top: 0.6rem;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text-muted);
}

.inline-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid var(--accent-glow);
    transition: border-color var(--transition);
}

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

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeIn 0.6s ease forwards 0.5s;
}

/* Experience timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeIn 0.6s ease forwards 0.55s;
}

.role {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    box-shadow: var(--shadow);
    border-left: 3px solid var(--accent);
    transition: transform var(--transition), box-shadow var(--transition);
}

.role:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(20, 33, 61, 0.05), 0 12px 30px rgba(20, 33, 61, 0.08);
}

.role-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.15rem;
}

.role-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.role-date {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex-shrink: 0;
}

.role-org {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--accent);
}

.role-note {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    line-height: 1.5;
}

/* Connect links */
.links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeIn 0.6s ease forwards 0.6s;
}

.link-btn {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1.2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

.link-btn:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
    transform: translateY(-1px);
}

.link-btn > svg:first-child {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--accent);
}

.link-btn span {
    flex: 1;
    text-align: left;
}

.link-btn .arrow {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform var(--transition), color var(--transition);
}

.link-btn:hover .arrow {
    color: var(--accent);
    transform: translate(2px, -2px);
}

.footer {
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: 0;
    animation: fadeIn 0.6s ease forwards 0.7s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile */
@media (max-width: 560px) {
    .page { max-width: 100%; }
    .hero-img { width: 100%; max-width: 100%; margin-left: 0; transform: none; }
    .content { padding: 0 1.25rem 2.5rem; margin-top: -2rem; }
    .name { font-size: 2.3rem; }
    .bio { font-size: 0.9rem; }
    .link-btn { -webkit-tap-highlight-color: transparent; }
    .link-btn:active { transform: scale(0.99); border-color: var(--accent); background: var(--accent-glow); }
}

@media (max-width: 380px) {
    .name { font-size: 2rem; }
    .role-head { flex-direction: column; gap: 0.1rem; }
}
