/* Variables for light and dark themes */
:root {
    /* Light theme (default) */
    --bg-color: #f8fbff;
    --text-color: #334155;
    --heading-color: #0f172a;
    --card-bg: #ffffff;
    --card-shadow: rgba(0, 0, 0, 0.05);
    --card-shadow-hover: rgba(0, 0, 0, 0.12);
    --border-color: #dbe7f6;
    --link-color: #2563eb;
    --link-color-rgb: 37, 99, 235;
    --link-hover-color: #1d4ed8;
    --nav-bg: rgba(248, 251, 255, 0.78);
    --primary-color: #0f172a;
    --secondary-color: #64748b;
    --background-color: #f8fbff;
    --section-bg-color: #eef5ff;
    --accent-color: #0ea5e9;
    --accent-color-rgb: 14, 165, 233;
    --hover-color: #1d4ed8;
    --date-bg-color: #eaf4ff;
    --date-border-color: #b8d9ff;
    --hero-gradient-start: #eaf4ff;
    --hero-gradient-end: #f8fbff;
    --skill-tag-bg: #eaf4ff;
    --skill-tag-border: #b8d9ff;
    --skill-tag-color: #1e40af;
    --tech-tag-bg: #ecfeff;
    --tech-tag-border: #a5f3fc;
    --tech-tag-color: #155e75;
}

/* Dark theme variables */
.dark-theme {
    --bg-color: #08111f;
    --text-color: #d7e3f4;
    --heading-color: #f4f8ff;
    --card-bg: #101c2e;
    --card-shadow: rgba(0, 0, 0, 0.3);
    --card-shadow-hover: rgba(0, 0, 0, 0.5);
    --border-color: #223552;
    --link-color: #60a5fa;
    --link-color-rgb: 96, 165, 250;
    --link-hover-color: #93c5fd;
    --nav-bg: rgba(8, 17, 31, 0.82);
    --primary-color: #f4f8ff;
    --secondary-color: #9fb2cc;
    --background-color: #08111f;
    --section-bg-color: #0d1829;
    --accent-color: #38bdf8;
    --accent-color-rgb: 56, 189, 248;
    --hover-color: #93c5fd;
    --date-bg-color: rgba(96, 165, 250, 0.12);
    --date-border-color: rgba(96, 165, 250, 0.32);
    --timeline-color: #60a5fa;
    --timeline-shadow: rgba(96, 165, 250, 0.35);
    --hero-gradient-start: #08111f;
    --hero-gradient-end: #0d1829;
    --skill-tag-bg: rgba(96, 165, 250, 0.14);
    --skill-tag-border: rgba(96, 165, 250, 0.32);
    --skill-tag-color: #bfdbfe;
    --tech-tag-bg: rgba(56, 189, 248, 0.12);
    --tech-tag-border: rgba(56, 189, 248, 0.28);
    --tech-tag-color: #bae6fd;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent scrolling when mobile menu is open */
body.no-scroll {
    overflow: hidden;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-color);
    color: white;
    padding: 8px;
    z-index: 2000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Focus Styles */
:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    letter-spacing: 0;
}

h2 {
    font-size: 2rem;
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 0.75rem;
    letter-spacing: 0;
}

h2::after {
    content: "";
    position: absolute;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--link-color));
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover, a:focus {
    color: var(--link-hover-color);
}

/* =============================
   HEADER & NAVIGATION (Glassmorphism)
   ============================= */
header {
    background-color: var(--nav-bg);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--heading-color);
    letter-spacing: 0;
    z-index: 1002;
    background: linear-gradient(135deg, var(--heading-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Hamburger Menu */
#mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1002;
}

.hamburger-icon {
    display: block;
    position: relative;
    width: 24px;
    height: 20px;
}

.bar {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--text-color);
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .3s ease-in-out;
}

.bar:nth-child(1) { top: 0px; }
.bar:nth-child(2) { top: 8px; }
.bar:nth-child(3) { top: 16px; }

.hamburger-active .bar:nth-child(1) {
    top: 8px;
    transform: rotate(45deg);
}

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

.hamburger-active .bar:nth-child(3) {
    top: 8px;
    transform: rotate(-45deg);
}

.nav-right {
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
    margin-right: 1rem;
    gap: 0.25rem;
}

nav li {
    margin-left: 0.25rem;
}

nav a {
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-size: 0.925rem;
}

nav a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0px;
    width: 0;
    height: 2px;
    background-color: var(--link-color);
    transition: width 0.3s ease-in-out, left 0.3s ease-in-out;
}

