/* ========================================
   CSS VARIABLES (Tailwind-compatible Slate colors)
   ======================================== */
:root {
    /* Slate color palette - matching reference design exactly */
    --bg-color: #f8fafc;              /* slate-50 - same as reference */
    --bg-light: #ffffff;
    --text-color: #0f172a;            /* slate-900 - primary text */
    --text-secondary: #475569;        /* slate-600 - secondary text */
    --text-light: #64748b;            /* slate-500 - lighter text */
    --text-muted: #94a3b8;            /* slate-400 - muted text */
    
    /* Brand colors - Tailwind blue */
    --brand-color: #2563eb;
    --brand-color-hover: #1d4ed8;
    --brand-color-light: #3b82f6;
    
    --primary-color: #2563eb;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    
    /* Borders & Shadows */
    --border-color: #e2e8f0;          /* slate-200 */
    --border-color-light: #f1f5f9;    /* slate-100 */
    --shadow-soft: 0 10px 30px rgba(2, 6, 23, 0.06);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Radius */
    --rounded-2xl: 1rem;
    --border-radius: 0.5rem;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --transition-speed: 0.3s;
    
    /* Backdrop blur for navigation */
    --nav-bg: rgba(255, 255, 255, 0.8);
    --nav-border: rgba(226, 232, 240, 0.8);
    --nav-blur: blur(12px);
}

/* Dark mode variables */
:root.dark {
    --bg-color: #0f172a;
    --bg-light: #1e293b;
    --text-color: #f1f5f9;           /* slate-100 - primary text */
    --text-secondary: #cbd5e1;       /* slate-300 - secondary text */
    --text-light: #94a3b8;           /* slate-400 - lighter text */
    --text-muted: #64748b;           /* slate-500 - muted text */
    
    /* Brand colors - lighter for dark mode */
    --brand-color: #3b82f6;
    --brand-color-hover: #60a5fa;
    --brand-color-light: #60a5fa;
    
    --primary-color: #3b82f6;
    --secondary-color: #a78bfa;
    --accent-color: #22d3ee;
    
    /* Borders & Shadows */
    --border-color: #334155;
    --border-color-light: #1e293b;
    --shadow-soft: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.4);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.6), 0 4px 6px -4px rgb(0 0 0 / 0.6);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.7), 0 8px 10px -6px rgb(0 0 0 / 0.7);
    
    /* Dark backdrop blur */
    --nav-bg: rgba(15, 23, 42, 0.8);
    --nav-border: rgba(51, 65, 85, 0.8);
    --nav-blur: blur(12px);
}

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

html {
    scroll-behavior: smooth;
}

/* Section offset for sticky nav */
.tab-content {
    scroll-margin-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* ========================================
   UTILITY CLASSES
   ======================================== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--border-color);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
    margin: var(--spacing-md) auto;
}

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

/* ========================================
   NAVIGATION
   ======================================== */
nav {
    background: var(--nav-bg);
    -webkit-backdrop-filter: var(--nav-blur);
    backdrop-filter: var(--nav-blur);
    box-shadow: var(--shadow-soft);
    border-bottom: 1px solid var(--nav-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo-dot {
    color: var(--brand-color);
    font-weight: 700;
}

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

nav ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color var(--transition-speed);
    padding: var(--spacing-xs);
    position: relative;
}

nav a:hover {
    color: var(--brand-color);
}

/* Active nav link styling */
nav a.active {
    color: var(--brand-color);
    font-weight: 700;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--brand-color);
    border-radius: 2px;
}

/* Resume link in nav - special styling */
#nav-resume a {
    background: var(--secondary-color);
    color: var(--bg-white);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    transition: background var(--transition-speed), transform var(--transition-speed);
}

#nav-resume a:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    transform: translateY(-2px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

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

.theme-icon {
    transition: transform 0.3s ease;
}

:root.dark .theme-icon::before {
    content: '☀️';
}

:root:not(.dark) .theme-icon::before {
    content: '🌙';
}

.theme-icon {
    font-size: 1.2rem;
}

.theme-icon::before {
    display: block;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    background: transparent;
    color: var(--text-color);
    padding: calc(var(--spacing-xl) * 1.5) 0;
    min-height: 600px;
    display: flex;
    align-items: center;
}

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

.hero-content {
    text-align: left;
}

