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

:root {
    --bg: #0B0A14;
    --bg-panel: rgba(16, 14, 28, 0.6);
    --bg-card: rgba(22, 18, 38, 0.45);
    --text: #EDE8DC;
    --text-secondary: #B0A890;
    --text-muted: #8A7E6A;
    --text-dim: #4A4238;
    --primary: #D4A843;
    --primary-bright: #E8C547;
    --accent: #8B9FD4;
    --accent-deep: #5C3D8F;
    --success: #22c55e;
    --border: rgba(212, 168, 67, 0.10);
    --border-mid: rgba(212, 168, 67, 0.22);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 14px;
    --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ── Accent line (top) ─────────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--primary-bright), var(--accent), transparent);
    z-index: 1001;
    pointer-events: none;
    opacity: 0.5;
}

/* ── Ambient orbs ──────────────────────────────────────── */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 800px 700px at 5% 10%, rgba(212,168,67,0.10) 0%, transparent 65%),
        radial-gradient(ellipse 600px 600px at 90% 15%, rgba(139,159,212,0.07) 0%, transparent 65%),
        radial-gradient(ellipse 700px 500px at 80% 60%, rgba(92,61,143,0.09) 0%, transparent 65%),
        radial-gradient(ellipse 500px 600px at 15% 70%, rgba(232,197,71,0.06) 0%, transparent 65%),
        radial-gradient(ellipse 600px 400px at 50% 90%, rgba(139,159,212,0.05) 0%, transparent 65%),
        radial-gradient(ellipse 400px 500px at 55% 30%, rgba(180,140,60,0.04) 0%, transparent 65%);
    animation: driftOrbs 30s ease-in-out infinite alternate;
}

@keyframes driftOrbs {
    0% {
        background:
            radial-gradient(ellipse 800px 700px at 5% 10%, rgba(212,168,67,0.10) 0%, transparent 65%),
            radial-gradient(ellipse 600px 600px at 90% 15%, rgba(139,159,212,0.07) 0%, transparent 65%),
            radial-gradient(ellipse 700px 500px at 80% 60%, rgba(92,61,143,0.09) 0%, transparent 65%),
            radial-gradient(ellipse 500px 600px at 15% 70%, rgba(232,197,71,0.06) 0%, transparent 65%),
            radial-gradient(ellipse 600px 400px at 50% 90%, rgba(139,159,212,0.05) 0%, transparent 65%),
            radial-gradient(ellipse 400px 500px at 55% 30%, rgba(180,140,60,0.04) 0%, transparent 65%);
    }
    100% {
        background:
            radial-gradient(ellipse 700px 800px at 85% 25%, rgba(212,168,67,0.08) 0%, transparent 65%),
            radial-gradient(ellipse 600px 700px at 15% 60%, rgba(92,61,143,0.10) 0%, transparent 65%),
            radial-gradient(ellipse 550px 500px at 50% 5%, rgba(232,197,71,0.06) 0%, transparent 65%),
            radial-gradient(ellipse 700px 450px at 30% 80%, rgba(139,159,212,0.07) 0%, transparent 65%),
            radial-gradient(ellipse 500px 600px at 75% 55%, rgba(212,168,67,0.05) 0%, transparent 65%),
            radial-gradient(ellipse 450px 400px at 40% 40%, rgba(92,61,143,0.04) 0%, transparent 65%);
    }
}

/* ── Starfield ─────────────────────────────────────────── */
#star-field { position: fixed; inset: 0; pointer-events: none; z-index: 1; }

