/* =============== Variables ================== */
:root {
    /* Fonts */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Light Mode Colors */
    --bg-color: #f8fafc;
    --bg-secondary: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: rgba(59, 130, 246, 0.1);
    --border-color: #e2e8f0;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --nav-bg: rgba(255, 255, 255, 0.85);
    --btn-text: #ffffff;
    
    /* Layout */
    --section-padding: 6rem 0;
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
}

body.dark-mode {
    /* Dark Mode Colors (Default) */
    --bg-color: #0b0f19;
    --bg-secondary: #111827;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #60a5fa;
    --accent-hover: #3b82f6;
    --accent-light: rgba(96, 165, 250, 0.1);
    --border-color: #1f2937;
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --nav-bg: rgba(11, 15, 25, 0.85);
    --btn-text: #0b0f19;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem; /* Account for fixed navbar */
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

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

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

.section {
    padding: var(--section-padding);
}

.bg-secondary {
    background-color: var(--bg-secondary);
}

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

.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mt-6 { margin-top: 5rem; }

/* Utilities */
.highlight {
    color: var(--accent-color);
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--btn-text);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-light);
}

/* Rendering state */
#view-projects-btn.rendering {
    pointer-events: none;
    opacity: 0.85;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 165px;
    justify-content: center;
}

#view-projects-btn.rendering::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin-render 0.6s linear infinite;
    flex-shrink: 0;
}

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

.btn-outline {
    background-color: transparent;
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.btn-outline:hover {
    background-color: var(--accent-color);
    color: var(--btn-text);
    transform: translateY(-2px);
}

.btn-outline-light {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border-color: #ffffff;
    color: #ffffff;
}

.btn-outline-light:hover {
    background-color: #ffffff;
    color: #000000;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
}

.btn-full {
    width: 100%;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.title-underline {
    height: 4px;
    width: 60px;
    background-color: var(--accent-color);
    margin-bottom: 2rem;
    border-radius: 2px;
}

.title-underline.center {
    margin: 0 auto 2rem;
}

/* =============== Navigation ================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    transition: var(--transition-normal);
    padding: 1.5rem 0;
}

.navbar.scrolled {
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

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

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

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

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

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

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent-light);
}

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

.mobile-menu-controls {
    display: none;
    align-items: center;
    gap: 1rem;
}

.hamburger {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition-normal);
}

/* =============== Hero Section ================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 5rem; /* navbar offset */
    overflow: hidden;
}

.space-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
    /* Fade out the stars towards the bottom so it blends with the next section */
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

/* Star field generator function logic in CSS using a large box-shadow */
.stars, .stars2, .stars3 {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 50%;
    background: transparent;
}

.stars {
    width: 2px;
    height: 2px;
    box-shadow: 10vw 10vh #fff, 20vw 80vh #fff, 30vw 20vh #fff, 40vw 60vh #fff, 50vw 30vh #fff, 60vw 90vh #fff, 70vw 40vh #fff, 80vw 10vh #fff, 90vw 50vh #fff, 95vw 80vh #fff, 5vw 70vh #fff, 15vw 40vh #fff, 25vw 90vh #fff, 35vw 10vh #fff, 45vw 50vh #fff, 55vw 20vh #fff, 65vw 80vh #fff, 75vw 30vh #fff, 85vw 70vh #fff, 100vw 20vh #fff;
    animation: twinkle1 3s ease-in-out infinite;
}

.stars2 {
    width: 3px;
    height: 3px;
    box-shadow: 8vw 30vh #fff, 18vw 90vh #fff, 28vw 10vh #fff, 38vw 50vh #fff, 48vw 80vh #fff, 58vw 20vh #fff, 68vw 60vh #fff, 78vw 40vh #fff, 88vw 90vh #fff, 98vw 10vh #fff, 12vw 50vh #fff, 22vw 20vh #fff, 32vw 80vh #fff, 42vw 30vh #fff, 52vw 90vh #fff, 62vw 10vh #fff, 72vw 50vh #fff, 82vw 80vh #fff, 92vw 20vh #fff;
    animation: twinkle2 5s ease-in-out infinite;
    animation-delay: 1.5s;
}

.stars3 {
    width: 4px;
    height: 4px;
    box-shadow: 15vw 15vh #fff, 25vw 60vh #fff, 35vw 90vh #fff, 45vw 20vh #fff, 55vw 70vh #fff, 65vw 10vh #fff, 75vw 50vh #fff, 85vw 80vh #fff, 95vw 30vh #fff;
    animation: twinkle3 7s ease-in-out infinite;
    animation-delay: 0.8s;
}

@keyframes twinkle1 {
    0%   { opacity: 0.15; }
    25%  { opacity: 0.9; }
    50%  { opacity: 0.3; }
    75%  { opacity: 1; }
    100% { opacity: 0.15; }
}

@keyframes twinkle2 {
    0%   { opacity: 0.8; }
    30%  { opacity: 0.1; }
    60%  { opacity: 0.95; }
    80%  { opacity: 0.2; }
    100% { opacity: 0.8; }
}

@keyframes twinkle3 {
    0%   { opacity: 0.5; }
    20%  { opacity: 1; }
    50%  { opacity: 0.1; }
    70%  { opacity: 0.8; }
    100% { opacity: 0.5; }
}
/* ===== Shooting Stars ===== */
.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    opacity: 0;
    /* Soft glow around the head of the star */
    box-shadow:
        0 0 4px 1px rgba(180, 210, 255, 0.8),
        0 0 10px 2px rgba(150, 190, 255, 0.4);
}

