/* ==============================================
   CSS Reset & Base Styles
   ============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Theme - Beige Colors */
    --primary-color: #8b7355;
    --primary-dark: #6b5744;
    --primary-light: #a89080;
    --secondary-color: #10b981;
    --accent-color: #d4a574;
    --text-primary: #3e2723;
    --text-secondary: #5d4037;
    --text-light: #795548;
    --bg-primary: #f5f0e8;
    --bg-secondary: #efe8dc;
    --bg-tertiary: #e8dfd0;
    --bg-dark: #d7cec0;
    --border-color: #d4c4b0;
    --shadow-sm: 0 1px 2px 0 rgba(62, 39, 35, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(62, 39, 35, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(62, 39, 35, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(62, 39, 35, 0.1);
    
    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ==============================================
   Dark Theme Colors - FIXED FOR VISIBILITY
   ============================================== */
[data-theme="dark"] {
    --primary-color: #818cf8;
    --primary-dark: #6366f1;
    --primary-light: #a5b4fc;
    --secondary-color: #34d399;
    --accent-color: #fbbf24;
    
    /* Fixed text colors for dark theme */
    --text-primary: #f3f4f6;
    --text-secondary: #e5e7eb;
    --text-light: #d1d5db;
    
    /* Fixed background colors */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-dark: #020617;
    
    /* Fixed border color */
    --border-color: #475569;
    
    /* Shadows for dark theme */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.8);
}

html {
    scroll-behavior: smooth;
}

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

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ==============================================
   Scroll Progress Indicator
   ============================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    z-index: 9999;
    transition: width 0.1s ease-out;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.5);
}

/* ==============================================
   Navigation Bar - FIXED FOR DARK THEME
   ============================================== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all var(--transition-base);
}

[data-theme="dark"] #navbar {
    background-color: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--border-color);
}

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

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-logo .dot {
    color: var(--primary-color);
    font-size: 2rem;
    line-height: 1;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--transition-base);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-base);
}

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

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

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-base);
    margin-left: var(--spacing-md);
    position: relative;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.theme-toggle svg {
    position: absolute;
    transition: all var(--transition-base);
}

.sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    color: var(--primary-color);
}

.moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
    color: var(--primary-color);
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: all var(--transition-base);
    border-radius: 2px;
}

/* ==============================================
   Hero Section - FIXED FOR DARK THEME
   ============================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(80px + var(--spacing-xl)) var(--spacing-md) var(--spacing-xl);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
}

[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--spacing-xl);
    align-items: center;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

.hero-title .highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    max-width: 600px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.hero-social {
    display: flex;
    gap: var(--spacing-md);
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Profile Photo */
.hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-photo-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    box-shadow: var(--shadow-xl);
    transition: all var(--transition-base);
}

.profile-photo:hover {
    transform: scale(1.05);
}

.photo-ring {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    /* border: 2px dashed var(--primary-light); */
    opacity: 0.5;
    /* animation: rotate 20s linear infinite; */
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.scroll-indicator {
    position: absolute;
    bottom: var(--spacing-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(45deg); }
    40% { transform: translateY(-10px) rotate(45deg); }
    60% { transform: translateY(-5px) rotate(45deg); }
}

/* ==============================================
   Section Titles
   ============================================== */
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xl);
    text-align: center;
    position: relative;
    padding-bottom: var(--spacing-md);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* ==============================================
   About Section - FIXED FOR DARK THEME
   ============================================== */