.hero-subtitle {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    color: #2563eb;
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
}

.hero-tagline {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: var(--spacing-sm);
}

.hero h1 {
    font-size: 3.5rem;
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    font-weight: 700;
    line-height: 1.1;
}

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

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

.hero-companies {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-top: var(--spacing-md);
}

.hero-visual {
    position: relative;
}

.hero-image-container {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hero-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-image-gradient {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.3) 0%, rgba(15, 23, 42, 0.6) 100%);
    position: relative;
    z-index: 1;
}

.hero-image-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.3) 0%, transparent 60%),
                radial-gradient(circle at 70% 70%, rgba(139, 92, 246, 0.2) 0%, transparent 50%);
}

.hero-badge {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    padding: 0.75rem 1.25rem;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
    z-index: 2;
}

.badge-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.badge-text {
    white-space: nowrap;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-speed);
    display: inline-block;
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 1rem;
}

.btn-primary {
    background: var(--brand-color);
    color: #ffffff;
    border-color: var(--brand-color);
}

.btn-primary:hover {
    background: var(--brand-color-hover);
    border-color: var(--brand-color-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
}

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

.btn-secondary:hover {
    background: var(--brand-color);
    color: #ffffff;
    border-color: var(--brand-color);
    transform: translateY(-2px);
}

/* ========================================
   SECTIONS
   ======================================== */
section {
    padding: var(--spacing-xl) 0;
}

section:nth-child(even) {
    background: var(--bg-light);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    font-size: 1.1rem;
}

/* ========================================
   HOME PAGE SECTIONS
   ======================================== */

/* Introduction Content */
.intro-content {
    max-width: 900px;
    margin: 0 auto var(--spacing-xl);
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: center;
}

.intro-content p {
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 3rem;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

.stat-card {
    text-align: left;
    padding: 1.25rem;
    background: var(--bg-light);
    border-radius: var(--rounded-2xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    position: relative;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-color);
}

.stat-arrow {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-size: 1.25rem;
    color: var(--text-muted);
    opacity: 0;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-arrow {
    opacity: 1;
    color: var(--brand-color);
    transform: translateX(4px);
}

.stat-number {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 400;
    line-height: 1.4;
}

/* Highlights Grid */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-md);
}

.highlight-card {
    padding: 0;
    background: var(--bg-light);
    border-radius: var(--rounded-2xl);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.highlight-card:hover {
    transform: translateY(-5px);
    border-color: var(--brand-color);
    box-shadow: var(--shadow-lg);
}

.highlight-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    background: var(--bg-color);
}

.highlight-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.highlight-card:hover .highlight-image {
    transform: scale(1.05);
}

.highlight-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.highlight-card h3 {
    font-size: 1.5rem;
    color: var(--brand-color);
    margin: var(--spacing-md) var(--spacing-lg) var(--spacing-sm) var(--spacing-lg);
}

.highlight-card p {
    line-height: 1.7;
    color: var(--text-light);
    padding: 0 var(--spacing-lg) var(--spacing-lg) var(--spacing-lg);
}

.highlight-arrow {
    position: absolute;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    font-size: 1.5rem;
    color: var(--text-muted);
    opacity: 0;
    transition: all 0.3s ease;
}

.highlight-card:hover .highlight-arrow {
    opacity: 1;
    color: var(--brand-color);
    transform: translateX(4px);
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-xl);
}

.about-content p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
    text-align: center;
}

/* Journey section specific - shorter intro */
#journey-intro {
    max-width: 700px;
    margin-bottom: var(--spacing-xl);
}

#journey-intro p {
    font-size: 1.1rem;
}