nav a:hover {
    color: var(--link-color);
    background-color: rgba(var(--link-color-rgb), 0.06);
}

nav a:hover::after {
    width: 60%;
    left: 20%;
}

nav a.active {
    color: var(--link-color);
    background-color: rgba(var(--link-color-rgb), 0.08);
}

nav a.active::after {
    width: 60%;
    left: 20%;
}

/* Theme Toggle Button */
#theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background-color: rgba(var(--accent-color-rgb), 0.08);
    transform: rotate(15deg);
}

.light-theme .fa-sun { display: none; }
.light-theme .fa-moon { display: inline-block; }
.dark-theme .fa-sun { display: inline-block; }
.dark-theme .fa-moon { display: none; }

/* =============================
   SECTIONS
   ============================= */
.section {
    padding: 5rem 0;
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

/* Alternating subtle section backgrounds */
.section:nth-of-type(even) {
    background-color: var(--section-bg-color);
}

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

.reveal-section.revealed h2 {
    opacity: 1;
    transform: translateY(0);
}

.reveal-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* =============================
   HERO / ABOUT SECTION
   ============================= */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: 6rem 0 5rem;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(var(--accent-color-rgb), 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: heroFloat 8s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(var(--link-color-rgb), 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: heroFloat 10s ease-in-out infinite reverse;
}

@keyframes heroFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -20px); }
}

.profile-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    margin: 2rem 0;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.profile-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 220px;
    gap: 1.5rem;
    justify-content: center;
}

.name-heading {
    color: var(--heading-color);
    font-size: 2.5rem;
    text-align: left;
    margin-bottom: 0.5rem;
    margin-top: 0;
    font-weight: 800;
    letter-spacing: 0;
    background: linear-gradient(135deg, var(--heading-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: all 0.3s ease;
}

/* Dynamic Typing Animation */
.typing-container {
    text-align: left;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-color);
    min-height: 1.8rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.typed-text {
    color: var(--link-color);
    font-weight: 600;
}

.cursor {
    display: inline-block;
    background-color: var(--link-color);
    margin-left: 3px;
    width: 3px;
    height: 1.4rem;
    animation: blink 1s infinite;
}

.cursor.typing {
    animation: none;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.profile-image {
    position: relative;
    width: 200px;
    height: 200px;
    overflow: hidden;
    border-radius: 50%;
    box-shadow: 0 8px 30px rgba(var(--accent-color-rgb), 0.15);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    padding: 4px;
    background: linear-gradient(135deg, var(--accent-color), var(--link-color));
}

.profile-image:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 40px rgba(var(--accent-color-rgb), 0.25);
}

.profile-image img {
    width: 100%;
    border-radius: 50%;
    transition: transform 0.4s;
    aspect-ratio: 1/1;
    object-fit: cover;
}

.profile-image:hover img {
    transform: scale(1.03);
}

.profile-content {
    flex: 1;
    position: relative;
    z-index: 2;
}

.intro-expandable {
    margin-top: 0.5rem;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--link-color);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0;
    font-family: inherit;
    transition: opacity 0.2s ease;
    position: relative;
    z-index: 10;
    display: block;
}

.read-more-btn:hover {
    opacity: 0.8;
}

.intro-details {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
}

.intro-details.expanded {
    max-height: 500px;
    opacity: 1;
    margin-top: 0.75rem;
}

.summary {
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    position: relative;
    z-index: 5;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--card-shadow);
    transition: all 0.3s ease;
    color: var(--link-color);
    position: relative;
    overflow: hidden;
}

.social-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(var(--accent-color-rgb), 0.2);
    background-color: var(--link-color);
    color: white;
    border-color: var(--link-color);
}

/* =============================
   SKILLS SECTION
   ============================= */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.skill-category {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 1.75rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--card-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--link-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px var(--card-shadow-hover);
    border-color: rgba(var(--accent-color-rgb), 0.3);
}

.skill-category:hover::before {
    opacity: 1;
}

.skill-category-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.skill-category-header i {
    font-size: 1.4rem;
    color: var(--accent-color);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--accent-color-rgb), 0.1);
    border-radius: 10px;
    flex-shrink: 0;
}

.skill-category-header h3 {
    font-size: 1.1rem;
    margin-bottom: 0;
    font-weight: 600;
    color: var(--heading-color);
}

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

.skill-tag {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    background-color: var(--skill-tag-bg);
    color: var(--skill-tag-color);
    border: 1px solid var(--skill-tag-border);
    transition: all 0.2s ease;
    cursor: default;
}