.about-section {
    padding: var(--spacing-2xl) var(--spacing-md);
    background-color: var(--bg-secondary);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-intro {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.about-text p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.stat-item {
    text-align: center;
    padding: var(--spacing-lg);
    background-color: var(--bg-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base);
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ==============================================
   Highlights Section - FIXED FOR DARK THEME
   ============================================== */
.highlights-section {
    padding: var(--spacing-2xl) var(--spacing-md);
    background-color: var(--bg-primary);
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.highlight-card {
    padding: var(--spacing-xl);
    background-color: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.highlight-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.highlight-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    border-radius: 16px;
    margin-bottom: var(--spacing-md);
    color: white;
}

.highlight-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.highlight-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==============================================
   Skills Section - FIXED FOR DARK THEME
   ============================================== */
.skills-section {
    padding: var(--spacing-2xl) var(--spacing-md);
    background-color: var(--bg-secondary);
}

.skills-content {
    max-width: 1000px;
    margin: 0 auto;
}

.skill-category {
    margin-bottom: var(--spacing-xl);
}

.category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.skill-tag {
    padding: 0.625rem 1.25rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-radius: 50px;
    font-size: 0.9375rem;
    font-weight: 500;
    border: 2px solid var(--border-color);
    transition: all var(--transition-base);
}

.skill-tag:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Skills Proficiency Bars */
.skills-proficiency {
    margin-top: var(--spacing-2xl);
    padding: var(--spacing-xl);
    background-color: var(--bg-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.proficiency-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.proficiency-item {
    margin-bottom: var(--spacing-lg);
}

.proficiency-item:last-child {
    margin-bottom: 0;
}

.proficiency-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-primary);
}

.proficiency-percent {
    color: var(--primary-color);
    font-weight: 600;
}

.proficiency-bar-bg {
    width: 100%;
    height: 12px;
    background-color: var(--bg-tertiary);
    border-radius: 50px;
    overflow: hidden;
}

.proficiency-bar {
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 50px;
    width: 0;
    transition: width 1.5s ease;
}

.proficiency-bar.animated {
    animation: progressBar 1.5s ease forwards;
}

/* ==============================================
   Experience Section - FIXED FOR DARK THEME
   ============================================== */
.experience-section {
    padding: var(--spacing-2xl) var(--spacing-md);
    background-color: var(--bg-primary);
}

.experience-timeline {
    max-width: 900px;
    margin: 0 auto;
}

.experience-item {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
    position: relative;
}

.experience-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 29px;
    top: 60px;
    bottom: -32px;
    width: 2px;
    background-color: var(--border-color);
}

.experience-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    color: white;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.experience-content {
    padding: var(--spacing-lg);
    background-color: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.experience-content:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
}

.experience-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.experience-company {
    font-size: 1.125rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.experience-duration {
    font-size: 0.9375rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

.experience-highlights {
    list-style: none;
    padding: 0;
}

.experience-highlights li {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    position: relative;
    line-height: 1.6;
}

.experience-highlights li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

/* ==============================================
   Projects Section - FIXED FOR DARK THEME
   ============================================== */
.projects-section {
    padding: var(--spacing-2xl) var(--spacing-md);
    background-color: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
}

.project-card {
    padding: var(--spacing-xl);
    background-color: var(--bg-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.project-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.project-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    border-radius: 12px;
    color: var(--primary-color);
}

.project-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.project-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    padding: 0.375rem 0.875rem;
    background-color: var(--bg-secondary);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid var(--primary-light);
}

/* ==============================================
   Achievements Section - FIXED FOR DARK THEME
   ============================================== */
.achievements-section {
    padding: var(--spacing-2xl) var(--spacing-md);
    background-color: var(--bg-primary);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
}

.achievement-card {
    padding: var(--spacing-xl);
    background-color: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.achievement-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--secondary-color);
}

.achievement-icon {
    margin: 0 auto var(--spacing-md);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border-radius: 50%;
    color: white;
}

.achievement-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.achievement-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==============================================
   Career Timeline Section - FIXED FOR DARK THEME
   ============================================== */
.timeline-section {
    padding: var(--spacing-2xl) var(--spacing-md);
    background-color: var(--bg-secondary);
}

/* Improve Career Journey (Timeline) contrast in dark mode */
[data-theme="dark"] .timeline-section {
    background-color: #0b1220; /* darker than --bg-secondary for better separation */
}

[data-theme="dark"] .timeline-content {
    background-color: #111b2e; /* card background */
    border-left-color: var(--primary-color);
}

[data-theme="dark"] .timeline-dot {
    border-color: #0b1220; /* match section bg for clean ring */
}

[data-theme="dark"] .timeline-period {
    color: #cbd5e1; /* brighter for readability */
}

.career-timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.career-timeline::before {
    content: '';
    position: absolute;
    left: 50px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.timeline-node {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

.timeline-node.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 4px solid var(--bg-secondary);
    box-shadow: 0 0 0 4px var(--primary-light);
    position: relative;
    z-index: 2;
}

.timeline-badge {
    margin-top: var(--spacing-sm);
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-badge.current {
    background-color: var(--secondary-color);
    color: white;
}

.timeline-badge.work {
    background-color: var(--primary-color);
    color: white;
}

.timeline-badge.internship {
    background-color: var(--accent-color);
    color: white;
}

.timeline-badge.education {
    background-color: var(--text-secondary);
    color: white;
}

.timeline-content {
    padding: var(--spacing-lg);
    background-color: var(--bg-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary-color);
    transition: all var(--transition-base);
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
}

.timeline-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.timeline-subtitle {
    font-size: 1.125rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.timeline-period {
    font-size: 0.9375rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

.timeline-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==============================================
   Resume Section - FIXED FOR DARK THEME
   ============================================== */
.resume-section {
    padding: var(--spacing-2xl) var(--spacing-md);
    background-color: var(--bg-primary);
}

.resume-content {
    max-width: 1000px;
    margin: 0 auto;
}

.resume-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--spacing-xl);
}

.resume-intro p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.resume-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Resume Viewer */
.resume-viewer {
    margin-top: var(--spacing-2xl);
    background-color: var(--bg-secondary);
    border-radius: 16px;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
}

.resume-viewer-header {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.resume-viewer-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.resume-note {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    background-color: var(--bg-tertiary);
    padding: var(--spacing-md);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.resume-embed-container {
    position: relative;
    margin-top: var(--spacing-md);
    background-color: var(--bg-primary);
    border-radius: 8px;
    overflow: hidden;
}

.resume-embed-container embed {
    display: block;
    width: 100%;
    min-height: 800px;
    border: none;
}

.resume-fallback {
    display: none;
    padding: var(--spacing-2xl);
    text-align: center;
}

.fallback-content {
    max-width: 500px;
    margin: 0 auto;
}

.fallback-content svg {
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

.fallback-content h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.fallback-content p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

/* Resume Overview */
.resume-overview {
    margin-top: var(--spacing-2xl);
    padding: var(--spacing-xl);
    background-color: var(--bg-secondary);
    border-radius: 16px;
}

.overview-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--spacing-lg);
}

.overview-item {
    padding: var(--spacing-md);
    background-color: var(--bg-primary);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.overview-item h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.overview-item p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.overview-item p:last-child {
    margin-bottom: 0;
}

/* ==============================================
   Testimonials Section - FIXED FOR DARK THEME
   ============================================== */
.testimonials-section {
    padding: var(--spacing-2xl) var(--spacing-md);
    background-color: var(--bg-secondary);
}

.testimonials-content {
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-placeholder {
    text-align: center;
    padding: var(--spacing-2xl);
    background-color: var(--bg-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.testimonial-placeholder svg {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.testimonial-placeholder h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.testimonial-placeholder p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
}

/* ==============================================
   Contact Section - FIXED FOR DARK THEME
   ============================================== */
.contact-section {
    padding: var(--spacing-2xl) var(--spacing-md);
    background-color: var(--bg-primary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--spacing-2xl);
    max-width: 1100px;
    margin: 0 auto;
}

.contact-info h3 {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.contact-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--spacing-xl);
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.contact-method {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background-color: var(--bg-secondary);
    border-radius: 12px;
    transition: all var(--transition-base);
}

.contact-method:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.method-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-light);
    border-radius: 50%;
    color: white;
    flex-shrink: 0;
}

.method-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.method-content a {
    color: var(--primary-color);
    font-size: 1rem;
}

.method-content a:hover {
    text-decoration: underline;
}

/* Contact Form */
.contact-form-wrapper {
    padding: var(--spacing-xl);
    background-color: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.form-group input,
.form-group textarea {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-primary);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: all var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ==============================================
   Footer - FIXED FOR DARK THEME
   ============================================== */
.footer {
    background-color: var(--bg-dark);
    color: var(--text-secondary);
    padding: var(--spacing-2xl) var(--spacing-md) var(--spacing-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--spacing-2xl);
    max-width: 1200px;
    margin: 0 auto var(--spacing-xl);
}

.footer-main {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.footer-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-tagline {
    font-size: 1rem;
    color: var(--text-secondary);
}

.footer-social {
    display: flex;
    gap: var(--spacing-md);
}

.footer-social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.footer-social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
}

.footer-column h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

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

.footer-column a {
    color: var(--text-secondary);
    transition: color var(--transition-base);
}

.footer-column a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-light);
    font-size: 0.9375rem;
}

.footer-credit {
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

/* ==============================================
   Scroll Animations
   ============================================== */
[data-animate="left"] {
    transform: translateX(-50px);
}

[data-animate="right"] {
    transform: translateX(50px);
}

[data-animate="left"].visible,
[data-animate="right"].visible {
    transform: translateX(0);
}

/* ==============================================
   Responsive Design
   ============================================== */
@media (max-width: 1024px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 400px;
        height: 100vh;
        background-color: var(--bg-primary);
        flex-direction: column;
        align-items: flex-start;
        padding: calc(80px + var(--spacing-lg)) var(--spacing-lg) var(--spacing-lg);
        box-shadow: var(--shadow-xl);
        transition: right var(--transition-base);
        gap: var(--spacing-md);
        z-index: 999;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translateY(10px);
    }

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

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translateY(-10px);
    }

    .theme-toggle {
        margin-left: auto;
        margin-right: var(--spacing-md);
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        order: -1;
    }

    .profile-photo-wrapper {
        width: 250px;
        height: 250px;
    }

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

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

    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .career-timeline::before {
        left: 30px;
    }

    .timeline-node {
        grid-template-columns: 80px 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .profile-photo-wrapper {
        width: 200px;
        height: 200px;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-stats {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .highlights-grid {
        grid-template-columns: 1fr;
    }

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

    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .experience-item {
        grid-template-columns: 50px 1fr;
        gap: var(--spacing-md);
    }

    .experience-icon {
        width: 50px;
        height: 50px;
    }

    .career-timeline::before {
        left: 25px;
    }

    .timeline-node {
        grid-template-columns: 70px 1fr;
        gap: var(--spacing-md);
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-xs: 0.375rem;
        --spacing-sm: 0.75rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
        --spacing-2xl: 3rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .profile-photo-wrapper {
        width: 180px;
        height: 180px;
    }

    .resume-buttons {
        flex-direction: column;
        width: 100%;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* ==================================================================
   2026 REFRESH - typography, cards, project accordions
   Appended override layer. Nothing above this line was deleted.

   PALETTE RULE: exactly one accent colour per theme.
   Light  = the original beige/brown (#8b7355) on the original beige page.
   Dark   = the original indigo (#818cf8) on the original slate page.
   secondary-color and accent-color are aliased to primary so nothing
   anywhere on the page can introduce a second hue.
   ================================================================== */

:root {
    /* Original light palette, unchanged from the header/navbar */
    --primary-color: #8b7355;
    --primary-dark: #6b5744;
    --primary-light: #a89080;
    --secondary-color: #8b7355;
    --accent-color: #8b7355;

    --text-primary: #3e2723;
    --text-secondary: #5d4037;
    --text-light: #795548;

    --bg-primary: #f5f0e8;
    --bg-secondary: #efe8dc;
    --bg-tertiary: #e8dfd0;
    --bg-dark: #d7cec0;
    --border-color: #d4c4b0;

    --shadow-sm: 0 1px 2px rgba(62, 39, 35, 0.05);
    --shadow-md: 0 2px 8px rgba(62, 39, 35, 0.07);
    --shadow-lg: 0 8px 24px rgba(62, 39, 35, 0.10);
    --shadow-xl: 0 18px 44px rgba(62, 39, 35, 0.13);

    --radius: 14px;
    --radius-sm: 10px;
    --measure: 66ch;

    --on-accent: #ffffff;
}

[data-theme="dark"] {
    /* Original dark palette, one accent only */
    --primary-color: #818cf8;
    --primary-dark: #6366f1;
    --primary-light: #a5b4fc;
    --secondary-color: #818cf8;
    --accent-color: #818cf8;

    --text-primary: #f3f4f6;
    --text-secondary: #e5e7eb;
    --text-light: #d1d5db;

    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-dark: #020617;
    --border-color: #475569;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 10px 28px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.7);

    --on-accent: #0f172a;
}

/* ---------- No horizontal scrolling, ever ---------- */
html,
body {
    overflow-x: clip;
    max-width: 100%;
}

*,
*::before,
*::after {
    min-width: 0;
}

img,
embed,
iframe,
table,
pre {
    max-width: 100%;
}

/* NOTE: do NOT put max-width:100% on .container / .hero-container here.
   It overrides their 1200px centring and throws the hero to the left edge. */

.project-title,
.experience-title,
.highlight-title,
.achievement-title,
.timeline-title,
.section-title,
.hero-title,
.project-description,
.flow-step p {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
}

body {
    font-feature-settings: "kern" 1, "liga" 1;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.003em;
}

/* ---------- Section headings: keep the original centred treatment ---------- */
.section-kicker {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 0.4rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.section-lede {
    max-width: var(--measure);
    margin: calc(var(--spacing-lg) * -0.5) auto var(--spacing-xl);
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.7;
}

/* ---------- Hero ---------- */
.hero-kicker {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-light);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 50px;
    padding: 0.3rem 0.9rem;
    margin-bottom: 1.1rem;
}

.hero-title {
    letter-spacing: -0.02em;
    line-height: 1.14;
}

.hero-subtitle {
    letter-spacing: -0.02em;
    font-weight: 600;
}

.hero-subtitle .sub-sep { color: var(--primary-light); font-weight: 400; }

.hero-description {
    max-width: 58ch;
    line-height: 1.72;
    color: var(--text-secondary);
}

.hero-description-2 {
    font-size: 0.98em;
    color: var(--text-light);
    margin-top: -0.4rem;
}

/* ---------- Cards, generally ---------- */
.stat-item,
.highlight-card,
.achievement-card,
.timeline-content,
.overview-item,
.project-card {
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.stat-item:hover,
.highlight-card:hover,
.achievement-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: 2.2rem;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    letter-spacing: 0.01em;
}

.about-intro, .about-text p {
    max-width: var(--measure);
    line-height: 1.78;
}

.highlight-title, .achievement-title {
    letter-spacing: -0.015em;
    line-height: 1.3;
}

.highlight-description, .achievement-description {
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ---------- Skill tags ---------- */
.skill-tag {
    padding: 0.45rem 0.9rem;
    border-width: 1px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--bg-primary);
}

.skill-tag:hover { transform: none; }

.category-title {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: var(--text-light);
}

.proficiency-note {
    margin-top: var(--spacing-md);
    font-size: 0.9375rem;
    color: var(--text-light);
    font-style: italic;
    max-width: var(--measure);
}

/* ---------- Experience ---------- */
.exp-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    margin-bottom: 0.6rem;
    background: var(--primary-color);
    color: var(--on-accent);
}

.experience-title { letter-spacing: -0.015em; line-height: 1.35; }
.experience-highlights li { line-height: 1.68; }

/* ---------- Projects: list + accordion ---------- */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.project-card {
    padding: 0;
    background-color: var(--bg-primary);
    overflow: hidden;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.project-card:hover {
    transform: none;
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

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

.project-card.is-open {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.project-card-top { padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-md); }

.project-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.project-badge {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* One hue, three weights: filled, outlined, muted */
.project-badge.flagship,
.project-badge.research {
    background: var(--primary-color);
    color: var(--on-accent);
    border-color: var(--primary-color);
}

.project-badge.inprogress {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-style: dashed;
}

.project-badge.earlier {
    background: transparent;
    color: var(--text-light);
    border-color: var(--border-color);
}

.project-course {
    font-size: 0.8125rem;
    color: var(--text-light);
    font-family: var(--font-mono);
    letter-spacing: -0.01em;
}

.project-title {
    font-size: clamp(1.15rem, 2.1vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.022em;
    line-height: 1.28;
    color: var(--text-primary);
    margin-bottom: 0.7rem;
}

/* Every project title is the same size, old work included */
.project-card.compact .project-title { font-size: clamp(1.15rem, 2.1vw, 1.5rem); }

.project-description {
    max-width: var(--measure);
    line-height: 1.72;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: var(--spacing-md);
}

.tech-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Toggle button */
.project-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.95rem 0.5rem 1rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--primary-color);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-base);
}

.project-toggle:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--on-accent);
}

.project-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

.toggle-chevron { transition: transform var(--transition-base); }
.project-toggle[aria-expanded="true"] .toggle-chevron { transform: rotate(180deg); }

/* Detail panel */
.project-detail {
    overflow: hidden;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.project-detail[hidden] { display: none; }

.detail-inner {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.flow-step {
    padding-left: var(--spacing-md);
    border-left: 2px solid var(--border-color);
}

.flow-step.outcome { border-left-color: var(--primary-color); }
.flow-step.honest  { border-left-color: var(--primary-color); border-left-style: dashed; }

.flow-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-light);
    margin-bottom: 0.35rem;
}

.flow-step.outcome .flow-label,
.flow-step.honest  .flow-label { color: var(--primary-color); }

.flow-step p {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: var(--text-secondary);
    max-width: var(--measure);
}

.flow-step em { color: var(--text-primary); font-style: italic; }

/* ---------- Timeline / resume / contact tweaks ---------- */
.timeline-title { letter-spacing: -0.015em; }
.timeline-description { line-height: 1.7; }
.timeline-badge, .overview-item h4 { letter-spacing: 0.06em; }

.contact-description { max-width: var(--measure); line-height: 1.72; }

.footer-tagline { color: var(--text-light); letter-spacing: 0.01em; }
.footer-credit { font-family: var(--font-mono); font-size: 0.8125rem; }

/* ---------- Buttons: keep the original pill shape ---------- */
.btn {
    letter-spacing: 0.005em;
    font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .project-card-top { padding: var(--spacing-md); }
    .detail-inner { padding: var(--spacing-md); }
    .project-card.featured { border-left-width: 3px; }
    .about-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Timeline badges: one hue, filled vs outlined ---------- */
.timeline-badge {
    border: 1px solid var(--primary-color);
    font-size: 0.6875rem;
    padding: 0.25rem 0.7rem;
}

.timeline-badge.current,
.timeline-badge.work {
    background-color: var(--primary-color);
    color: var(--on-accent);
}

.timeline-badge.internship,
.timeline-badge.education {
    background-color: transparent;
    color: var(--primary-color);
}

/* Accent-filled surfaces should use the readable on-accent colour */
.btn-primary,
.timeline-badge.current,
.timeline-badge.work,
.exp-badge,
.project-badge.flagship,
.project-badge.research {
    color: var(--on-accent);
}

.skill-tag:hover {
    background-color: var(--primary-color);
    color: var(--on-accent);
    border-color: var(--primary-color);
}

/* ---------- Hero name: same hue, light-to-dark, no second colour ---------- */
.hero-title .highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.scroll-progress {
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
    box-shadow: none;
}

/* ==================================================================
   Skill chips: clickable, they open the Wikipedia page in a new tab
   ================================================================== */
.skill-tags {
    gap: 0.55rem;
}

a.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    transition: color .22s ease, border-color .22s ease,
                transform .22s ease, box-shadow .22s ease;
}

/* accent wipe that fills in from the left on hover */
a.skill-tag::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .26s cubic-bezier(.4, 0, .2, 1);
}

a.skill-tag:hover,
a.skill-tag:focus-visible {
    color: var(--on-accent);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

a.skill-tag:hover::before,
a.skill-tag:focus-visible::before {
    transform: scaleX(1);
}

a.skill-tag:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

a.skill-tag:active {
    transform: translateY(0);
}

/* the little outbound arrow only shows on hover */
.tag-arrow {
    opacity: 0;
    transform: translate(-3px, 3px);
    transition: opacity .22s ease, transform .22s ease;
    flex-shrink: 0;
    margin-right: -0.1rem;
}

a.skill-tag:hover .tag-arrow,
a.skill-tag:focus-visible .tag-arrow {
    opacity: 1;
    transform: translate(0, 0);
}

@media (prefers-reduced-motion: reduce) {
    a.skill-tag,
    a.skill-tag::before,
    .tag-arrow {
        transition: none;
    }
    a.skill-tag:hover { transform: none; }
}

/* ---------- Bigger skill chips ---------- */
.skill-tags {
    gap: 0.7rem;
}

a.skill-tag {
    padding: 0.85rem 1.4rem;
    font-size: 1.0625rem;
    font-weight: 600;
    gap: 0.45rem;
    border-width: 1.5px;
}

.tag-arrow {
    width: 14px;
    height: 14px;
}

.category-title {
    font-size: 0.875rem;
    margin-bottom: var(--spacing-sm);
}

@media (max-width: 600px) {
    a.skill-tag {
        padding: 0.7rem 1.1rem;
        font-size: 0.9375rem;
    }
}