/* ========================================
   BLOG SECTION
   ======================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.blog-card {
    background: var(--bg-light);
    border-radius: var(--rounded-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.blog-card-content {
    padding: var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card h3 {
    color: var(--brand-color);
    margin-bottom: var(--spacing-sm);
    font-size: 1.3rem;
    line-height: 1.4;
}

.blog-card h3 a {
    color: inherit;
    text-decoration: none;
}

.blog-card h3 a:hover {
    color: var(--brand-color-hover);
}

.blog-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

.blog-excerpt {
    color: var(--text-color);
    margin-bottom: var(--spacing-md);
    flex: 1;
}

.blog-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-link:hover {
    text-decoration: underline;
}

/* ========================================
   PROJECTS SECTION
   ======================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

.project-card {
    background: var(--bg-light);
    border-radius: var(--rounded-2xl);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--brand-color);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: var(--spacing-sm);
}

.project-card h3 {
    color: var(--brand-color);
    font-size: 1.3rem;
    margin-bottom: var(--spacing-xs);
}

.project-card h3 a {
    color: inherit;
    text-decoration: none;
}

.project-card h3 a:hover {
    color: var(--brand-color-hover);
}

.project-stats {
    display: flex;
    gap: var(--spacing-sm);
    font-size: 0.9rem;
    color: var(--text-light);
}

.project-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.project-description {
    color: var(--text-color);
    margin-bottom: var(--spacing-md);
    flex: 1;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.project-language {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.language-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.project-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
}

.project-link:hover {
    text-decoration: underline;
}

/* ========================================
   HIGHLIGHTS SUBSECTIONS
   ======================================== */
.highlights-subsection {
    margin-top: var(--spacing-xl);
    margin-bottom: calc(var(--spacing-xl) * 2);
}

.subsection-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.subsection-icon {
    font-size: 2.5rem;
}

/* ========================================
   RECOGNITIONS SECTION (Patents, Awards, Recognitions)
   ======================================== */
.recognitions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-md);
}

@media (max-width: 1024px) {
    .recognitions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .recognitions-grid {
        grid-template-columns: 1fr;
    }
}

.recognition-card {
    background: var(--bg-light);
    border-radius: var(--rounded-2xl);
    padding: 0;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    overflow: hidden;
}

.recognition-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-color);
}

.recognition-image-container {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    background: var(--bg-color);
}

.recognition-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recognition-card:hover .recognition-image {
    transform: scale(1.05);
}

.recognition-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.recognition-content {
    padding: var(--spacing-lg);
}

.recognition-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xs);
}

.recognition-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-color);
    background: rgba(37, 99, 235, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
}

.recognition-year {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.recognition-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: var(--spacing-xs);
    line-height: 1.3;
}

.recognition-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.recognition-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    display: block;
}

.recognition-card-link:hover {
    text-decoration: none;
}

.recognition-link-indicator {
    display: inline-block;
    margin-top: var(--spacing-sm);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-color);
    transition: transform 0.3s ease;
}

.recognition-card-link:hover .recognition-link-indicator {
    transform: translateX(4px);
}

/* ========================================
   EXPERIENCE TIMELINE
   ======================================== */
.timeline {
    max-width: 900px;
    margin: var(--spacing-xl) auto;
    position: relative;
    padding: var(--spacing-lg) 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--border-color) 0%, var(--primary-color) 50%, var(--border-color) 100%);
    transition: background 0.5s ease;
}

.timeline-item {
    margin-bottom: calc(var(--spacing-xl) * 1.5);
    position: relative;
    opacity: 1;
    transition: all 0.3s ease;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: 0;
    margin-right: 50%;
    padding-right: var(--spacing-lg);
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 50%;
    padding-left: var(--spacing-lg);
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--secondary-color);
    border: 5px solid var(--bg-white);
    border-radius: 50%;
    box-shadow: 0 0 0 5px var(--border-color);
    z-index: 1;
    transition: all 0.4s ease;
    cursor: pointer;
}

.timeline-item:hover .timeline-marker {
    width: 28px;
    height: 28px;
    background: var(--brand-color);
    box-shadow: 0 0 0 7px var(--border-color), 0 0 25px rgba(37, 99, 235, 0.6);
    transform: translateX(-50%) scale(1.1);
}

