/* ============================================
   DESIGN SYSTEM — Dark Editorial with Warm Gold
   Fonts: Instrument Serif (display) + Outfit (body)
   ============================================ */

/* --- Custom Properties --- */
:root {
    --font-display: 'Instrument Serif', Georgia, serif;
    --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

    --bg-deep: #0b0b0d;
    --bg-surface: #141418;
    --bg-elevated: #1b1b21;
    --bg-hover: #222229;
    --text-primary: #ede8df;
    --text-secondary: #908b82;
    --text-muted: #5c5853;
    --accent: #c9a84c;
    --accent-hover: #d9bc6a;
    --accent-subtle: rgba(201, 168, 76, 0.07);
    --accent-border: rgba(201, 168, 76, 0.22);
    --success: #5bb89a;
    --success-subtle: rgba(91, 184, 154, 0.1);
    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.6);
    --shadow-xl: 0 24px 48px rgba(0,0,0,0.7);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-deep: #f7f5f0;
    --bg-surface: #ffffff;
    --bg-elevated: #ffffff;
    --bg-hover: #f0ece5;
    --text-primary: #1a1714;
    --text-secondary: #6b665e;
    --text-muted: #a09a90;
    --accent: #9e7c28;
    --accent-hover: #87690f;
    --accent-subtle: rgba(158, 124, 40, 0.05);
    --accent-border: rgba(158, 124, 40, 0.22);
    --success: #3a8b6d;
    --success-subtle: rgba(58, 139, 109, 0.08);
    --border: rgba(0, 0, 0, 0.07);
    --border-strong: rgba(0, 0, 0, 0.12);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.1);
    --shadow-xl: 0 24px 48px rgba(0,0,0,0.12);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-deep);
    overflow-x: hidden;
    transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

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

ul { list-style: none; }

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

/* --- Layout --- */
.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 7rem 0;
    position: relative;
}

.section-alt {
    background: var(--bg-surface);
}

section {
    scroll-margin-top: 80px;
}

/* --- Section Headers --- */
.section-header {
    margin-bottom: 3.5rem;
}

.section-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.15;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 11, 13, 0.85);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

[data-theme="light"] .navbar {
    background: rgba(247, 245, 240, 0.88);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    flex-shrink: 0;
    transition: color var(--transition);
}

.nav-logo:hover {
    color: var(--accent);
}

.nav-menu {
    display: none;
    gap: 2.5rem;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: color var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--accent);
    transition: width var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* --- Status Chip --- */
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--success);
    background: var(--success-subtle);
    border: 1px solid rgba(91, 184, 154, 0.2);
    white-space: nowrap;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

/* --- Nav Socials --- */
.nav-socials {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Hide mobile menu extras on desktop */
.mobile-menu-extras {
    display: none;
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: color var(--transition), background var(--transition);
}

.nav-icon:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

[data-theme="light"] .nav-icon:hover {
    background: var(--bg-hover);
}

/* --- Theme Toggle --- */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: color var(--transition), background var(--transition);
}

.theme-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

[data-theme="light"] .theme-toggle:hover {
    background: var(--bg-hover);
}

.theme-icon .icon-sun {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-icon .icon-moon {
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease;
}

[data-theme="light"] .theme-icon .icon-sun {
    display: block;
    opacity: 1;
}

[data-theme="light"] .theme-icon .icon-moon {
    display: none;
    opacity: 0;
}

/* --- Hamburger --- */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.hamburger span {
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Nav Resume Button --- */
.nav-resume-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: var(--accent);
    color: #0b0b0d;
    font-weight: 600;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition), opacity var(--transition);
    text-decoration: none;
    letter-spacing: 0.01em;
    opacity: 0;
    pointer-events: none;
    order: -1;
}

.nav-resume-btn:not([style*="display: none"]) {
    animation: slideInResume 0.3s var(--ease-out) forwards;
}

@keyframes slideInResume {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
        pointer-events: auto;
    }
}

.nav-resume-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(201, 168, 76, 0.3);
    color: #0b0b0d;
}

.nav-resume-btn svg {
    flex-shrink: 0;
}

/* ============================================
   PAGE NAVIGATION SIDEBAR
   ============================================ */