.skill-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(var(--accent-color-rgb), 0.15);
}

/* =============================
   PROJECTS SECTION
   ============================= */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.project-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    color: var(--heading-color);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.project-card p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--secondary-color);
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.project-card::before {
    display: none;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px var(--card-shadow-hover);
    border-color: rgba(var(--accent-color-rgb), 0.3);
}

/* Featured Project & Winner Badge */
.featured-project {
    border: 1.5px solid rgba(245, 166, 35, 0.4);
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--card-bg) 95%, rgba(245, 166, 35, 0.05) 100%);
    grid-column: 1 / -1;
}

.featured-project:hover {
    border-color: rgba(245, 166, 35, 0.6);
    box-shadow: 0 12px 30px rgba(245, 166, 35, 0.12);
}

.winner-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    background: linear-gradient(135deg, #f5a623, #f7c948);
    color: #1a1a1a;
    margin-bottom: 0.75rem;
    width: fit-content;
    letter-spacing: 0.02em;
}

.project-links a.hackathon-link {
    background-color: #4f46e5;
}

.project-links a.hackathon-link:hover {
    background-color: #4338ca;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.project-links a.hackathon-link::before {
    content: '\f0ac';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

/* Project Tech Tags */
.project-tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.tech-tag {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    background-color: var(--tech-tag-bg);
    color: var(--tech-tag-color);
    border: 1px solid var(--tech-tag-border);
    letter-spacing: 0.01em;
}

.project-links {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
    flex-wrap: wrap;
}

.project-links a {
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.88rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--link-color);
    color: white;
    text-decoration: none;
}

.project-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--link-color-rgb), 0.3);
    color: white;
}

.project-links a.presentation-link {
    background-color: #2563eb;
}

.project-links a.presentation-link:hover {
    background-color: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.project-links a.report-link {
    background-color: #0284c7;
}

.project-links a.report-link:hover {
    background-color: #0369a1;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.project-links a::before {
    font-family: 'Font Awesome 6 Brands';
    font-weight: 400;
}

.project-links a:not(.presentation-link):not(.report-link)::before {
    content: '\f09b';
    font-family: 'Font Awesome 6 Brands';
}

.project-links a.presentation-link::before {
    content: '\f1c4';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.project-links a.report-link::before {
    content: '\f1c1';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

/* =============================
   EXPERIENCE TIMELINE
   ============================= */
.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 30px;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, 
        var(--accent-color) 0%, 
        var(--link-color) 50%, 
        rgba(var(--link-color-rgb), 0.3) 100%);
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
    box-shadow: 0 0 15px rgba(var(--link-color-rgb), 0.3);
    position: relative;
    overflow: hidden;
}

.timeline-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateY(-100%); opacity: 0; }
    50% { transform: translateY(100%); opacity: 1; }
}

.timeline-line.animate {
    transform: scaleY(1);
}

.experience-timeline {
    position: relative;
    padding-left: 80px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item.animate {
    opacity: 1;
    transform: translateX(0);
}

.timeline-dot {
    position: absolute;
    left: -62px;
    top: 20px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, var(--accent-color), var(--link-color));
    border-radius: 50%;
    border: 3px solid var(--bg-color);
    outline: 2px solid var(--date-border-color);
    transform: scale(0);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2;
    box-shadow: 0 0 12px rgba(var(--link-color-rgb), 0.4);
}

.timeline-item.animate .timeline-dot {
    transform: scale(1);
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.3);
    box-shadow: 0 0 20px rgba(var(--link-color-rgb), 0.6);
}

.timeline-content {
    background: var(--card-bg);
    padding: 1.75rem;
    border-radius: 14px;
    box-shadow: 0 2px 8px var(--card-shadow);
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.3s ease;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -14px;
    top: 25px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 14px solid var(--border-color);
}

.timeline-content::after {
    content: '';
    position: absolute;
    left: -12px;
    top: 25px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 14px solid var(--card-bg);
}

.timeline-item:hover .timeline-content {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--card-shadow-hover);
    border-color: rgba(var(--accent-color-rgb), 0.3);
}

