:root {
    --color-bg: #fafafa;
    --color-surface: #ffffff;
    --color-text: #1a1a1a;
    --color-text-secondary: #555;
    --color-text-muted: #888;
    --color-accent: #0066ff;
    --color-accent-light: #e6f0ff;
    --color-gradient-start: #0066ff;
    --color-gradient-end: #7c3aed;
    --color-border: #e5e5e5;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --max-width: 1200px;
    --nav-height: 72px;
}

[data-theme="dark"] {
    --color-bg: #0f0f0f;
    --color-surface: #1a1a1a;
    --color-text: #f0f0f0;
    --color-text-secondary: #a0a0a0;
    --color-text-muted: #666;
    --color-accent: #4d9fff;
    --color-accent-light: #1a2d4a;
    --color-gradient-start: #4d9fff;
    --color-gradient-end: #a78bfa;
    --color-border: #2a2a2a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

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

.text-gradient {
    background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 3rem;
    line-height: 1.2;
}

/* ========== Navbar ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(250, 250, 250, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    border-bottom-color: var(--color-border);
    box-shadow: 0 1px 16px rgba(0, 0, 0, 0.06);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.1rem;
    font-weight: 800;
    text-decoration: none;
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-text);
    border-radius: 10px;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.nav-cta {
    background: var(--color-text);
    color: white !important;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s !important;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Nav actions group */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* LinkedIn nav link */
.nav-linkedin {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-linkedin:hover {
    color: #0a66c2;
    background: rgba(10, 102, 194, 0.08);
}

.nav-linkedin svg {
    flex-shrink: 0;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--color-text);
}

.theme-toggle:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-1px);
}

.theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: block;
}

[data-theme="dark"] .nav-logo {
    background: var(--color-accent);
}

[data-theme="dark"] .nav-cta {
    background: var(--color-accent) !important;
}

[data-theme="dark"] .btn-primary {
    background: var(--color-accent);
}

[data-theme="dark"] .navbar {
    background: rgba(15, 15, 15, 0.85);
}

[data-theme="dark"] .company-logo {
    background: #2a2a2a;
    border: 1px solid var(--color-border);
}

[data-theme="dark"] .edu-logo {
    background: #2a2a2a;
    border-color: var(--color-border);
}

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

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ========== Hero ========== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: var(--nav-height);
    position: relative;
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.4;
}

[data-theme="dark"] #hero-canvas {
    opacity: 0.25;
}

.hero-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 6rem 2rem 4rem;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--color-accent-light);
    color: var(--color-accent);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 100px;
    letter-spacing: 0.02em;
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease;
    position: relative;
    overflow: hidden;
}

.hero-badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.hero-title {
    font-size: clamp(3.5rem, 8vw, 6rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease 0.1s both;
    transition: opacity 0.1s ease;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    color: var(--color-text-secondary);
    max-width: 640px;
    line-height: 1.8;
    margin-bottom: 3.5rem;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-subtitle .highlight {
    color: var(--color-accent);
    font-weight: 600;
}

.hero-stats {
    display: flex;
    gap: 4rem;
    margin-bottom: 3.5rem;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.stat-number {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
    background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.9rem 2rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--color-text);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

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

.btn-secondary:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}


/* ========== About ========== */
.about {
    padding: 8rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-content h2 {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--color-text-secondary);
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.highlight-card {
    padding: 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.highlight-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
    border-color: var(--color-accent);
}

.highlight-card:hover .highlight-icon {
    transform: scale(1.1);
}

.highlight-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent-light);
    color: var(--color-accent);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.highlight-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.highlight-card p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* ========== Experience ========== */
.experience {
    padding: 8rem 0;
    background: var(--color-surface);
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

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

.timeline-item {
    position: relative;
    padding-bottom: 3rem;
}

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

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-accent);
    border: 3px solid var(--color-surface);
    box-shadow: 0 0 0 2px var(--color-accent);
}

.timeline-content {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-content:hover {
    border-color: var(--color-accent);
    box-shadow: 0 12px 40px rgba(0, 102, 255, 0.08);
    transform: translateX(4px);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.timeline-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Company badge with logo */
.company-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.company-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    background: var(--color-accent-light);
    padding: 4px;
    flex-shrink: 0;
}

.company-logo-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--color-accent-light);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    flex-shrink: 0;
    letter-spacing: -0.02em;
}