.page-nav {
    position: fixed;
    right: calc((100vw - 1080px) / 2 - 8rem);
    top: 50%;
    transform: translateY(-50%);
    z-index: 500;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.3s var(--ease-out);
}

.page-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(12px);
}

.page-nav-link {
    position: relative;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: color var(--transition);
    padding: 0.25rem 0.5rem 0.25rem 1.25rem;
    white-space: nowrap;
}

.page-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: background var(--transition), transform var(--transition);
}

.page-nav-link:hover {
    color: var(--text-primary);
}

.page-nav-link:hover::before {
    transform: translateY(-50%) scale(1.3);
}

.page-nav-link.active {
    color: var(--accent);
}

.page-nav-link.active::before {
    background: var(--accent);
    transform: translateY(-50%) scale(1.4);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 64px;
}

.hero-glow {
    position: absolute;
    top: -15%;
    right: -8%;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, var(--accent-subtle) 0%, transparent 65%);
    pointer-events: none;
    opacity: 0.8;
}

[data-theme="light"] .hero-glow {
    opacity: 0.5;
}

.hero-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 4rem 2rem;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3.5rem;
}

/* Stagger animation for hero children with --delay */
.hero-left > *,
.hero-right > * {
    opacity: 0;
    transform: translateY(18px);
    animation: fadeUp 0.7s var(--ease-out) forwards;
    animation-delay: calc(var(--delay, 0) * 0.1s + 0.2s);
}

/* The namerow animates as one unit */
.hero-namerow {
    opacity: 0;
    transform: translateY(18px);
    animation: fadeUp 0.7s var(--ease-out) forwards;
    animation-delay: calc(var(--delay, 1) * 0.1s + 0.2s);
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--success);
    margin-bottom: 1.5rem;
    letter-spacing: 0.01em;
}

.status-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    position: relative;
    flex-shrink: 0;
}

.status-pulse::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1.5px solid var(--success);
    animation: ping 2s ease-in-out infinite;
}

@keyframes ping {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 0; transform: scale(1.8); }
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 7vw, 5.5rem);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.hero-name-last {
    color: var(--accent);
}

.hero-role {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.75rem;
}

.hero-pitch {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-secondary);
    max-width: 520px;
    margin-bottom: 2.5rem;
}

/* --- Hero Right Label --- */
.hero-right-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

/* --- Highlight Stack --- */
.highlight-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

/* --- Highlight Card --- */
.highlight-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    transition: border-color var(--transition);
}

[data-theme="light"] .highlight-card {
    background: var(--bg-elevated);
}

.highlight-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.highlight-name {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.highlight-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
}

.highlight-impact {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.highlight-proof {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* --- Highlight Actions --- */
.highlight-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* --- Highlight CTA Button --- */
.highlight-cta {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #0b0b0d;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition), border-color var(--transition), color var(--transition);
}

.highlight-cta:hover {
    background: var(--accent-hover);
    color: #0b0b0d;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(201, 168, 76, 0.3);
}

.highlight-cta--outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-strong);
}

.highlight-cta--outline:hover {
    border-color: var(--accent-border);
    color: var(--accent);
    background: var(--accent-subtle);
    box-shadow: none;
}

/* --- Hero Actions --- */
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background: var(--accent);
    color: #0b0b0d;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(201, 168, 76, 0.25);
    color: #0b0b0d;
}

