﻿:root {
    --accent: #6366f1;
    --accent-bright: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --bg: #09090f;
    --border: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.12);
    --text: #eef0f5;
    --text-muted: #7d8799;
    --text-faint: #3a3f4d;
    --tag-bg: rgba(99, 102, 241, 0.08);
    --tag-border: rgba(99, 102, 241, 0.2);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* ── Navbar ──────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 9, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    width: 100%;
    padding: 0.85rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-container--centered {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
}

.nav-container--centered .logo {
    justify-self: start;
}

.nav-container--centered .nav-menu {
    justify-self: center;
}

.nav-right {
    justify-self: end;
    display: flex;
    align-items: center;
}

.logo {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
    white-space: nowrap;
    transition: all 0.2s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
}

.logo::before {
    content: '←';
    opacity: 0;
    transition: opacity 0.2s;
    font-size: 0.9rem;
}

.logo:hover {
    color: var(--accent-bright);
    background: rgba(99, 102, 241, 0.1);
}

.logo:hover::before {
    opacity: 1;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 1.75rem;
}

.nav-menu a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}

.nav-menu a:hover { color: var(--text); }

/* Photography link — purple pill */
.nav-photo-link {
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
    border: 1px solid #6366f1 !important;
    color: #818cf8 !important;
    border-radius: 999px;
    padding: 0.2rem 0.85rem !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em !important;
    transition: background 0.2s, color 0.2s !important;
    text-decoration: none !important;
}
.nav-photo-link:hover {
    background: #6366f1 !important;
    color: #fff !important;
}
.nav-photo-link span::after {
    display: none !important;
}

/* Coding link — green pill */
.nav-coding-link {
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;
    border: 1px solid #22c55e !important;
    color: #4ade80 !important;
    border-radius: 999px;
    padding: 0.2rem 0.85rem !important;
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em !important;
    transition: background 0.2s, color 0.2s !important;
}
.nav-coding-link:hover {
    background: #22c55e !important;
    color: #fff !important;
}
.nav-coding-link span::after {
    display: none !important;
}

/* ── Featured Work Section (Homepage) ─────────── */
.featured-work-section {
    padding: 4rem 2rem;
    border-top: 1px solid var(--border);
}

.featured-work-section h2 {
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.featured-work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.featured-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    background: rgba(255, 255, 255, 0.01);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.featured-card:hover {
    border-color: var(--border-strong);
    background: rgba(99, 102, 241, 0.04);
}

.featured-card:hover::before {
    opacity: 1;
}

.featured-card-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-bright);
    margin-bottom: 1rem;
    padding: 0.35rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 4px;
    width: fit-content;
}

.featured-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.featured-card-subtitle {
    font-size: 0.85rem;
    color: var(--accent-bright);
    font-weight: 500;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.featured-card-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.featured-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.featured-meta-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid var(--tag-border);
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--accent-bright);
    letter-spacing: 0.01em;
}

.featured-card-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-bright);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap 0.2s, color 0.2s;
}

.featured-card-link:hover {
    color: #818cf8;
    gap: 0.7rem;
}

.research-card { border-left: 3px solid rgba(99, 102, 241, 0.4); }
.production-card { border-left: 3px solid rgba(34, 197, 94, 0.4); }
.opensource-card { border-left: 3px solid rgba(168, 85, 247, 0.4); }

/* ── Portfolio Overview (on homepage) ──────────── */
.portfolio-overview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.overview-item {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.005);
    transition: all 0.2s;
}

.overview-item:hover {
    border-color: var(--border-strong);
    background: rgba(99, 102, 241, 0.05);
}

.overview-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-bright);
    margin-bottom: 0.5rem;
}

.overview-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.tech-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* ── Navigation link (added) ─────────────────── */
.nav-link {
    position: relative;
}

/* ── Research Cards (Coding Page) ──────────────── */
.research-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 1rem;
}

.research-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    background: rgba(99, 102, 241, 0.03);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 4px solid var(--accent);
    position: relative;
}

.research-card:hover {
    border-color: var(--border-strong);
    background: rgba(99, 102, 241, 0.08);
    transform: translateY(-2px);
}

.research-status {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-bright);
    margin-bottom: 0.75rem;
    padding: 0.4rem 0.8rem;
    background: rgba(99, 102, 241, 0.12);
    border-radius: 4px;
}