.timeline-content {
    transition: all 0.3s ease;
    padding: var(--spacing-lg);
    border-radius: var(--rounded-2xl);
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.timeline-item:hover .timeline-content {
    background: var(--bg-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    border-color: var(--brand-color);
}

.timeline-content h3 {
    color: var(--brand-color);
    margin-bottom: var(--spacing-xs);
    font-size: 1.5rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.timeline-item:hover .timeline-content h3 {
    color: var(--secondary-color);
}

.timeline-period {
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.timeline-company {
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.timeline-item:hover .timeline-company {
    color: var(--primary-color);
}

.timeline-content p:last-child {
    margin-bottom: 0;
    line-height: 1.7;
    font-size: 1.05rem;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact-content {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-content > p {
    margin-bottom: var(--spacing-lg);
}

.contact-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-lg);
    text-align: left;
}

/* Honeypot field - hidden from users but visible to bots */
input[name="_gotcha"] {
    position: absolute !important;
    height: 1px !important;
    width: 1px !important;
    overflow: hidden !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
}

/* Contact Form */
.contact-form-section h2,
.contact-links-section h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.contact-form-section {
    background: var(--bg-light);
    padding: var(--spacing-lg);
    border-radius: var(--rounded-2xl);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}

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

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

.form-group label {
    font-weight: 600;
    color: var(--brand-color);
    font-size: 0.95rem;
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand-color);
}

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

#contact-form .btn {
    align-self: flex-start;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.form-status {
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    margin-top: var(--spacing-sm);
    text-align: center;
}

.form-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Contact Links Section */
.contact-links-section {
    display: flex;
    flex-direction: column;
    background: var(--bg-light);
    padding: var(--spacing-lg);
    border-radius: var(--rounded-2xl);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: 0;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all var(--transition-speed);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    background: var(--bg-color);
    border: 1px solid var(--border-color);
}

.contact-link:hover {
    color: var(--brand-color);
    background: var(--bg-light);
    border-color: var(--brand-color);
    transform: translateX(5px);
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    background: var(--primary-color);
    color: var(--bg-white);
    text-align: center;
    padding: var(--spacing-md) 0;
}

footer a {
    color: var(--bg-white);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ========================================
   ERROR & EMPTY STATES
   ======================================== */
.error-message,
.empty-state {
    text-align: center;
    padding: var(--spacing-lg);
    color: var(--text-light);
}

.error-message {
    color: var(--accent-color);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 3rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: var(--spacing-sm);
        box-shadow: var(--shadow-md);
        border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    }

    nav ul.active {
        display: flex;
    }
    
    nav a.active::after {
        display: none;
    }

    .hero {
        min-height: auto;
        padding: var(--spacing-xl) 0;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .hero-content {
        text-align: center;
    }

    .hero-subtitle {
        font-size: 0.65rem;
        letter-spacing: 0.12em;
    }

    .hero-tagline {
        font-size: 0.75rem;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero-description {
        font-size: 1rem;
        max-width: 100%;
    }

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

    .hero-companies {
        font-size: 0.8rem;
        text-align: center;
    }

    .hero-visual {
        order: -1;
    }

    .hero-image-container {
        aspect-ratio: 1 / 1;
        max-width: 400px;
        margin: 0 auto;
    }

    .hero-badge {
        top: var(--spacing-sm);
        right: var(--spacing-sm);
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    .badge-icon {
        font-size: 1rem;
    }

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

    .timeline::before {
        left: 0;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin: 0;
        padding-left: var(--spacing-md);
        text-align: left;
    }

    .timeline-marker {
        left: 0;
        transform: translateX(-50%);
    }

    .blog-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-methods {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
}

/* ========================================
   MULTI-PAGE ENHANCEMENTS
   ======================================== */

/* Tab System */
.tab-content-container {
    min-height: 70vh;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

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

/* Tab Navigation */
.tab-nav .tab-link {
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Active navigation state */
nav a.active {
    color: var(--secondary-color);
    font-weight: 600;
    border-bottom: 2px solid var(--secondary-color);
}

/* Page content styling */
.page-content {
    min-height: 60vh;
    padding: var(--spacing-lg) 0;
}

.page-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

/* Quick Links Section (Home Page) */
.quick-links-section {
    padding: var(--spacing-xl) 0;
    background: var(--bg-white);
}

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

.quick-link-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    transition: all var(--transition-speed) ease;
    cursor: pointer;
}

.quick-link-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-color);
}

.quick-link-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.quick-link-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
}

.quick-link-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Footer location styling */
footer p + p {
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* Smooth transitions */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
    
    a {
        transition: all 0.2s ease;
    }
}

/* Responsive adjustments for page titles */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .quick-links-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   DARK MODE SPECIFIC ADJUSTMENTS
   ======================================== */
:root.dark {
    color-scheme: dark;
}

/* Dark mode navigation */
:root.dark nav {
    background: rgba(15, 23, 42, 0.5);
    border-bottom: 1px solid rgba(30, 41, 59, 0.6);
}

:root.dark .logo {
    color: var(--text-color);
}

:root.dark .logo:hover {
    color: var(--brand-color-light);
}

:root.dark nav a.active {
    color: var(--brand-color-light);
}

:root.dark nav a.active::after {
    background: var(--brand-color-light);
}

:root.dark nav a:hover {
    color: var(--brand-color-light);
}

/* Dark mode mobile menu */
:root.dark nav ul {
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(51, 65, 85, 0.6);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

:root.dark .hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: var(--text-color);
}

:root.dark .hero-description {
    color: #cbd5e1;
}

:root.dark .hero-subtitle {
    color: var(--brand-color-light);
}

:root.dark .hero-companies {
    color: #94a3b8;
}

:root.dark .hero-badge {
    background: rgba(30, 41, 59, 0.95);
    color: var(--brand-color-light);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

:root.dark .hero-image-gradient {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(30, 41, 59, 1) 100%);
}

:root.dark .btn-primary {
    background: var(--brand-color);
    border-color: var(--brand-color);
    color: #ffffff;
}

:root.dark .btn-primary:hover {
    background: var(--brand-color-light);
    border-color: var(--brand-color-light);
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.5);
}

:root.dark .quick-link-card {
    background: var(--bg-light);
    border-color: var(--border-color);
}

:root.dark .quick-link-card:hover {
    background: #1e293b;
    border-color: var(--primary-color);
}

:root.dark .blog-card,
:root.dark .project-card,
:root.dark .recognition-card {
    background: var(--bg-light);
    border-color: var(--border-color);
}

:root.dark .blog-card:hover,
:root.dark .project-card:hover,
:root.dark .recognition-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

:root.dark .recognition-category {
    background: rgba(59, 130, 246, 0.2);
    color: var(--brand-color-light);
}

:root.dark .timeline-marker {
    background: var(--primary-color);
    border-color: var(--bg-color);
    box-shadow: 0 0 0 5px var(--border-color);
}

:root.dark .timeline-item:hover .timeline-marker {
    background: var(--secondary-color);
    box-shadow: 0 0 0 7px var(--border-color), 0 0 25px rgba(96, 165, 250, 0.6);
}

:root.dark .timeline::before {
    background: linear-gradient(to bottom, var(--border-color) 0%, var(--primary-color) 50%, var(--border-color) 100%);
}

:root.dark .timeline-content {
    background: var(--bg-light);
    border-color: var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

:root.dark .timeline-item:hover .timeline-content {
    background: var(--bg-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
}

:root.dark .contact-form-section,
:root.dark .contact-link {
    background: var(--bg-light);
}

:root.dark .form-group input,
:root.dark .form-group textarea {
    background: var(--bg-color);
    border-color: var(--border-color);
    color: var(--text-color);
}

:root.dark .form-group input:focus,
:root.dark .form-group textarea:focus {
    border-color: var(--primary-color);
}

:root.dark footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

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

:root.dark .btn-secondary:hover {
    background: var(--brand-color);
    color: #ffffff;
    border-color: var(--brand-color);
}

/* Dark mode card improvements */
:root.dark .stat-card,
:root.dark .highlight-card,
:root.dark .blog-card,
:root.dark .project-card,
:root.dark .timeline-content,
:root.dark .contact-form-section,
:root.dark .contact-links-section {
    background: var(--bg-light);
    border-color: var(--border-color);
}

:root.dark .stat-card:hover,
:root.dark .highlight-card:hover,
:root.dark .blog-card:hover,
:root.dark .project-card:hover {
    box-shadow: var(--shadow-xl);
}

:root.dark .contact-link {
    background: var(--bg-color);
    border-color: var(--border-color);
}

:root.dark .contact-link:hover {
    background: var(--bg-light);
    border-color: var(--brand-color-light);
}

/* Scrollbar for dark mode */
:root.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

:root.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

:root.dark ::-webkit-scrollbar-track {
    background: var(--bg-color);
}

/* Dark mode for home page sections */
:root.dark .stat-card,
:root.dark .highlight-card {
    background: var(--bg-light);
    border-color: var(--border-color);
}

:root.dark .stat-card:hover,
:root.dark .highlight-card:hover {
    border-color: var(--primary-color);
}