.star {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    animation: starGlimmer var(--dur) ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes starGlimmer {
    0%, 100% { opacity: 0.08; transform: scale(0.8); }
    30%      { opacity: 0.6;  transform: scale(1.2); }
    50%      { opacity: 1;    transform: scale(1);   box-shadow: 0 0 var(--glow-size) var(--glow-size) var(--color); }
    70%      { opacity: 0.5;  transform: scale(1.1); }
}

.star.bright::before, .star.bright::after {
    content: '';
    position: absolute;
    background: var(--color);
    border-radius: 1px;
    opacity: 0.4;
}
.star.bright::before {
    width: 1px;
    height: calc(var(--size) * 3);
    top: calc(var(--size) * -1);
    left: calc(var(--size) / 2 - 0.5px);
}
.star.bright::after {
    width: calc(var(--size) * 3);
    height: 1px;
    left: calc(var(--size) * -1);
    top: calc(var(--size) / 2 - 0.5px);
}

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(212,168,67,0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(212,168,67,0.45); }

/* ── Focus states ──────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
a:focus:not(:focus-visible) { outline: none; }

/* ── Utilities ─────────────────────────────────────────── */
.mt-32 { margin-top: 32px; }

/* ── Container ─────────────────────────────────────────── */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

/* ── Nav ───────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(11, 10, 20, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links { display: flex; gap: 28px; list-style: none; }

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: color 0.3s var(--ease);
}
.nav-links a:hover { color: var(--text); }

/* Mobile menu toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-direction: column;
    gap: 5px;
}
.nav-toggle span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--text-muted);
    transition: all 0.3s var(--ease);
    border-radius: 1px;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Hero ──────────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 80px 0 60px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 30%, rgba(212,168,67,0.10) 0%, transparent 50%),
                radial-gradient(circle at 30% 70%, rgba(92,61,143,0.08) 0%, transparent 50%),
                radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(212,168,67,0.05) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.hero-subtitle {
    font-family: var(--mono);
    font-size: 0.78rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 16px;
    opacity: 0.9;
}

.hero-title {
    font-size: clamp(2.8rem, 7vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 28px;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 70%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 560px;
    line-height: 1.7;
    margin-bottom: 36px;
}
.hero-description strong { color: var(--text); font-weight: 500; }

.hero-cta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s var(--ease);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-bright));
    color: var(--bg);
    box-shadow: 0 2px 12px rgba(212,168,67,0.25);
}
.btn-primary:hover {
    box-shadow: 0 4px 20px rgba(212,168,67,0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(212,168,67,0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: rgba(212,168,67,0.12);
    color: var(--text);
    border-color: var(--border-mid);
}

/* ── Sections ──────────────────────────────────────────── */
.section {
    padding: 100px 0;
    position: relative;
}

/* Subtle section divider */
.section + .section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(60%, 400px);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-mid), transparent);
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

/* Smaller label for sections that don't need a big heading */
.section-label {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 24px;
}

.section-subtitle {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 36px;
}

/* ── About (prose) ─────────────────────────────────────── */
.about-prose {
    max-width: 620px;
}

.about-prose p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 18px;
}
.about-prose strong { color: var(--text); font-weight: 500; }

.about-skills {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    line-height: 2;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}

/* ── Project cards ─────────────────────────────────────── */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
    position: relative;
}
.project-card:hover {
    border-color: var(--border-mid);
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}

/* Lead project */
.project-card.lead {
    padding: 32px 36px;
    margin-bottom: 16px;
    border-color: rgba(212,168,67,0.15);
    background: linear-gradient(160deg, rgba(16,14,28,0.7), rgba(22,18,38,0.4));
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.project-meta-inline {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.03em;
    white-space: nowrap;
}

/* Secondary projects */
.projects-secondary {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}
.projects-secondary .project-card { padding: 24px; }
.projects-secondary .project-title { font-size: 1.1rem; }
.projects-secondary .project-description { font-size: 0.82rem; line-height: 1.6; }

.project-status { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

.status-badge {
    font-family: var(--mono);
    font-size: 0.65rem;
    padding: 3px 9px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.status-badge.in-progress { background: rgba(232,197,71,0.12); color: var(--primary-bright); }
.status-badge.active { background: rgba(212,168,67,0.12); color: var(--primary); }
.status-badge.complete { background: rgba(34,197,94,0.12); color: var(--success); }
.status-badge.live { background: rgba(34,197,94,0.15); color: var(--success); animation: pulse 2.5s infinite; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

.category-badge {
    font-family: var(--mono);
    font-size: 0.65rem;
    padding: 3px 9px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.manufacturing-badge { background: rgba(251,146,60,0.12); color: #fb923c; }
.bioenergy-badge { background: rgba(34,197,94,0.12); color: #22c55e; }
.autonomous-badge { background: rgba(56,189,248,0.12); color: #38bdf8; }

.project-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.project-tagline {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.project-body { margin-top: 12px; }

.project-description {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 14px;
}
.project-description strong { color: var(--text); font-weight: 500; }

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.tech-tag {
    font-family: var(--mono);
    font-size: 0.65rem;
    padding: 3px 9px;
    background: rgba(212,168,67,0.04);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-muted);
    transition: color 0.2s, border-color 0.2s;
}
.tech-tag:hover {
    border-color: var(--border-mid);
    color: var(--primary);
}

.project-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: color 0.2s;
}
.project-link:hover { color: var(--primary-bright); }

/* ── Scroll track (software) ──────────────────────────── */
.scroll-wrapper {
    position: relative;
}
/* Fade edges to hint scrollability */
.scroll-wrapper::before,
.scroll-wrapper::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 48px;
    z-index: 3;
    pointer-events: none;
}
.scroll-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--bg), transparent);
}
.scroll-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--bg), transparent);
}