.research-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.research-subtitle {
    font-size: 0.88rem;
    color: var(--accent-bright);
    font-weight: 500;
    margin-bottom: 1.25rem;
    opacity: 0.95;
}

.research-impact {
    background: rgba(99, 102, 241, 0.08);
    border-left: 3px solid var(--accent-bright);
    padding: 1rem;
    margin: 1.25rem 0;
    border-radius: 4px;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.research-impact strong {
    color: var(--text);
    font-weight: 600;
}

.research-findings {
    margin: 1.25rem 0;
}

.research-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(99, 102, 241, 0.15);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.timeline-badge {
    padding: 0.3rem 0.8rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 3px;
    font-weight: 500;
    color: var(--accent-bright);
}

.research-role {
    color: var(--text-faint);
    font-size: 0.82rem;
}

/* ── Featured Projects (Coding Page) ──────────── */
.featured-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.featured-proj-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    background: rgba(255, 255, 255, 0.01);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.featured-proj-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.featured-proj-card:hover {
    border-color: var(--border-strong);
    background: rgba(99, 102, 241, 0.05);
}

.featured-proj-card:hover::before {
    opacity: 1;
}

.featured-proj-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-bright);
    margin-bottom: 0.8rem;
    padding: 0.4rem 0.8rem;
    background: rgba(99, 102, 241, 0.12);
    border-radius: 4px;
    width: fit-content;
}

.featured-proj-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.featured-proj-subtitle {
    font-size: 0.85rem;
    color: var(--accent-bright);
    font-weight: 500;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.featured-proj-context {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.featured-proj-context strong {
    color: var(--text);
    font-weight: 600;
}

.featured-proj-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1.25rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.featured-proj-meta a {
    color: var(--accent-bright);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.featured-proj-meta a:hover {
    opacity: 0.8;
}

/* ── Background Subsections ─────────────────── */
.background-subsection {
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
}

.background-subsection:first-of-type {
    border-top: none;
    padding-top: 0;
}

.background-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 1.75rem;
    text-transform: uppercase;
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

/* ── Research List (Horizontal) ────────────────── */
.research-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.research-row {
    padding: 1.75rem;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s;
    border-left: 4px solid var(--accent);
}

.research-row:first-child {
    border-top: 1px solid var(--border);
}

.research-row:hover {
    background: rgba(99, 102, 241, 0.04);
}

.research-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 1rem;
}

.research-header-left h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
    margin-bottom: 0.3rem;
}

.research-subtitle {
    font-size: 0.85rem;
    color: var(--accent-bright);
    font-weight: 500;
}

.research-meta-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.research-status {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid var(--tag-border);
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent-bright);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.research-date {
    font-size: 0.75rem;
    color: var(--text-faint);
    white-space: nowrap;
}

.research-context {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.research-context strong {
    color: var(--text);
    font-weight: 600;
}

/* ── Featured Projects List (Horizontal) ──────── */
.featured-projects-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.featured-proj-row {
    padding: 1.75rem;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s;
    border-left: 4px solid rgba(34, 197, 94, 0.5);
}

.featured-proj-row:first-child {
    border-top: 1px solid var(--border);
}

.featured-proj-row:hover {
    background: rgba(34, 197, 94, 0.03);
}

.proj-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 1rem;
}

.proj-header-left h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
    margin-bottom: 0.3rem;
}

.proj-subtitle {
    font-size: 0.85rem;
    color: var(--accent-bright);
    font-weight: 500;
}

.proj-meta-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.proj-badge {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #4ade80;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.proj-date {
    font-size: 0.75rem;
    color: var(--text-faint);
    white-space: nowrap;
}

.proj-context {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.proj-context strong {
    color: var(--text);
    font-weight: 600;
}

.featured-proj-row .item-list li {
    font-size: 0.88rem;
}

.project-with-video {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.project-with-video .item-list {
    flex: 1;
    margin-top: 0;
}

.project-video {
    width: 220px;
    flex-shrink: 0;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #000;
}

.project-link {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--accent-bright);
    text-decoration: none;
    letter-spacing: 0.03em;
    vertical-align: middle;
    margin-left: 0.5rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.project-link:hover { opacity: 1; }

.project-media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.project-media-grid video,
.project-media-grid img {
    width: 100%;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #000;
    display: block;
    object-fit: cover;
    aspect-ratio: 4/3;
}

/* ── Container ───────────────────────────────── */
.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ── Hero ────────────────────────────────────── */
.hero {
    padding: 7rem 2rem 5rem;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.1) 0%, transparent 65%);
    pointer-events: none;
}

