/* ==========================================
   DESIGN SYSTEM & VARIABLES
   ========================================== */
:root {
    /* Color Palette */
    --bg-primary: #0b0f19;
    --bg-secondary: #131a2c;
    --bg-tertiary: #1b243c;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #7f8fa6;
    
    --accent-blue: #3b82f6;
    --accent-indigo: #6366f1;
    --accent-purple: #a855f7;
    
    --gradient-accent: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-indigo) 50%, var(--accent-purple) 100%);
    --gradient-surface: linear-gradient(180deg, rgba(19, 26, 44, 0.4) 0%, rgba(27, 36, 60, 0.4) 100%);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --glass-bg: rgba(11, 15, 25, 0.7);
    
    /* Layout & Spacing */
    --max-width: 1200px;
    --header-height: 80px;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Shadows */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.15);
}

/* Light Theme Overrides */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #5f6f85;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    --glass-bg: rgba(248, 250, 252, 0.85);
    --gradient-surface: linear-gradient(180deg, rgba(241, 245, 249, 0.6) 0%, rgba(226, 232, 240, 0.6) 100%);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.12);
}

[data-theme="light"] .glow-bg-1,
[data-theme="light"] .glow-bg-2 {
    opacity: 0.06;
}

[data-theme="light"] .project-img-placeholder {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

[data-theme="light"] .project-placeholder-icon {
    opacity: 0.3;
}

/* ==========================================
   BASE STYLES & RESET
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

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

li {
    list-style: none;
}

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

input, textarea, button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

:where(a, button, input, textarea, [tabindex]):focus-visible {
    outline: 3px solid var(--accent-blue);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 10000;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    background: var(--text-primary);
    color: var(--bg-primary);
    font-weight: 700;
    transform: translateY(calc(-100% - 2rem));
    transition: transform var(--transition-fast);
}

.skip-link:focus {
    transform: translateY(0);
}

#main-content:focus {
    outline: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================
   AMBIENT GLOW BACKGROUNDS
   ========================================== */
.glow-bg-1, .glow-bg-2 {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    opacity: 0.12;
    pointer-events: none;
}

.glow-bg-1 {
    background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
    top: -100px;
    right: -100px;
}

.glow-bg-2 {
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
    top: 50%;
    left: -200px;
}

/* ==========================================
   REUSABLE UTILITIES
   ========================================== */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
}

.gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.badge {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-indigo);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.inline-link {
    color: var(--accent-indigo);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dashed rgba(99, 102, 241, 0.4);
    transition: var(--transition-fast);
}

.inline-link:hover {
    border-bottom-color: var(--accent-indigo);
    border-bottom-style: solid;
}


/* Icon colors */
.text-orange { color: #f97316; }
.text-blue { color: #3b82f6; }
.text-yellow { color: #eab308; }
.text-cyan { color: #06b6d4; }
.text-purple { color: #a855f7; }
.text-green { color: #22c55e; }
.text-light-green { color: #10b981; }
.text-yellow-blue { color: #3b82f6; }
.text-red { color: #ef4444; }

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-indigo) 50%, var(--accent-blue) 100%);
    opacity: 0;
    transition: var(--transition-normal);
    z-index: -1;
}

.btn-primary:hover::before {
    opacity: 1;
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn:disabled {
    cursor: wait;
    opacity: 0.7;
    transform: none;
}

/* ==========================================
   HEADER / NAVIGATION
   ========================================== */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition-normal);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    height: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: auto;
    transition: var(--transition-fast);
}

.logo:hover {
    transform: scale(1.02);
}

.logo-accent {
    color: var(--accent-indigo);
    font-weight: 700;
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
}

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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    cursor: pointer;
}

.nav-toggle span {
    width: 28px;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition-normal);
}

/* Header state when scrolled */
#main-header.scrolled {
    height: 70px;
    box-shadow: var(--shadow-md);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--header-height);
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    max-width: 650px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 550px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-image-container {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 6px solid var(--bg-secondary);
    outline: 2px solid var(--accent-indigo);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: var(--transition-normal);
}

.profile-image-container:hover {
    outline-color: var(--accent-purple);
    transform: translateY(-5px);
}


.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    border: 3px solid transparent;
    transition: var(--transition-normal);
}


.code-overlay-icon {
    font-size: 6rem;
    color: rgba(255, 255, 255, 0.9);
}

.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--text-muted);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: var(--text-secondary);
    border-radius: 2px;
    animation: scroll-wheel 1.6s ease-in-out infinite;
}