/* Long fading tail */
.shooting-star::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 2px;
    width: 180px;
    height: 1px;
    transform: translateY(-50%);
    background: linear-gradient(
        to left,
        rgba(255, 255, 255, 0) 0%,
        rgba(200, 220, 255, 0.15) 40%,
        rgba(200, 220, 255, 0.55) 100%
    );
}

/* Individual positions & staggered delays */
.shooting-star:nth-child(4)  { top: 6%;  left: 5%;  animation: shoot 7s  ease-in 1s    infinite; }
.shooting-star:nth-child(5)  { top: 18%; left: 65%; animation: shoot 10s ease-in 4s    infinite; }
.shooting-star:nth-child(6)  { top: 3%;  left: 78%; animation: shoot 6s  ease-in 7s    infinite; }
.shooting-star:nth-child(7)  { top: 12%; left: 30%; animation: shoot 12s ease-in 2.5s  infinite; }
.shooting-star:nth-child(8)  { top: 28%; left: 50%; animation: shoot 9s  ease-in 5.5s  infinite; }

@keyframes shoot {
    0% {
        transform: rotate(-30deg) translateX(0);
        opacity: 0;
    }
    5% {
        opacity: 0.5;         /* Fade in quickly */
    }
    80% {
        opacity: 0.3;         /* Stay faint throughout journey */
    }
    100% {
        transform: rotate(-30deg) translateX(700px);
        opacity: 0;           /* Fade out at the end */
    }
}



.hero-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

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

.hero-image-ctr {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Stylish spinning dashed ring underneath the image */
.hero-image-ctr::before {
    content: '';
    position: absolute;
    width: 100%;
    max-width: 490px;
    aspect-ratio: 1/1;
    border: 2px dashed var(--accent-color);
    border-radius: 50%;
    animation: spinRotate 25s linear infinite;
    opacity: 0.2;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.hero-image-ctr:hover::before {
    opacity: 0.8;
    max-width: 510px;
    border-width: 3px;
}

@keyframes spinRotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.03); }
    100% { transform: rotate(360deg) scale(1); }
}

.hero-image {
    width: 100%;
    max-width: 450px;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    aspect-ratio: 1/1;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 4px solid var(--accent-light);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    animation: profileFloat 6s ease-in-out infinite;
    z-index: 2;
    cursor: pointer;
}