.company {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.company-location {
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.project-name {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-style: italic;
    margin-top: 0.25rem;
}

.timeline-date {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-accent);
    white-space: nowrap;
    background: var(--color-accent-light);
    padding: 0.35rem 0.85rem;
    border-radius: 100px;
    flex-shrink: 0;
}

.timeline-details {
    list-style: none;
    margin-bottom: 1.5rem;
}

.timeline-details li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.7rem;
    font-size: 0.92rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.timeline-details li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65rem;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-accent);
}

.timeline-details li strong {
    color: var(--color-text);
}

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

.tech-tags span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35rem 0.8rem;
    background: var(--color-accent-light);
    color: var(--color-accent);
    border-radius: 100px;
}

.tech-tags span i {
    font-size: 0.85rem;
}

/* ========== Projects Carousel ========== */
.projects {
    padding: 8rem 0;
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.carousel-track {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    flex: 1;
    min-height: 320px;
}

.project-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    opacity: 0;
    transform: translateX(80px) scale(0.95);
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}

.project-card.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: all;
    position: relative;
}

.project-card.slide-left {
    opacity: 0;
    transform: translateX(-80px) scale(0.95);
}

.project-card.slide-right {
    opacity: 0;
    transform: translateX(80px) scale(0.95);
}

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

.project-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    background: var(--color-accent-light);
    color: var(--color-accent);
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.project-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.project-card > p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.project-metrics {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--color-bg);
    border-radius: 12px;
}

.project-metric {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-accent);
}

.metric-label {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.carousel-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.carousel-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: scale(1.1);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: var(--color-border);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: var(--color-accent);
    transform: scale(1.3);
}

/* ========== Skills ========== */
.skills {
    padding: 8rem 0;
}

.skills-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 3rem;
    align-items: start;
}

.skills-chart-wrapper {
    position: sticky;
    top: calc(var(--nav-height) + 2rem);
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

#skills-radar {
    max-width: 100%;
    height: auto;
    cursor: crosshair;
}

.radar-tooltip {
    position: absolute;
    padding: 0.5rem 0.85rem;
    background: var(--color-text);
    color: var(--color-bg);
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s, transform 0.2s;
    white-space: nowrap;
    z-index: 10;
}

.radar-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.radar-tooltip::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: var(--color-text);
    border-radius: 2px;
    rotate: 45deg;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.skill-category {
    padding: 2rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.skill-category h3 {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.skill-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    transition: all 0.2s;
}

.skill-pill i {
    font-size: 1rem;
}

.skill-pill:hover {
    background: var(--color-accent-light);
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.1);
}

/* ========== Education ========== */
.education {
    padding: 8rem 0;
    background: var(--color-surface);
}

.edu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.edu-card {
    padding: 2.5rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.edu-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.edu-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent-light);
    color: var(--color-accent);
    border-radius: 14px;
    margin-bottom: 1.25rem;
}

.edu-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: contain;
    margin-bottom: 1.25rem;
    border: 1px solid var(--color-border);
}

.edu-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.edu-school {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

.edu-meta {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.cert-list {
    list-style: none;
    margin-top: 0.75rem;
}

.cert-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.6rem;
    font-size: 0.92rem;
    color: var(--color-text-secondary);
}

.cert-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
}

/* ========== Contact ========== */
.contact {
    padding: 8rem 0;
}

.contact-content {
    max-width: 640px;
}