.scroll-track {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 48px 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(212,168,67,0.2) transparent;
}
.scroll-track::-webkit-scrollbar { height: 4px; }
.scroll-track::-webkit-scrollbar-track { background: transparent; }
.scroll-track::-webkit-scrollbar-thumb { background: rgba(212,168,67,0.25); border-radius: 2px; }

.scroll-cards {
    display: flex;
    gap: 16px;
    padding: 4px 0 8px;
    width: max-content;
}

.scroll-card {
    width: 320px;
    flex-shrink: 0;
    scroll-snap-align: start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color 0.3s var(--ease);
}
.scroll-card:hover { border-color: var(--border-mid); }

.scroll-card .project-title { font-size: 1.15rem; }
.scroll-card .project-description { font-size: 0.8rem; line-height: 1.6; }
.scroll-card .status-badge { margin-bottom: 12px; }

/* ── Mini projects ─────────────────────────────────────── */
.mini-projects {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.mini-project {
    background: var(--bg);
    padding: 22px 24px;
}

.mini-label {
    font-family: var(--mono);
    font-size: 0.62rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 5px;
}

.mini-project h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    letter-spacing: -0.01em;
}

.mini-project p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 6px;
}

/* ── Credentials grid ──────────────────────────────────── */
.credentials-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 56px;
}

.credentials-heading {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* ── Timeline ──────────────────────────────────────────── */
.experience-timeline { margin-bottom: 0; }

.timeline-item {
    display: flex;
    gap: 18px;
    position: relative;
    padding-bottom: 24px;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-marker {
    width: 7px;
    height: 7px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 8px;
    position: relative;
}
.timeline-item:not(:last-child) .timeline-marker::after {
    content: '';
    position: absolute;
    top: 11px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: calc(100% + 13px);
    background: var(--border);
}

.timeline-content h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 3px;
}
.timeline-content .company {
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 1px;
}
.timeline-content .date {
    color: var(--text-dim);
    font-size: 0.72rem;
    font-family: var(--mono);
    margin-bottom: 6px;
}
.timeline-content .description {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.55;
}
.timeline-content .description strong { color: var(--text); font-weight: 500; }

/* ── Leadership ────────────────────────────────────────── */
.leadership-compact { display: flex; flex-direction: column; gap: 10px; }

.leadership-item {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.55;
}
.leadership-item strong { color: var(--text); }

/* ── Academics ─────────────────────────────────────────── */
.gpa-row {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 18px;
}
.gpa-value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.gpa-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.gpa-sep {
    color: var(--text-dim);
    font-size: 1rem;
    margin: 0 6px;
}

.grades-table {
    width: 100%;
    border-collapse: collapse;
}
.grades-table td {
    padding: 9px 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}
.grades-table tr:last-child td { border-bottom: none; }
.grade-cell {
    text-align: right;
    font-family: var(--mono);
    font-weight: 500;
    font-size: 0.78rem;
}
.grade-a { color: var(--success); }
.highlight-row td { color: var(--text); }
.upcoming-row td { opacity: 0.45; }

/* ── Contact ───────────────────────────────────────────── */
.contact { text-align: center; padding: 80px 0; }

.contact-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 18px;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text);
    background: rgba(212,168,67,0.06);
    border: 1px solid var(--border);
    transition: all 0.3s var(--ease);
}
.contact-btn:hover {
    background: rgba(212,168,67,0.12);
    border-color: var(--border-mid);
}