@keyframes profileFloat {
    0% { transform: translateY(0); box-shadow: 0 10px 30px rgba(0,0,0,0.2), 0 0 20px var(--accent-light); }
    50% { transform: translateY(-15px); box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 50px var(--accent-light); }
    100% { transform: translateY(0); box-shadow: 0 10px 30px rgba(0,0,0,0.2), 0 0 20px var(--accent-light); }
}

.hero-image:hover {
    border-color: var(--accent-color);
    animation-play-state: paused;
    transform: translateY(-20px) scale(1.05) !important;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5), 0 0 70px var(--accent-light);
    /* Dynamic organic blob shape */
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; 
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
    display: block;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-image:hover img {
    transform: scale(1.15) rotate(-3deg);
}

.hero-greeting {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    letter-spacing: -1px;
}

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

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

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

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

.social-links-hero a {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.social-links-hero a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.7;
    transition: var(--transition-fast);
}

.scroll-indicator:hover {
    opacity: 1;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--text-primary);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% { opacity: 1; top: 6px; }
    100% { opacity: 0; top: 20px; }
}

/* =============== About Section ================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image-ctr {
    position: relative;
}

.about-image {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.about-image::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    pointer-events: none;
}

.about-image img {
    transition: var(--transition-slow);
}

.about-image:hover img {
    transform: scale(1.05);
}

.image-overlay-box {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background-color: var(--accent-color);
    color: var(--btn-text);
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10;
}

.image-overlay-box .years {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    line-height: 1;
}

.image-overlay-box .text {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.2;
}

.about-headline {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

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

.about-content strong {
    color: var(--text-primary);
}

/* =============== Clients Section ================== */
.clients-section {
    padding: 3rem 0;
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.clients-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    text-align: left;
    padding-left: 2rem;
}

.clients-slider {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);  /* Break out of container to full screen width */
    display: flex;
    overflow: hidden;
    /* Soft gradient fade on left and right edges */
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.clients-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 5rem;
    padding: 1rem 0;
    width: max-content;
    animation: scrollLogos 25s linear infinite;
}

/* Pause animation when hovering over logos */
.clients-track:hover {
    animation-play-state: paused;
}

.client-logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.5rem;
    font-weight: 700;
    white-space: nowrap;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    transition: var(--transition-normal);
    cursor: pointer;
    opacity: 0.6;
    flex-shrink: 0;
}

.client-logo i {
    font-size: 2rem;
    color: var(--text-secondary);
    transition: var(--transition-normal);
}

.client-logo:hover {
    color: var(--text-primary);
    opacity: 1;
    transform: scale(1.05);
}

.client-logo:hover i {
    color: var(--text-primary);
}

@keyframes scrollLogos {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

/* =============== Skills Section ================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skill-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 2.5rem 2rem;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-normal);
}

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

.skill-card:hover::before {
    transform: scaleX(1);
}

.skill-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    display: inline-block;
    padding: 1rem;
    background-color: var(--accent-light);
    border-radius: var(--border-radius-sm);
}

.skill-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.skill-list li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.skill-list li i {
    color: var(--accent-color);
    margin-top: 5px;
    font-size: 0.8rem;
}

.software-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.software-tags .tag {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
}

.software-tags .tag i {
    color: var(--accent-color);
}

.software-tags .tag:hover {
    background-color: var(--accent-color);
    color: var(--btn-text);
    border-color: var(--accent-color);
}

.software-tags .tag:hover i {
    color: var(--btn-text);
}

/* =============== Projects Section ================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.project-item {
    background-color: var(--bg-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition-normal);
}

.project-item:hover {
    transform: translateY(-10px);
}

.project-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.project-item:hover .project-img img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition-normal);
}

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

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

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

/* =============== Experience Section (Timeline) ================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 2rem;
}

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

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

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

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--accent-color);
    transform: translateX(-50%);
    box-shadow: 0 0 0 4px var(--accent-light);
}

.timeline-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

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

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

.timeline-date {
    background-color: var(--accent-light);
    color: var(--accent-color);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.timeline-list {
    padding-left: 1.2rem;
}

/* Compact Timeline Modifiers */
.timeline.compact .timeline-item {
    margin-bottom: 1.5rem;
}

.timeline.compact .timeline-content {
    padding: 1.2rem 1.5rem;
}

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

.timeline.compact .timeline-date {
    font-size: 0.75rem;
    padding: 0.2rem 0.8rem;
}

.timeline.compact .timeline-list li {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

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

/* Fade Overlay wrapper */
.timeline-fade-wrapper {
    position: relative;
    /* Show roughly 2.5 items + a peek of the 3rd */
    max-height: 480px;
    overflow: hidden;
    transition: max-height 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-fade-wrapper.expanded {
    max-height: 3000px; /* large enough to show everything */
}

.timeline-fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent 0%, var(--bg-secondary) 100%);
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 5;
}

.timeline-fade-overlay.hidden {
    opacity: 0;
}

.timeline-list li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    list-style-type: disc;
}