.contact-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.contact-content > p {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

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

.contact-item {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    transition: all 0.2s;
    width: fit-content;
}

.contact-item:hover {
    background: var(--color-accent-light);
    color: var(--color-accent);
    transform: translateX(8px);
    box-shadow: -4px 0 0 var(--color-accent);
}

.contact-item svg {
    flex-shrink: 0;
}

.contact-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* ========== Footer ========== */
.footer {
    padding: 2rem 0;
    border-top: 1px solid var(--color-border);
}

.footer p {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* ========== Animations ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth global transitions for theme switch */
.navbar,
.highlight-card,
.timeline-content,
.skill-category,
.edu-card,
.skill-pill,
section {
    transition: background 0.4s ease, border-color 0.4s ease, color 0.3s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease;
}

/* ========== Responsive — Tablet ========== */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-stats {
        gap: 2.5rem;
    }

    .skills-layout {
        grid-template-columns: 1fr;
    }

    .skills-chart-wrapper {
        position: static;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .project-metrics {
        gap: 1.5rem;
    }
}

/* ========== Responsive — Mobile ========== */
@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-surface);
        flex-direction: column;
        padding: 2rem 1.5rem;
        gap: 1.5rem;
        border-top: 1px solid var(--color-border);
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        font-size: 1.1rem;
    }

    .nav-linkedin span {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-container {
        padding: 4rem 1.25rem 3rem;
    }

    .hero-title {
        font-size: clamp(2.5rem, 10vw, 3.5rem);
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

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

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


    .about,
    .experience,
    .skills,
    .education,
    .contact {
        padding: 5rem 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

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

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .timeline-date {
        align-self: flex-start;
    }

    .timeline-content {
        padding: 1.5rem;
    }

    .timeline-header h3 {
        font-size: 1.15rem;
    }

    .company-badge {
        gap: 0.6rem;
    }

    .company {
        font-size: 0.92rem;
    }

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

    .carousel-btn {
        display: none;
    }

    .project-card {
        padding: 1.5rem;
    }

    .project-metrics {
        flex-wrap: wrap;
        gap: 1rem;
    }

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

    .contact-content h2 {
        font-size: 1.75rem;
    }
}

/* ========== Print Styles (Save as PDF) ========== */
@media print {
    * {
        animation: none !important;
        transition: none !important;
    }

    body {
        background: white;
        color: #1a1a1a;
        font-size: 11pt;
        line-height: 1.5;
    }

    .navbar,
    .hero-actions,
    .theme-toggle,
    .nav-toggle,
    .nav-linkedin,
    .hero-badge::after {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding-top: 0;
    }

    .hero-container {
        padding: 1rem 0;
    }

    .hero-badge {
        margin-bottom: 0.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
        opacity: 1 !important;
    }

    .hero-subtitle {
        margin-bottom: 1rem;
    }

    .hero-stats {
        transform: none !important;
        margin-bottom: 1rem;
    }

    .stat-number {
        -webkit-text-fill-color: #0066ff;
        font-size: 1.5rem;
    }

    section {
        padding: 2rem 0;
        break-inside: avoid;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .timeline-content {
        border: 1px solid #ddd;
        box-shadow: none;
        transform: none !important;
        page-break-inside: avoid;
    }

    .timeline::before {
        background: #ccc;
    }

    .highlight-card,
    .skill-category,
    .edu-card {
        box-shadow: none;
        transform: none !important;
        border: 1px solid #ddd;
    }

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

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

    .contact-item {
        transform: none !important;
    }

    .text-gradient {
        -webkit-text-fill-color: #0066ff;
    }

    .footer {
        border-top: 1px solid #ddd;
    }

    a {
        color: inherit;
        text-decoration: none;
    }
}

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

    .hero-stats {
        gap: 1rem;
    }

    .stat {
        min-width: calc(50% - 0.5rem);
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .timeline-content {
        padding: 1.25rem;
    }

    .tech-tags span {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }

    .skill-pill {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .edu-card {
        padding: 1.5rem;
    }
}