.btn-primary svg {
    flex-shrink: 0;
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.8rem;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background: transparent;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-strong);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition), transform var(--transition);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.btn-outline:hover {
    border-color: var(--accent-border);
    background: var(--accent-subtle);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* --- Name Row: name + photo side by side --- */
.hero-namerow {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero-photo {
    width: 130px;
    height: 130px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-left {
    display: flex;
    flex-direction: column;
}

.hero-right {
    display: flex;
    flex-direction: column;
}

/* ============================================
   PROJECTS
   ============================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.project-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

[data-theme="light"] .project-card {
    background: var(--bg-elevated);
}

.project-card:hover {
    border-color: var(--accent-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.project-card.featured {
    border-left: 3px solid var(--accent);
}

.project-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    gap: 0.75rem;
}

.project-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.project-badge {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    background: var(--accent-subtle);
    color: var(--accent);
    border: 1px solid var(--accent-border);
    white-space: nowrap;
}

.project-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.project-summary {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
    flex: 1;
    margin-bottom: 1.25rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: auto;
}

.tag {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    background: var(--bg-elevated);
    color: var(--text-muted);
    border: 1px solid var(--border);
    letter-spacing: 0.01em;
}

[data-theme="light"] .tag {
    background: var(--bg-hover);
}

/* ============================================
   SKILLS
   ============================================ */
.skills-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.skills-intro {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    padding: 1.25rem 0.5rem;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

[data-theme="light"] .skill-item {
    background: var(--bg-surface);
}

.skill-item:hover {
    border-color: var(--accent-border);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.skill-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

[data-theme="dark"] .skill-icon img {
    filter: invert(1) brightness(1.15);
    opacity: 0.85;
}

.skill-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

/* ============================================
   GITHUB ANALYTICS
   ============================================ */
.github-analytics {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
}

.github-analytics-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
}

.github-stats-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    margin-bottom: 3rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 0;
}

[data-theme="light"] .github-stats-card {
    background: var(--bg-surface);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1.5rem;
    flex: 1;
    min-width: 0;
}

.stat-item-accent {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.stat-number-accent {
    color: var(--accent);
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-range {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.contribution-graph-container {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    overflow-x: auto;
}

[data-theme="light"] .contribution-graph-container {
    background: var(--bg-surface);
}

.graph-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: 0.01em;
}

.contribution-graph {
    width: 100%;
    height: auto;
    min-height: 300px;
}

.contribution-graph .y-axis-labels,
.contribution-graph .x-axis-labels {
    font-size: 12px;
    fill: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 400;
}

.contribution-graph .axis-label {
    font-size: 11px;
    fill: var(--text-muted);
}

.contribution-graph .chart-fill {
    fill: url(#lineGradient);
    stroke: none;
}

.contribution-graph .chart-line {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contribution-graph .data-point {
    fill: var(--accent);
    stroke: var(--bg-elevated);
    stroke-width: 1.5;
    opacity: 0;
    animation: dotAppear 0.4s var(--ease-out) forwards;
}

@keyframes dotAppear {
    to {
        opacity: 1;
    }
}

/* ============================================
   ABOUT
   ============================================ */
.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

[data-theme="light"] .about-card {
    background: var(--bg-elevated);
}

.about-card:hover {
    border-color: var(--accent-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.about-icon {
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: var(--accent-subtle);
    flex-shrink: 0;
}

.about-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    display: block;
    flex-shrink: 0;
}

.about-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    padding: 1.5rem;
    flex: 1;
}

.about-card a {
    color: var(--accent);
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition), color var(--transition);
}

.about-card a:hover {
    border-bottom-color: var(--accent);
    color: var(--accent-hover);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    background: var(--bg-deep);
}

.footer-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.footer-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-primary);
}

.footer-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
}

/* ============================================
   OVERLAY (Project + Resume)
   ============================================ */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: flex;
    opacity: 1;
}

.overlay-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    max-width: 660px;
    width: 100%;
    max-height: 92vh;
    position: relative;
    box-shadow: var(--shadow-xl);
    transform: scale(0.96) translateY(8px);
    transition: transform 0.3s var(--ease-out);
    display: flex;
    flex-direction: column;
}

#overlay-body {
    overflow-y: auto;
    padding: 2rem;
    flex: 1;
}

[data-theme="light"] .overlay-panel {
    background: var(--bg-elevated);
}

.overlay.active .overlay-panel {
    transform: scale(1) translateY(0);
}

.overlay-panel-wide {
    max-width: 1000px;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.overlay-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    z-index: 10;
}

.overlay-close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* --- Carousel Navigation --- */
.overlay-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition), background var(--transition), border-color var(--transition);
    z-index: 10;
}

.overlay-nav:hover {
    color: var(--accent);
    border-color: var(--accent-border);
}

.overlay-nav-prev {
    left: -72px;
}

.overlay-nav-next {
    right: -72px;
}