/* ==========================================
   ABOUT SECTION
   ========================================== */
.about-section {
    padding: 8rem 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
}

.about-info h3, .about-skills h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.about-info p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 1.5rem 1rem;
    border-radius: var(--border-radius-md);
    text-align: center;
    transition: var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.04);
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-indigo);
    margin-bottom: 0.2rem;
}

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

.skill-category {
    margin-bottom: 2rem;
}

.skill-category h4 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tag {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.6rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: var(--transition-fast);
}

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

/* ==========================================
   HIGHLIGHTS SECTION
   ========================================== */
.highlights-section {
    padding: 8rem 0;
}

.highlights-list {
    max-width: 920px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.highlight-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1.5rem;
    align-items: start;
    padding: 1.4rem;
    background: var(--gradient-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    transition: var(--transition-normal);
}

.highlight-item:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.highlight-date {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.highlight-date strong {
    width: fit-content;
    color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.72rem;
}

.highlight-content h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.highlight-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0.85rem;
}

.highlight-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent-indigo);
    font-size: 0.9rem;
    font-weight: 600;
}

.highlight-link:hover {
    color: var(--accent-purple);
}

/* ==========================================
   PROJECTS SECTION
   ========================================== */
.projects-section {
    padding: 8rem 0;
}

.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.5rem 1.2rem;
    border-radius: 100px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    transition: var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
    color: var(--text-primary);
    border-color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.08);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.project-card {
    background: var(--gradient-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: var(--transition-normal);
    position: relative;
}

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

.project-image {
    position: relative;
    height: 240px;
    background-color: var(--bg-tertiary);
    overflow: hidden;
}

.project-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #131a2c 0%, #1e293b 100%);
    transition: var(--transition-normal);
}

.project-card:hover .project-img-placeholder {
    transform: scale(1.05);
}

.project-placeholder-icon {
    font-size: 4rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.45;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition-normal);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-card:focus-within .project-overlay {
    opacity: 1;
}

.project-links {
    display: flex;
    gap: 1.5rem;
}

.project-link-icon {
    width: 50px;
    height: 50px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    transition: var(--transition-fast);
}

.project-link-icon:hover {
    transform: scale(1.1);
    background: var(--accent-indigo);
    color: white;
}

.project-details {
    padding: 2rem;
}

.project-tag {
    color: var(--accent-indigo);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.project-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.project-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

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

.project-tech span {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ==========================================
   EXPERIENCE SECTION
   ========================================== */
.experience-section {
    padding: 8rem 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

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

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--border-color);
    top: 0;
    bottom: 0;
    left: 120px;
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 2.5rem;
}

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

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--accent-indigo);
    left: 113px;
    top: 5px;
    z-index: 2;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
    transition: var(--transition-fast);
}

.timeline-item:hover .timeline-dot {
    background-color: var(--accent-purple);
    box-shadow: 0 0 0 6px rgba(168, 85, 247, 0.3);
}

.timeline-date {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    text-align: right;
    padding-top: 3px;
}

.timeline-content {
    background: var(--gradient-surface);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: var(--border-radius-md);
    transition: var(--transition-normal);
}

.timeline-item:hover .timeline-content {
    border-color: var(--border-hover);
    transform: translateX(5px);
}

.timeline-content h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.timeline-content .company {
    color: var(--accent-indigo);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.timeline-advisor {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.timeline-advisor > i {
    color: var(--accent-indigo);
}

.timeline-advisor-label {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.timeline-advisor a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-primary);
    font-weight: 600;
}

.timeline-advisor a i {
    color: var(--accent-indigo);
    font-size: 0.7rem;
    transition: var(--transition-fast);
}

.timeline-advisor a:hover {
    color: var(--accent-blue);
}

.timeline-advisor a:hover i {
    transform: translate(2px, -2px);
}

.phd-card {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(99, 102, 241, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--accent-indigo);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-normal);
}

.timeline-item:hover .phd-card {
    background: rgba(99, 102, 241, 0.06);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: var(--shadow-glow);
}

