/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00bcd4;
    --primary-dark: #0097a7;
    --secondary-color: #ff6b35;
    --accent-color: #4caf50;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-light: #bdc3c7;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #ecf0f1;
    --border-color: #e1e8ed;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

a,
button {
    min-width: 44px;
    min-height: 44px;
}

/* ===========================
   SIDEBAR STYLES
   =========================== */

.sidebar {
    width: 280px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem 1.5rem;
    position: fixed;
    height: 100vh;
    z-index: 100;
    box-shadow: var(--shadow-medium);
}

.profile {
    text-align: center;
    margin-bottom: 3rem;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.profile-pic:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
}

.profile h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.rotating-text {
    font-weight: 500;
    color: var(--primary-color);
    margin-top: 0.5rem;
    min-height: 1.5em;
    font-size: 1.1rem;
}

/* Navigation */
nav ul {
    list-style: none;
    margin-bottom: 2rem;
}

nav li {
    margin: 0.5rem 0;
}

nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    display: block;
    transition: var(--transition);
    position: relative;
}

nav a:hover,
nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(5px);
}

nav a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Contact Links */
.contact-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: auto;
}

.contact-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 0.75rem;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-links a:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* ===========================
   MAIN CONTENT STYLES
   =========================== */
.main-content {
    flex: 1;
    margin-left: 280px;
    overflow-y: auto;
    background: var(--bg-secondary);
}

.section {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-primary);
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

/* ===========================
   HOME PAGE STYLES
   =========================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    /* linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    overflow: hidden;
}

.hero-profile-wrapper {
    width: 160px;
    /* outer circle size */
    height: 160px;
    border: 4px solid navy;
    /* navy border */
    border-radius: 50%;
    /* makes it circular */
    overflow: hidden;
    /* ensures image fits inside circle */
    margin: 15px auto;
    /* centers under the text */
}

.hero-profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* fills the circle without stretching */
    display: block;
}


.time-series-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 2rem;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
}