.timeline-item:hover .timeline-content::before {
    border-right-color: rgba(var(--accent-color-rgb), 0.3);
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.4rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.timeline-content .experience-subtitle {
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    font-weight: 500;
    font-size: 1rem;
}

.experience-date {
    color: var(--skill-tag-color);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.82rem;
    display: inline-block;
    background: var(--skill-tag-bg);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    border: 1px solid var(--skill-tag-border);
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.timeline-item:hover .experience-date {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

.timeline-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-content li {
    margin-bottom: 0.6rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
    color: var(--text-color);
    font-size: 0.95rem;
}

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

/* =============================
   EDUCATION SECTION
   ============================= */
.education-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.education-item {
    display: flex;
    gap: 1.5rem;
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px var(--card-shadow);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid var(--border-color);
    overflow: hidden;
    z-index: 1;
}

.education-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-color), var(--link-color));
    transition: width 0.3s ease;
    border-radius: 0 2px 2px 0;
}

.education-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px var(--card-shadow-hover);
    border-color: rgba(var(--accent-color-rgb), 0.2);
}

.education-item:hover::before {
    width: 6px;
}

.education-logo {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent-color);
    padding-top: 0.25rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(var(--accent-color-rgb), 0.1);
    border-radius: 12px;
    align-items: center;
}

.education-item:hover .education-logo {
    transform: scale(1.1);
    background: rgba(var(--accent-color-rgb), 0.15);
}

.education-content {
    flex: 1;
}

.education-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
    color: var(--primary-color);
    font-weight: 700;
}

.education-content .education-subtitle {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.education-content .education-date {
    display: inline-block;
    background-color: var(--skill-tag-bg);
    color: var(--skill-tag-color);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    border: 1px solid var(--skill-tag-border);
    transition: all 0.3s ease;
}

.education-item:hover .education-date {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* =============================
   FOOTER
   ============================= */
footer {
    background-color: var(--bg-color);
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.footer-content .last-updated {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    color: var(--secondary-color);
    white-space: nowrap;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    margin-left: auto;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* =============================
   BACK TO TOP BUTTON
   ============================= */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(var(--accent-color-rgb), 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    background: var(--link-hover-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(var(--accent-color-rgb), 0.4);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* =============================
   RESPONSIVE DESIGN
   ============================= */
@media (max-width: 768px) {
    .hero-section {
        padding: 4rem 0 3rem;
    }

    .hero-section::before,
    .hero-section::after {
        width: 300px;
        height: 300px;
    }

    .profile-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .profile-image {
        flex: 0 0 auto;
        max-width: 180px;
        height: 180px;
        width: 180px;
        margin: 0 auto;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .name-heading {
        font-size: 2rem;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .typing-container {
        font-size: 1rem;
        min-height: 1.5rem;
        justify-content: center;
        text-align: center;
        margin-bottom: 1.25rem;
    }
    
    .profile-content {
        text-align: center;
    }

    .read-more-btn {
        margin: 0 auto;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mobile navbar with hamburger */
    #mobile-menu-toggle {
        display: block;
    }
    
    nav {
        padding: 0.75rem 0;
    }
    
    .nav-right {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--nav-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateY(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 1001;
    }
    
    .nav-right.active {
        transform: translateY(0);
    }
    
    nav ul {
        flex-direction: column;
        margin-right: 0;
        align-items: center;
        margin-bottom: 2rem;
        gap: 0.5rem;
    }
    
    nav li {
        margin: 0.5rem 0;
        text-align: center;
        margin-left: 0;
    }
    
    nav a {
        font-size: 1.15rem;
        padding: 0.6rem 1.5rem;
    }
    
    #theme-toggle {
        margin-top: 1rem;
    }
    
    /* Mobile timeline */
    .timeline-container {
        padding: 1rem 0;
    }
    
    .timeline-line {
        left: 20px;
    }
    
    .experience-timeline {
        padding-left: 55px;
    }
    
    .timeline-dot {
        left: -42px;
        width: 12px;
        height: 12px;
    }
    
    .timeline-content {
        padding: 1.25rem;
    }
    
    .timeline-content::before {
        left: -11px;
        border-right-width: 11px;
    }
    
    .timeline-content::after {
        left: -9px;
        border-right-width: 11px;
    }
    
    .timeline-item {
        margin-bottom: 1.75rem;
    }
    
    /* Back to top mobile */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    /* Footer mobile */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .footer-content .last-updated {
        position: static;
        transform: none;
        order: 2;
    }
    
    .footer-links {
        justify-content: center;
        margin: 0;
        order: 3;
    }

    /* Section padding mobile */
    .section {
        padding: 3.5rem 0;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .project-grid {
        grid-template-columns: 1fr;
    }

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

    .name-heading {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.6rem;
    }

}

/* Large screens */
@media (min-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

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

    .reveal-section h2,
    .reveal-item,
    .timeline-item,
    .timeline-line,
    .timeline-dot {
        opacity: 1;
        transform: none;
    }
}