/* Headshot */
.hero-photo-wrap {
    margin: 0 auto 1.75rem;
    text-align: center;
}

.hero-photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 2px solid var(--border-strong);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12), 0 8px 32px rgba(0, 0, 0, 0.5);
    display: block;
    margin: 0 auto;
    transition: box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.3), 0 12px 40px rgba(0, 0, 0, 0.6);
}

.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.25rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1.05;
    padding-bottom: 0.12em;
    margin-bottom: 1.5rem;
    background: linear-gradient(140deg, #fff 35%, var(--accent-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-meta {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.hero-meta a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.hero-meta a:hover { color: var(--text); }

.hero-tags {
    font-size: 0.72rem;
    color: var(--text-faint);
    margin-bottom: 1.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hero-bio {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.85;
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ── Sections ────────────────────────────────── */
.section {
    padding: 4rem 2rem;
    border-top: 1px solid var(--border);
}

.section h2 {
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

/* ── Timeline ────────────────────────────────── */
.timeline {
    position: relative;
    padding-left: 1.25rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: linear-gradient(to bottom, var(--border), var(--border) 90%, transparent);
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(-1.25rem - 3px);
    top: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

.tl-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 0.35rem;
}

.tl-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 0.2rem;
}

.tl-role {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.tl-date {
    font-size: 0.75rem;
    color: var(--text-faint);
    white-space: nowrap;
    padding-top: 0.1rem;
    flex-shrink: 0;
}

.tl-status {
    font-size: 0.72rem;
    color: var(--accent-bright);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.9rem;
}

/* ── Item list ───────────────────────────────── */
.item-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.item-list li {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
    padding-left: 1rem;
    position: relative;
}

.item-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-faint);
}

/* ── Project List ────────────────────────────── */
.project-list { display: flex; flex-direction: column; }

.project-row {
    padding: 1.4rem 0;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
    border-radius: 0;
}

.project-row:first-child { border-top: 1px solid var(--border); }

.project-row:hover { background: rgba(255, 255, 255, 0.018); }

.pr-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 0.6rem;
}

.pr-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.pr-left h3 {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
}

.pr-date {
    font-size: 0.75rem;
    color: var(--text-faint);
    white-space: nowrap;
    flex-shrink: 0;
}

.tag-row { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.tag {
    padding: 0.12rem 0.55rem;
    border-radius: 2rem;
    background: var(--tag-bg);
    border: 1px solid var(--tag-border);
    color: var(--accent-bright);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ── Skills ──────────────────────────────────── */
.skills-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-row {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.skill-row:last-child { border-bottom: none; padding-bottom: 0; }

.skill-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    min-width: 110px;
    padding-top: 0.25rem;
    flex-shrink: 0;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ── Leadership ──────────────────────────────── */
.leadership-section { display: flex; flex-direction: column; }

.leadership-row {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

.leadership-row:first-child { border-top: 1px solid var(--border); }

.leadership-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    min-width: 190px;
    flex-shrink: 0;
    padding-top: 0.05rem;
}

.leadership-row p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ── Footer ──────────────────────────────────── */
.footer {
    padding: 2.5rem 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    font-size: 0.78rem;
    color: var(--text-faint);
}

.footer a { color: var(--text-faint); text-decoration: none; transition: color 0.2s; }
.footer a:hover { color: var(--text-muted); }

/* ── Animations ──────────────────────────────── */

/* Hero + section fade-up */
.fade-up {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: none;
}

/* Stagger children of visible sections */
.section.visible .timeline-item,
.section.visible .project-row,
.section.visible .skill-row,
.section.visible .leadership-row {
    animation: slideIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.section.visible .timeline-item:nth-child(1),
.section.visible .project-row:nth-child(1),
.section.visible .skill-row:nth-child(1),
.section.visible .leadership-row:nth-child(1) { animation-delay: 0.05s; }
.section.visible .timeline-item:nth-child(2),
.section.visible .project-row:nth-child(2),
.section.visible .skill-row:nth-child(2),
.section.visible .leadership-row:nth-child(2) { animation-delay: 0.12s; }
.section.visible .timeline-item:nth-child(3),
.section.visible .project-row:nth-child(3),
.section.visible .skill-row:nth-child(3),
.section.visible .leadership-row:nth-child(3) { animation-delay: 0.19s; }
.section.visible .timeline-item:nth-child(4),
.section.visible .project-row:nth-child(4),
.section.visible .skill-row:nth-child(4),
.section.visible .leadership-row:nth-child(4) { animation-delay: 0.26s; }
.section.visible .timeline-item:nth-child(n+5),
.section.visible .project-row:nth-child(n+5),
.section.visible .skill-row:nth-child(n+5),
.section.visible .leadership-row:nth-child(n+5) { animation-delay: 0.33s; }

@keyframes slideIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

/* Nav link animated underline */
.nav-menu a {
    position: relative;
}

.nav-menu a span {
    position: relative;
    display: inline-block;
}

.nav-menu a span::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-bright);
    transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-menu a:hover span::after,
.nav-menu a.active span::after {
    width: 100%;
}

.nav-menu a.active span {
    color: var(--text);
}

/* Glow dot pulse on timeline when section becomes visible */
.section.visible .timeline-item::before {
    animation: dotPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.section.visible .timeline-item:nth-child(1)::before { animation-delay: 0.05s; }
.section.visible .timeline-item:nth-child(2)::before { animation-delay: 0.12s; }
.section.visible .timeline-item:nth-child(3)::before { animation-delay: 0.19s; }

@keyframes dotPop {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* Tag hover lift */
.tag {
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.tag:hover {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
}

/* ── Featured Project ────────────────────────── */
.featured-project {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
}

.featured-project-header {
    margin-bottom: 0.75rem;
}

.featured-project-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 0.2rem;
}

.featured-project-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 680px;
}

.featured-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.featured-video-facade {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.featured-video-facade img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.3s ease;
}

.featured-video-facade:hover img {
    transform: scale(1.03);
    filter: brightness(0.75);
}

.featured-video-play {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    pointer-events: none;
}

.featured-video-play svg {
    width: 68px;
    height: 48px;
    filter: drop-shadow(0 2px 12px rgba(0,0,0,0.5));
    transition: transform 0.2s;
}

.featured-video-facade:hover .featured-video-play svg {
    transform: scale(1.1);
}

.featured-video-play span {
    font-size: 0.82rem;
    font-weight: 500;
    color: #fff;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 6px rgba(0,0,0,0.7);
}

/* ── Responsive ──────────────────────────────── */

@media (max-width: 640px) {
    .nav-container--centered {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .nav-container--centered .nav-menu { display: none; }
    .nav-container--centered .nav-right { display: none; }
    .nav-container--centered .nav-hamburger {
        display: flex;
        margin-left: auto;
    }
}

/* Hamburger button (hidden on desktop) */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    color: var(--text);
    flex-direction: column;
    gap: 5px;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.mobile-nav-drawer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(9, 9, 15, 0.97);
    z-index: 99;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.mobile-nav-drawer.open {
    display: flex;
}

.mobile-nav-drawer a {
    color: var(--text);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    transition: color 0.2s;
}

.mobile-nav-drawer a:hover { color: var(--accent-bright); }

.mobile-nav-divider {
    width: 40px;
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 0.5rem 0;
}

.mobile-nav-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

@media (max-width: 640px) {
    /* Nav */
    .nav-menu { display: none; }
    .nav-hamburger { display: flex; }
    .nav-right { display: none; }

    /* Hero */
    .hero { padding: 4.5rem 1.25rem 3rem; }
    .hero h1 { font-size: clamp(1.9rem, 8vw, 2.8rem); }
    .hero-meta { font-size: 0.8rem; line-height: 2; }
    .hero-bio { font-size: 0.9rem; }
    .hero-photo { width: 110px; height: 110px; }

    /* Section spacing */
    .section { padding: 2.5rem 1.25rem; }
    .container { padding: 0 1.25rem; }

    /* Research */
    .research-row { padding: 1.25rem; }
    .research-header { flex-direction: column; gap: 0.6rem; }
    .research-meta-row { justify-content: flex-start; gap: 0.5rem; }
    .research-header-left h3 { font-size: 0.95rem; }

    /* Featured projects */
    .featured-proj-row { padding: 1.25rem; }
    .proj-header { flex-direction: column; gap: 0.6rem; }
    .proj-meta-row { justify-content: flex-start; gap: 0.5rem; flex-wrap: wrap; }

    /* All projects */
    .project-row { padding: 1.1rem 0; }
    .pr-header { flex-direction: column; gap: 0.4rem; }
    .pr-left { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
    .pr-date { font-size: 0.72rem; }

    /* Videos */
    .project-with-video { flex-direction: column; gap: 1rem; }
    .project-video { width: 100%; max-width: 100%; }
    .project-media-grid { grid-template-columns: 1fr; gap: 0.6rem; }

    /* Timeline / Background */
    .tl-header { flex-direction: column; gap: 0.2rem; }
    .tl-date { padding-top: 0; }
    .timeline-item { padding-bottom: 1.75rem; }

    /* Skills */
    .skill-row { flex-direction: column; gap: 0.6rem; }
    .skill-label { min-width: unset; }
    .leadership-row { flex-direction: column; gap: 0.4rem; }
    .leadership-label { min-width: unset; }

    /* Tags */
    .tag-row { flex-wrap: wrap; gap: 0.35rem; }

    /* Work highlights (homepage) */
    .work-highlights { grid-template-columns: 1fr; }
    .landing-section-header { flex-direction: column; gap: 1rem; }
    .photo-grid-landing { grid-template-columns: repeat(3, 1fr); }
    .landing-section-block { padding: 2.5rem 0; }

    /* Grids */
    .featured-work-grid { grid-template-columns: 1fr; }
    .featured-projects-grid { grid-template-columns: 1fr; }
    .research-grid { grid-template-columns: 1fr; }
    .research-meta { flex-direction: column; gap: 0.5rem; }
    .coding-highlights-grid { grid-template-columns: 1fr; }
    .portfolio-overview { grid-template-columns: 1fr; }

    /* Section headings */
    .section h2 { font-size: 0.9rem; margin-bottom: 1.5rem; }
    .background-title { font-size: 0.8rem; margin-bottom: 1rem; }
}

/* ── Landing Sections ────────────────────────── */
.landing-split-section {
    padding-bottom: 7rem;
}

.landing-section-block {
    border-top: 1px solid var(--border);
    padding: 4rem 0;
}

.landing-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
}

.split-card-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-bright);
    margin-bottom: 0.5rem;
}

.landing-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.04em;
    margin-bottom: 0.6rem;
}

.landing-section-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.75;
    max-width: 560px;
}

.landing-section-link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--accent-bright);
    text-decoration: none;
    white-space: nowrap;
    padding-top: 0.25rem;
    flex-shrink: 0;
    transition: gap 0.2s;
}