.highlight {
    background: linear-gradient(45deg, #0f4c75, #2c3e50);
    /* linear-gradient(45deg, var(--primary-color), var(--secondary-color)); */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    opacity: 0.8;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.cta-button {
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cta-button.primary {
    background: var(--primary-color);
    color: white;
}

.cta-button.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.cta-button.secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cta-button.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    animation: fadeInUp 1s ease-out 0.8s both;
}

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

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Logos Section */
.logos-section {
    padding: 4rem 2rem;
    background: var(--bg-primary);
    text-align: center;
}

.logos-section h2 {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 500;
}

.logos-carousel {
    overflow: hidden;
    position: relative;
    height: 80px;
}

.logos-track {
    display: flex;
    animation: scroll 20s linear infinite;
    gap: 3rem;
    align-items: center;
}

.logo-item {
    flex-shrink: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: var(--transition);
}

.logo-item:hover {
    opacity: 1;
    transform: scale(1.1);
}

.logo-item img {
    height: 100%;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%);
    transition: var(--transition);
}

.logo-item:hover img {
    filter: grayscale(0%);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Quick Links */
.quick-links {
    padding: 4rem 2rem;
    background: var(--bg-primary);
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.quick-link {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

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

.link-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.quick-link h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.quick-link p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===========================
   CONTENT PAGES STYLES
   =========================== */
.content-header {
    text-align: center;
    padding: 4rem 2rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    margin-bottom: 3rem;
}

.content-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.content-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.content-grid {
    padding: 0 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===========================
   CARD COMPONENTS
   =========================== */
.blog-grid,
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.content-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.content-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

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

.card-overlay {
    position: absolute;
    top: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(45deg, transparent, rgba(0, 0, 0, 0.3));
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    width: 100%;
    height: 100%;
}

.read-time {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

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

.project-links a {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.project-links a:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.card-content {
    padding: 1.5rem;
}

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

.date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

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

.tag,
.tech-tag {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tech-tag {
    background: rgba(0, 188, 212, 0.1);
    color: var(--primary-dark);
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.card-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.card-content h3 a:hover {
    color: var(--primary-color);
}

.summary {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--primary-dark);
}

.project-status {
    margin-top: 1rem;
}

.status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status.completed {
    background: rgba(76, 175, 80, 0.1);
    color: var(--accent-color);
}

.status.in-progress {
    background: rgba(255, 107, 53, 0.1);
    color: var(--secondary-color);
}

/* ===========================
   ABOUT PAGE STYLES
   =========================== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.about-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.about-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* ---------------- Personal Section ---------------- */
/* ---------------- Hobbies / Chips ---------------- */
.hobbies-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.hobbies-list span {
    background: var(--primary-color, #4f46e5);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.hobbies-list span:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.hobbies-list span img {
    width: 20px;
    /* adjust the size of the GIF */
    height: 20px;
    margin-right: 0.5rem;
    /* space between GIF and text */
    vertical-align: middle;
    /* align with text */
}

.personal-section {
    margin-top: 4rem;
    padding: 2rem;
    background: var(--bg-tertiary, #f9f9f9);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light, 0 2px 10px rgba(0, 0, 0, 0.05));
}

.personal-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}

/* Photo Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    justify-items: center;
}

.photo-grid img {
    width: 100%;
    max-width: 200px;
    border-radius: 15px;
    object-fit: cover;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.photo-slide {
    position: relative;
    width: 100%;
    max-width: 200px;
    border-radius: 15px;
    overflow: hidden;

    /* NEW */
    aspect-ratio: 4 / 8;
    /* width / height ratio */
}



.photo-slide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

/* Landscape images: fill width (like you wanted) */
.photo-slide img.landscape {
    width: 100%;
    /* height: auto; */
    object-fit: cover;
}


.photo-slide img.active {
    opacity: 1;
}


.photo-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Hobbies List Styling */
.personal-section ul {
    list-style: none;
    padding-left: 0;
    margin-top: 1rem;
}

.personal-section ul li {
    margin-bottom: 0.8rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Optional: Add subtle separation line */
.personal-section::before {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 0 auto 2rem auto;
    border-radius: 2px;
}


/* ===========================
   CONTACT PAGE STYLES
   =========================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.1);
}

.form-response {
    font-size: 1.5rem;
    /* Bigger text */
    font-weight: 600;
    /* Bold */
    color: #00bcd4;
    /* Nice blue, can change */
    margin-top: 1rem;
    /* Space from form */
    text-align: center;
    /* Centered */
    opacity: 0;
    /* Start invisible */
    transition: opacity 0.5s ease;
}

.form-response.show {
    opacity: 1;
    /* Fade in */
}

.submit-button {
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.submit-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.contact-info h3 {
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.contact-method:hover {
    background: var(--bg-tertiary);
    transform: translateX(5px);
}

.method-icon {
    font-size: 1.5rem;
    width: 50px;
    text-align: center;
}

.contact-method strong {
    display: block;
    margin-bottom: 0.25rem;
}

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

.form-response {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(76, 175, 80, 0.1);
    color: var(--accent-color);
    display: none;
}

.form-response.show {
    display: block;
}

/* ===========================
   BLOG POST STYLES
   =========================== */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.blog-post header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.blog-post header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.blog-post header .meta {
    color: var(--text-secondary);
    font-size: 1rem;
}

.blog-post article {
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.blog-post article p {
    margin-bottom: 1.5rem;
}

.blog-post article h2,
.blog-post article h3,
.blog-post article h4 {
    margin: 2rem 0 1rem 0;
    color: var(--text-primary);
}

.references {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.references h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.references ol {
    padding-left: 2rem;
    color: var(--text-secondary);
}

.references li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

/* ===========================
   BLOG POST STYLES
   =========================== */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.blog-post header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.blog-post header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.blog-post header .meta {
    color: var(--text-secondary);
    font-size: 1rem;
}

.blog-post article {
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.blog-post article p {
    margin-bottom: 1.5rem;
}

.blog-post article h2,
.blog-post article h3,
.blog-post article h4 {
    margin: 2rem 0 1rem 0;
    color: var(--text-primary);
}

.references {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.references h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.references ol {
    padding-left: 2rem;
    color: var(--text-secondary);
}

.references li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

/* ===========================
   TIMELINE STYLES (EXISTING)
   =========================== */
.main-wrapper {
    flex: 1;
    overflow-y: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.main-wrapper::-webkit-scrollbar {
    display: none;
}

.timeline {
    position: relative;
    width: 100%;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    margin-top: 14rem;
    /* Increased from 8rem to give more space */
    min-height: 200vh;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ccc;
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-progress {
    position: absolute;
    left: 50%;
    top: 0;
    width: 4px;
    height: 0;
    background: var(--primary-color);
    transform: translateX(-50%);
    z-index: 2;
    transition: height 0.1s ease-out;
}

.timeline-headers {
    position: fixed;
    top: 0;
    left: 280px;
    right: 0;
    z-index: 1000;
    transform: translateX(+30px);
    background: #ffffff;
    padding: 1rem 2rem;
    box-shadow: var(--shadow-light);
}

.timeline-headers-inner {
    max-width: 800px;
    margin: 0 auto;
    /* Shift header left by 30px - adjust this value as needed */
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-main-header {
    text-align: center;
    background: var(--bg-primary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    transform: translateX(-155px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.timeline-main-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: #333;
    transform: translateX(-5%);
    font-weight: 700;
}

.timeline-instructions {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

.timeline-section-headers {
    display: grid;
    grid-template-columns: 1fr 4px 1fr;
    gap: 0;
    transform: translateX(-155px);
    align-items: center;
    position: relative;
}

.timeline-section-headers::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 60%;
    background: var(--primary-color);
    border-radius: 2px;
    z-index: 1;
}

.timeline-header {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

.timeline-header.left {
    grid-column: 1;
}

.timeline-header.right {
    grid-column: 3;
}

.timeline-item {
    position: absolute;
    width: 45%;
    z-index: 10;
}

.timeline-item.left {
    right: 55%;
}

.timeline-item.right {
    left: 55%;
}

.timeline-content {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    border-left: 4px solid var(--primary-color);
    position: sticky;
    top: 160px;
    transition: var(--transition);
    z-index: 10;
    min-height: 60px;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.timeline-content-text {
    flex: 1;
    min-width: 0;
}

.timeline-content:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.timeline-content.left {
    text-align: right;
    border-left: none;
    border-right: 4px solid var(--primary-color);
    flex-direction: row-reverse;
}

.timeline-content.left .timeline-content-text {
    text-align: right;
}

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

.timeline-content .company {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-content .duration {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.timeline-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}

.timeline-year-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 20;
    white-space: nowrap;
}

/* Timeline Popup */
.timeline-popup {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 350px;
    max-width: 90vw;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    border-left: 4px solid var(--primary-color);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    max-height: 80vh;
    overflow-y: auto;
}

.timeline-popup.visible {
    opacity: 1;
    visibility: visible;
}

.timeline-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.timeline-popup-nav {
    display: flex;
    gap: 0.5rem;
}

.timeline-popup-nav button {
    background: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    color: white;
}

.timeline-popup-nav button:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.timeline-popup-nav button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.timeline-popup-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.timeline-popup-close:hover {
    color: var(--secondary-color);
}

.timeline-popup-content {
    padding: 1.5rem;
}

.timeline-popup-content .logo {
    width: 96px;
    height: 96px;
    object-fit: contain;
    margin-bottom: 1rem;
    border-radius: 6px;
}

.timeline-popup-content h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.3rem;
}

.timeline-popup-content .company {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.timeline-popup-content .location {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    padding: 0.4rem 0.6rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    border-left: 3px solid var(--accent-color);
}

.timeline-popup-content .duration {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.timeline-popup-content .description {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.timeline-popup-content .skills {
    margin-top: 1rem;
}

.timeline-popup-content .skills h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.timeline-popup-content .skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-popup-content .skill-tag {
    background: rgba(0, 188, 212, 0.1);
    color: var(--primary-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.timeline-content.active {
    border-left-color: var(--secondary-color);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
    transform: translateY(-2px);
}

.timeline-content.active.right {
    border-right-color: var(--secondary-color);
    border-left-color: transparent;
}

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animated-text {
    background: linear-gradient(45deg, #0f4c75, #2c3e50);
    /* linear-gradient(45deg, var(--primary-color), var(--secondary-color)); */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: navy;
    /* 🔵 change to navy */
    position: fixed;
    top: 0rem;
    left: -0.2rem;
    z-index: 3000;
    /* above sidebar */
}

@media (max-width: 1024px) {
    .sidebar {
        width: 250px;
    }

    .main-content {
        margin-left: 250px;
    }

    .timeline-headers {
        left: 250px;
    }

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

/* On desktop, hide the toggle button */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
}


@media (max-width: 768px) {

    /* .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1rem;
    } */
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        /* off screen by default */
        width: 80%;
        height: 100%;
        background: #0f172a;
        transition: left 0.3s ease;
        z-index: 2000;
        overflow-y: auto;
    }

    .sidebar.open {
        left: 0;
        /* slide in */
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 2rem;
        color: navy;
        cursor: pointer;
        margin: 1rem;
    }

    .main-content {
        margin-left: 0;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .content-header h1 {
        font-size: 2rem;
    }

    .blog-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .timeline-headers {
        left: 0;
        padding: 1rem;
    }

    .timeline {
        margin-top: 14rem;
    }

    .timeline-section-headers {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .timeline-section-headers::before {
        display: none;
    }

    .timeline-header.left,
    .timeline-header.right {
        grid-column: 1;
    }

    .timeline-line {
        left: 15%;
        transform: none;
    }

    .timeline-progress {
        left: 15%;
        transform: none;
    }

    .timeline-item {
        width: 85%;
        left: 10% !important;
        right: auto !important;
    }

    .timeline-content {
        text-align: left !important;
        border-left: 4px solid var(--primary-color) !important;
        border-right: none !important;
        top: 160px;
    }

    .timeline-year-marker {
        left: 15%;
        transform: none;
    }

    .timeline-popup {
        right: 15px;
        left: 15px;
        width: auto;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 2rem 1rem;
        margin-bottom: 1rem;
    }

    .menu-toggle {
        display: block;
    }


    .hero-content {
        padding: 1rem;
    }

    .content-grid {
        padding: 0 1rem 2rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .quick-links {
        padding: 2rem 1rem;
    }
}