@media (max-width: 900px) {
    .overlay-nav {
        display: none;
    }

    .carousel-footer {
        flex-direction: column;
        gap: 1rem;
    }

    .carousel-dots {
        order: 1;
    }

    .carousel-counter {
        order: 0;
    }
}

/* --- Carousel Footer --- */
.carousel-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
    flex-shrink: 0;
    z-index: 5;
}

.carousel-dots {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-strong);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background var(--transition), transform var(--transition), width var(--transition);
}

.carousel-dot:hover {
    background: var(--text-muted);
    transform: scale(1.2);
}

.carousel-dot.active {
    background: var(--accent);
    width: 28px;
    border-radius: 6px;
}

.carousel-counter {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    min-width: 40px;
    text-align: center;
}

/* --- Project Overlay Content --- */
.ov-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    padding-right: 2.5rem;
}

.ov-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.ov-meta-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: var(--accent-subtle);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ov-meta-github {
    display: inline-flex;
    align-items: center;
    color: var(--text-muted);
    transition: color var(--transition);
}

.ov-meta-github:hover {
    color: var(--accent);
}

.ov-instructor,
.ov-company {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.ov-instructor a {
    font-weight: 600;
}

.ov-award {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1rem;
}

.ov-award a {
    color: var(--accent);
    border-bottom: 1px dashed var(--accent-border);
}

.ov-award a:hover {
    color: var(--accent-hover);
}

.ov-divider {
    height: 1px;
    background: var(--border);
    margin: 1rem 0;
}

.ov-why {
    border-left: 2px solid var(--accent);
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    background: color-mix(in srgb, var(--accent) 5%, transparent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.ov-why-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    margin-bottom: 0.4rem;
}

.ov-why p {
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0;
}

.ov-description {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.ov-description p {
    margin-bottom: 0.65rem;
}

.ov-description strong {
    color: var(--text-primary);
    font-weight: 600;
    display: block;
    margin-top: 1.25rem;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

.ov-description strong:first-child {
    margin-top: 0;
}

.ov-description ul {
    padding-left: 1.25rem;
    margin-bottom: 0.75rem;
}

.ov-description li {
    padding: 0.2rem 0;
    position: relative;
    line-height: 1.6;
    padding-left: 0.75rem;
}

.ov-description li::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 0.7rem;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.6;
}

.ov-description a {
    color: var(--accent);
    font-weight: 500;
    border-bottom: 1px solid transparent;
}

.ov-description a:hover {
    border-bottom-color: var(--accent);
}

.ov-disclaimer {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--accent-subtle);
    border-left: 3px solid var(--accent);
    padding: 0.6rem 1rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.ov-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* --- Resume Overlay --- */
.resume-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border);
}

.resume-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--text-primary);
}

.resume-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.resume-actions .overlay-close {
    position: static;
}

.resume-body {
    flex: 1;
    background: var(--bg-elevated);
}

.resume-iframe {
    width: 100%;
    height: 100%;
    min-height: 780px;
    border: none;
}

/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE — Desktop
   ============================================ */
@media (max-width: 1200px) {
    .page-nav {
        right: 1rem;
    }
}

/* ============================================
   RESPONSIVE — Tablet
   ============================================ */