.phd-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.phd-badge-role {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.phd-badge-role.candidate {
    background: rgba(99, 102, 241, 0.1);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.phd-badge-role.scientist {
    background: rgba(59, 130, 246, 0.1);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.phd-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.25rem !important;
}

.phd-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.phd-meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.phd-meta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    color: var(--accent-indigo);
    font-size: 1rem;
}

.phd-meta-text {
    display: flex;
    flex-direction: column;
}

.phd-meta-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.phd-meta-val {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.phd-meta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: fit-content;
}

.phd-supervisor-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.phd-meta-link i {
    color: var(--accent-indigo);
    font-size: 0.7rem;
    transition: var(--transition-fast);
}

.phd-meta-link:hover {
    color: var(--accent-blue);
}

.phd-meta-link:hover i {
    transform: translate(2px, -2px);
}

.phd-meta-val.highlight {
    color: #fbbf24;
}

.phd-meta-val .scale {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

.phd-topics {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.phd-topics-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.phd-topics-title i {
    color: #fbbf24;
}

.phd-topics-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.phd-topic-tag {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-fast);
}

.phd-topic-tag:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--text-primary);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Light Theme overrides for PhD Card */
[data-theme="light"] .phd-card {
    background: rgba(99, 102, 241, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-left: 4px solid var(--accent-indigo);
}

[data-theme="light"] .phd-badge-role.candidate {
    background: rgba(99, 102, 241, 0.08);
    color: #4f46e5;
    border-color: rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .phd-badge-role.scientist {
    background: rgba(59, 130, 246, 0.08);
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.15);
}

[data-theme="light"] .phd-meta-grid {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .phd-meta-icon {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .phd-meta-val.highlight {
    color: #d97706;
}

[data-theme="light"] .phd-topic-tag {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .phd-topic-tag:hover {
    background: rgba(99, 102, 241, 0.05);
    color: var(--accent-indigo);
    border-color: rgba(99, 102, 241, 0.2);
}

@media (max-width: 576px) {
    .phd-meta-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}


/* ==========================================
   CONTACT SECTION
   ========================================== */
.contact-section {
    padding: 8rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.contact-icon-wrapper {
    width: 55px;
    height: 55px;
    background: var(--gradient-surface);
    border: 1px solid var(--border-color);
    color: var(--accent-indigo);
    border-radius: var(--border-radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
}

.contact-method-details span:first-child {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.contact-method-details a, .contact-method-details span:last-child {
    font-weight: 600;
    font-size: 1.05rem;
}

.contact-method-details a:hover {
    color: var(--accent-indigo);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    transition: var(--transition-fast);
}

.social-links a:hover {
    transform: translateY(-3px);
    border-color: var(--accent-indigo);
    color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.05);
}

.contact-form-wrapper {
    background: var(--gradient-surface);
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: var(--border-radius-lg);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

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

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.form-group input, .form-group textarea {
    background: rgba(11, 15, 25, 0.5);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent-indigo);
    box-shadow: 0 0 0 1px var(--accent-indigo);
    background: rgba(11, 15, 25, 0.8);
}

.form-status {
    min-height: 1.5rem;
    margin-top: -0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.form-status[data-state="success"] {
    color: #22c55e;
}

.form-status[data-state="error"] {
    color: #ef4444;
}

/* ==========================================
   PUBLICATIONS SECTION
   ========================================== */
.publications-section {
    padding: 8rem 0;
}

.pub-year-group {
    margin-bottom: 3rem;
}

.pub-year-group:last-child {
    margin-bottom: 0;
}

.pub-year-label {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.pub-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.pub-card {
    background: var(--gradient-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    transition: var(--transition-normal);
    position: relative;
}

.pub-card:hover {
    border-color: var(--border-hover);
    transform: translateX(6px);
    box-shadow: var(--shadow-sm);
}

.pub-status {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    width: fit-content;
}

.status-published {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.status-accepted {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.status-review {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.25);
}

[data-theme="light"] .status-published {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

[data-theme="light"] .status-accepted {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

[data-theme="light"] .status-review {
    background: #fef9c3;
    color: #854d0e;
    border-color: #fde047;
}

.pub-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.pub-venue {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pub-venue i {
    color: var(--accent-indigo);
    font-size: 0.8rem;
    flex: 0 0 auto;
}

.pub-authors {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.pub-authors strong {
    color: var(--text-primary);
    font-weight: 600;
}

.pub-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.4rem;
}

.pub-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer;
}

.pub-link-btn:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--accent-indigo);
}

.pub-link-btn.copy-success {
    color: #22c55e;
    border-color: #22c55e;
}

.pub-link-btn.copy-error {
    color: #ef4444;
    border-color: #ef4444;
}

[data-theme="light"] .pub-link-btn {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .pub-link-btn:hover {
    background: rgba(99, 102, 241, 0.05);
    color: var(--accent-indigo);
    border-color: var(--accent-indigo);
}

@media (max-width: 768px) {
    .pub-card {
        padding: 1.2rem 1.5rem;
    }
    .pub-title {
        font-size: 1rem;
    }
}

.form-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* ==========================================
   VISITOR MAP SECTION
   ========================================== */
.visitor-section {
    padding: 5rem 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.visitor-map-widget {
    width: min(100%, 632px);
    min-height: 291px;
    margin: 0 auto;
    padding: 1rem;
    overflow: hidden;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
}

.visitor-map-link {
    display: block;
    width: 100%;
}

.visitor-map-widget img {
    display: block;
    width: 100%;
    max-width: 600px;
    height: auto;
    margin: 0 auto;
}

.visitor-privacy {
    margin: 1.25rem auto 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-align: center;
}

.visitor-privacy a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ==========================================
   FOOTER
   ========================================== */
footer {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes blob-bounce {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 40% 60% 70% 30% / 50% 60% 30% 70%;
    }
}

@keyframes scroll-wheel {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(12px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Class-based trigger animations (Simple CSS loaded transitions) */
.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.animate-fade-in-delayed {
    opacity: 0;
    animation: fadeIn 1s ease-out 0.6s forwards;
}

.animate-slide-up {
    animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-up-delayed {
    opacity: 0;
    animation: slideUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.animate-scale-up {
    opacity: 0;
    animation: scaleUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes scaleUp {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ==========================================
   RESPONSIVE MEDIA QUERIES
   ========================================== */
@media (max-width: 1024px) {
    :root {
        --header-height: 70px;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-description {
        max-width: 600px;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .profile-image-container {
        width: 260px;
        height: 260px;
    }
    
    .code-overlay-icon {
        font-size: 5rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .highlight-item {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .highlight-date {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-info {
        text-align: center;
    }
    
    .contact-methods {
        align-items: center;
    }
    
    .social-links {
        justify-content: center;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: min(80%, 360px);
        height: calc(100vh - var(--header-height));
        overflow-y: auto;
        background-color: var(--bg-secondary);
        border-left: 1px solid var(--border-color);
        padding: 3rem 2rem;
        transition: var(--transition-normal);
        visibility: hidden;
        pointer-events: none;
        z-index: 999;
    }

    .nav-menu.open {
        right: 0;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-list {
        flex-direction: column;
        gap: 2.5rem;
    }

    .nav-link {
        font-size: 1.2rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.open span:first-child {
        transform: rotate(45deg) translate(6px, 6px);
    }

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

    .nav-toggle.open span:last-child {
        transform: rotate(-45deg) translate(5px, -6px);
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .timeline::after {
        left: 20px;
    }
    
    .timeline-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .timeline-dot {
        left: 13px;
    }
    
    .timeline-date {
        text-align: left;
        padding-left: 45px;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .visitor-map-widget {
        min-height: auto;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .contact-form-wrapper {
        padding: 2rem 1.5rem;
    }

    .visitor-section {
        padding: 4rem 0;
    }
}



/* ==========================================
   THEME TOGGLE
   ========================================== */
.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.theme-toggle:hover {
    color: var(--accent-indigo);
    border-color: var(--accent-indigo);
    transform: rotate(20deg);
}

/* ==========================================
   TYPED CURSOR BLINK
   ========================================== */
.typed-cursor {
    font-weight: 300;
    color: var(--accent-indigo);
    animation: blink-cursor 0.75s step-end infinite;
}

@keyframes blink-cursor {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

/* ==========================================
   SCROLL REVEAL ANIMATIONS
   ========================================== */
.reveal {
    opacity: 1;
    transform: none;
}

.js .reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ==========================================
   PROJECT DETAIL MODAL
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 5000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    padding: 2rem;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    max-width: 600px;
    width: 100%;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.modal-overlay.open .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: #ef4444;
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.modal-tag {
    color: var(--accent-indigo);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: inline-block;
    margin-bottom: 0.8rem;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

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

.modal-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.modal-tech span {
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent-indigo);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 0.35rem 0.9rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

.modal-actions .btn i {
    margin-right: 0.5rem;
}

@media (max-width: 768px) {
    .modal-content {
        padding: 2rem 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