.timeline-list li::marker {
    color: var(--accent-color);
}

.timeline-list strong {
    color: var(--text-primary);
}

/* Objective Box */
.objective-box {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    border-radius: var(--border-radius-md);
    padding: 3rem;
    text-align: center;
    color: #ffffff;
    max-width: 800px;
    margin: 4rem auto 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.3);
}

.objective-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    transform: rotate(30deg);
}

.objective-box .obj-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.objective-box h3 {
    color: #ffffff;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.objective-box p {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* =============== Services Section ================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background-color: var(--bg-color);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius-md);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

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

.service-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    background-color: var(--accent-light);
    border-radius: 50%;
    transition: var(--transition-normal);
}

.service-card:hover .service-icon {
    background-color: var(--accent-color);
    color: var(--btn-text);
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

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

/* =============== Contact Section ================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.contact-desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

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

.contact-method i {
    font-size: 1.5rem;
    color: var(--accent-color);
    background-color: var(--accent-light);
    padding: 1rem;
    border-radius: 50%;
}

.contact-method h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.contact-method a, .contact-method span {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

.social-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

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

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

.social-links a:hover {
    background-color: var(--accent-color);
    color: var(--btn-text);
    border-color: var(--accent-color);
    transform: translateY(-3px);
}

.contact-form-container {
    background-color: var(--bg-color);
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* =============== Footer ================== */
.footer {
    background-color: #0b0f19;
    color: #e2e8f0;
    padding: 4rem 0 2rem;
    border-top: 1px solid #1f2937;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1f2937;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand .logo {
    color: #ffffff;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.footer-brand p {
    color: #94a3b8;
    font-size: 0.9rem;
    max-width: 300px;
}

.back-to-top {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    background-color: #1f2937;
    color: #ffffff;
    border-radius: 50%;
    transition: var(--transition-normal);
}

.back-to-top:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
}

/* =============== Animations ================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Delay classes for staggered animations handled in JS */

/* =============== Responsive Design ================== */
@media screen and (max-width: 992px) {
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 2rem;
    }
    
    .hero-image {
        max-width: 300px;
        margin-bottom: 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .social-links-hero {
        justify-content: center;
    }

    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .about-image-ctr {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .image-overlay-box {
        right: 0;
        bottom: 0;
        border-radius: 0 0 var(--border-radius-lg) 0;
    }
}

@media screen and (max-width: 768px) {
    :root {
        --section-padding: 4rem 0;
    }

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

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background-color: var(--bg-secondary);
        flex-direction: column;
        justify-content: center;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.4s ease;
        padding: 2rem;
        z-index: 999;
    }

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

    .theme-toggle {
        display: none; /* Hide default desktop toggle */
    }

    .mobile-menu-controls {
        display: flex;
        z-index: 1000;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .contact-form-container {
        padding: 2rem 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    .section-title {
        font-size: 2rem;
    }
    
    .projects-grid, .skills-grid, .services-grid {
        grid-template-columns: 1fr;
    }

    .objective-box {
        padding: 2rem 1.5rem;
    }
}