/* ── Footer ────────────────────────────────────────────── */
.footer {
    padding: 28px 0;
    text-align: center;
    position: relative;
    z-index: 2;
}
.footer p {
    color: var(--text-dim);
    font-size: 0.72rem;
}

/* ── Clickable project cards ──────────────────────────── */
[data-detail] { cursor: pointer; }
[data-detail] .project-link { pointer-events: none; }
[data-detail]::after {
    content: 'Click for details';
    position: absolute;
    bottom: 10px;
    right: 14px;
    font-family: var(--mono);
    font-size: 0.6rem;
    color: var(--text-dim);
    opacity: 0;
    transition: opacity 0.3s var(--ease);
    letter-spacing: 0.03em;
}
[data-detail]:hover::after { opacity: 1; }

/* ── Project detail modal ────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s var(--ease);
}
.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-container {
    position: relative;
    background: linear-gradient(170deg, rgba(18, 15, 32, 0.98), rgba(12, 10, 22, 0.98));
    border: 1px solid var(--border-mid);
    border-radius: var(--radius);
    max-width: 680px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px 44px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 1px rgba(212,168,67,0.2);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    scrollbar-width: thin;
    scrollbar-color: rgba(212,168,67,0.2) transparent;
}
.modal-overlay.open .modal-container {
    transform: translateY(0) scale(1);
}

.modal-container::-webkit-scrollbar { width: 4px; }
.modal-container::-webkit-scrollbar-track { background: transparent; }
.modal-container::-webkit-scrollbar-thumb { background: rgba(212,168,67,0.2); border-radius: 2px; }

.modal-close {
    position: sticky;
    top: 0;
    float: right;
    background: rgba(212,168,67,0.06);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    z-index: 1;
}
.modal-close:hover {
    background: rgba(212,168,67,0.15);
    color: var(--text);
    border-color: var(--border-mid);
}

.modal-header {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-tagline {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.modal-meta {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.03em;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.modal-section {
    margin-bottom: 24px;
}

.modal-section h3 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
}

.modal-section p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}
.modal-section p strong { color: var(--text); font-weight: 500; }

.modal-section ul {
    list-style: none;
    padding: 0;
}

.modal-section li {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.65;
    padding: 4px 0 4px 16px;
    position: relative;
}
.modal-section li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.5;
}
.modal-section li strong { color: var(--text); font-weight: 500; }

.modal-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.modal-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
    pointer-events: auto;
}
.modal-link:hover { color: var(--primary-bright); }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1024px) {
    .projects-secondary {
        grid-template-columns: 1fr 1fr;
    }
    .mini-projects {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 56px;
        left: 0; right: 0;
        background: rgba(11, 10, 20, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 16px 24px 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }
    .nav-links.open { display: flex; }

    .hero-title { font-size: clamp(2.2rem, 10vw, 3rem); }
    .hero-description { font-size: 1rem; }

    .projects-secondary { grid-template-columns: 1fr; }
    .mini-projects { grid-template-columns: 1fr; }

    .credentials-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .scroll-card { width: 280px; }
    .scroll-track { padding-left: 24px; padding-right: 24px; }
    .scroll-wrapper::before, .scroll-wrapper::after { width: 24px; }

    .section { padding: 70px 0; }

    .modal-container { padding: 28px 24px; max-height: 90vh; width: 95%; }
    .modal-title { font-size: 1.4rem; }
    [data-detail]::after { display: none; }
}

@media (max-width: 480px) {
    .hero-cta { flex-direction: column; align-items: flex-start; }
    .gpa-value { font-size: 1.6rem; }
    .container { padding: 0 16px; }
}