@media (max-width: 900px) {
    .page-nav {
        display: none;
    }
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    .hero-namerow {
        justify-content: center;
    }

    .hero-pitch {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-status {
        justify-content: center;
    }

    .highlight-stack {
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-right-label {
        text-align: center;
    }

    .skills-grid {
        grid-template-columns: repeat(5, 1fr);
    }

}

/* ============================================
   RESPONSIVE — Mobile
   ============================================ */
@media (max-width: 680px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-surface);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1.5rem 2rem;
        gap: 1.25rem;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-link {
        font-size: 1rem;
        padding: 0.5rem 0;
    }

    .status-chip {
        display: none;
    }

    .nav-socials {
        display: none;
    }

    /* Mobile menu social links & status (injected by JS) */
    .mobile-menu-extras {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border);
    }

    .mobile-status-chip {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--success);
    }

    .mobile-socials {
        display: flex;
        gap: 0.5rem;
    }

    .mobile-socials a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: var(--radius-sm);
        color: var(--text-secondary);
        background: var(--bg-elevated);
        border: 1px solid var(--border);
        transition: color var(--transition), border-color var(--transition);
    }

    .mobile-socials a:hover {
        color: var(--text-primary);
        border-color: var(--accent-border);
    }

    /* Hero mobile */
    .hero {
        min-height: auto;
        padding-top: 64px;
        padding-bottom: 2rem;
    }

    .hero-inner {
        padding: 2rem 1.25rem;
    }

    .hero-name {
        font-size: 3rem;
    }

    .hero-namerow {
        gap: 1.25rem;
        justify-content: center;
    }

    .hero-photo {
        width: 90px;
        height: 90px;
    }

    .hero-status {
        margin-bottom: 1rem;
        font-size: 0.75rem;
    }

    .hero-role {
        margin-bottom: 1.25rem;
        font-size: 1rem;
    }

    .hero-pitch {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    /* Highlight cards mobile */
    .highlight-card {
        padding: 0.85rem 1rem;
    }

    /* Buttons stack on mobile */
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn-primary,
    .btn-outline {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        min-height: 48px;
    }

    /* Projects */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        padding: 1.5rem;
    }

    .project-title {
        font-size: 1.2rem;
    }

    /* Skills */
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .skill-item {
        padding: 1rem 0.4rem;
    }

    /* GitHub Analytics mobile */
    .github-stats-card {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem 1.25rem;
    }

    .stat-item {
        padding: 0;
        border-left: none !important;
        border-right: none !important;
    }

    .contribution-graph-container {
        padding: 1.5rem 1rem;
    }

    .contribution-graph {
        min-height: 280px;
    }

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .about-icon {
        height: 180px;
        font-size: 2.2rem;
    }

    .about-image {
        height: 180px;
    }

    .about-card p {
        padding: 1.25rem;
        font-size: 0.85rem;
    }

    /* Sections */
    .section {
        padding: 4rem 0;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .container {
        padding: 0 1.25rem;
    }

    /* Footer */
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }

    .footer-links a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Overlays — near fullscreen on mobile */
    .overlay {
        padding: 0.5rem;
    }

    .overlay-panel {
        padding: 1.25rem;
        max-height: 96vh;
        border-radius: var(--radius-md);
    }

    .ov-title {
        font-size: 1.4rem;
        padding-right: 2rem;
    }

    .ov-description {
        font-size: 0.85rem;
    }

    .ov-description li {
        padding-left: 0.5rem;
    }

    /* Resume overlay mobile */
    .overlay-panel-wide {
        max-height: 96vh;
        border-radius: var(--radius-md);
    }

    .resume-header {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 1rem 1.25rem;
    }

    .resume-iframe {
        min-height: 400px;
    }

    /* Mobile resume fallback (shown by JS when iframe fails) */
    .resume-mobile-fallback {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1.25rem;
        padding: 3rem 1.5rem;
        text-align: center;
    }

    .resume-mobile-fallback p {
        font-size: 0.9rem;
        color: var(--text-secondary);
        line-height: 1.6;
    }
}

/* ============================================
   RESPONSIVE — Small Mobile
   ============================================ */
@media (max-width: 400px) {
    .hero-name {
        font-size: 2.4rem;
    }

    .hero-namerow {
        gap: 1rem;
    }

    .hero-photo {
        width: 75px;
        height: 75px;
    }

    .hero-pitch {
        font-size: 0.9rem;
    }

    .highlight-card {
        padding: 0.75rem 0.85rem;
        gap: 0.65rem;
    }

    .highlight-name {
        font-size: 0.9rem;
    }

    .highlight-proof {
        font-size: 0.75rem;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-card {
        padding: 1.25rem;
    }

    .project-tags {
        gap: 0.3rem;
    }

    .tag {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }

    .section {
        padding: 3.5rem 0;
    }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   OVERLAY SCROLLBAR
   ============================================ */
.overlay-panel::-webkit-scrollbar {
    width: 4px;
}

.overlay-panel::-webkit-scrollbar-track {
    background: transparent;
}

.overlay-panel::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 2px;
}