.landing-section-link:hover { gap: 0.6rem; }

.landing-section-link svg {
    width: 14px;
    height: 14px;
}

/* Photo grid */
.photo-grid-landing {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
}

.photo-grid-landing img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, brightness 0.3s ease;
}

.photo-grid-landing:hover img {
    filter: brightness(0.85);
}

.photo-grid-landing img:hover {
    transform: scale(1.05);
    filter: brightness(1) !important;
    z-index: 1;
    position: relative;
}

/* Coding highlights grid */
.coding-highlights-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.coding-highlight-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem 1.4rem;
    transition: border-color 0.2s, background 0.2s;
}

.coding-highlight-card:hover {
    border-color: var(--border-strong);
    background: rgba(255,255,255,0.02);
}

.coding-highlight-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-bright);
    margin-bottom: 0.5rem;
}

.coding-highlight-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.coding-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* ── Work Highlights (Homepage) ───────────────── */
.work-highlights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.work-highlight-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.005);
    transition: all 0.2s;
}

.work-highlight-item:hover {
    border-color: var(--border-strong);
    background: rgba(99, 102, 241, 0.05);
}

.work-highlight-item h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.work-highlight-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.work-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* Responsive for tablet (900px) */
@media (max-width: 900px) {
    .featured-work-grid { grid-template-columns: repeat(2, 1fr); }
    .featured-projects-grid { grid-template-columns: repeat(2, 1fr); }
    .research-grid { grid-template-columns: 1fr; }
    .research-header { flex-direction: column; gap: 0.5rem; }
    .research-meta-row { justify-content: flex-start; }
    .proj-header { flex-direction: column; gap: 0.5rem; }
    .proj-meta-row { justify-content: flex-start; }
}


