/* CSS Variables for theming */
:root {
    --bg-color: #ffffff;
    --nav-bg-color: #f8f8f8;
    --border-color: #d5d5d5;
    
    /* Typography System - Light Mode */
    --text-heading: #1a1a1a;        /* Main headings (h1, h2) */
    --text-subheading: #2d2d2d;     /* Subheadings (h3, h4) */
    --text-body: #333333;           /* Body text, descriptions */
    --text-muted: #666666;          /* Secondary text, captions */
    --text-accent: #0066cc;         /* Links, highlights, CTAs */
    --text-tag: #4a4a4a;           /* Tags, labels, badges */
    
    /* Font Sizes */
    --font-heading: 3.2em;          /* Main page titles */
    --font-subheading: 2em;         /* Section headers */
    --font-subtitle: 1.4em;         /* Subsection titles */
    --font-body: 1em;               /* Normal body text */
    --font-small: 0.875em;          /* Tags, captions */
    --font-tiny: 0.75em;            /* Fine print, labels */
}

[data-theme="dark"] {
    --bg-color: #0d1117;
    --nav-bg-color: #21262d;
    --border-color: #30363d;
    
    /* Typography System - Dark Mode */
    --text-heading: #ffffff;        /* Pure white for max contrast */
    --text-subheading: #f0f6fc;     /* Bright white for subheadings */
    --text-body: #e6edf3;           /* Light gray for body text */
    --text-muted: #9198a1;          /* Muted for secondary text */
    --text-accent: #58a6ff;         /* Bright blue for accents */
    --text-tag: #7d8590;            /* Medium gray for tags */
}

body {
    margin: 0;
    width: 100%;
    font-family: 'JetBrains Mono', monospace;
    background-color: var(--bg-color);
    color: var(--text-body);
    font-size: var(--font-body);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography System */
.text-heading {
    color: var(--text-heading);
    font-size: var(--font-heading);
    font-weight: bold;
    line-height: 1.2;
}

.text-subheading {
    color: var(--text-subheading);
    font-size: var(--font-subheading);
    font-weight: bold;
    line-height: 1.3;
}

.text-subtitle {
    color: var(--text-subheading);
    font-size: var(--font-subtitle);
    font-weight: bold;
    line-height: 1.4;
}

.text-body {
    color: var(--text-body);
    font-size: var(--font-body);
    line-height: 1.6;
}

.text-muted {
    color: var(--text-muted);
    font-size: var(--font-body);
    line-height: 1.5;
}

.text-accent {
    color: var(--text-accent);
    font-weight: bold;
}

.text-tag {
    color: var(--text-tag);
    font-size: var(--font-small);
    font-weight: normal;
}

.text-small {
    color: var(--text-muted);
    font-size: var(--font-small);
    line-height: 1.4;
}

.text-tiny {
    color: var(--text-muted);
    font-size: var(--font-tiny);
    line-height: 1.3;
}
nav {
    background-color: var(--nav-bg-color);
    padding: 5px 0;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
    height: 25px;
    transition: background-color 0.3s ease;
}
nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    max-width: 800px;
    height: 1px;
    background-color: var(--border-color);
    transition: background-color 0.3s ease;
}
nav ul {
    font-family: 'JetBrains Mono', monospace;
    padding: 0px;
    list-style: none;
    font-weight: bold;
    margin: 0 auto;
    width: 70%;
    max-width: 800px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}
nav ul li {
    display: inline;
    margin: 0 10px;
}

/* Theme Switcher Styles */
#theme-switcher .theme-label {
    color: var(--text-muted);
    font-size: 0.8em;
    font-weight: normal;
    margin-right: 5px;
}

#theme-switcher a {
    padding: 3px 8px;
    border-radius: 3px;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

#theme-switcher a.active {
    background-color: var(--text-accent);
    color: var(--bg-color);
    text-decoration: none;
}

#theme-switcher a:hover {
    background-color: var(--border-color);
    text-decoration: none;
}

#theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    color: var(--text-accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--font-body);
    font-weight: bold;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    transition: color 0.3s ease;
    z-index: 1000;
    text-decoration: none;
    box-shadow: none !important;
    outline: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}
#theme-toggle:hover {
    text-decoration: underline;
}
footer ul {
    font-family: 'JetBrains Mono', monospace;
    padding: 0px;
    list-style: none;
    font-weight: bold;
}
footer ul li {
    display: inline;
    margin-right: 20px;
}
.container {
    margin: 50px auto 50px auto;
    width: 70%;
    max-width: 800px;
    padding-top: 25px;
}
a {
    text-decoration: none;
    color: var(--text-accent);
    transition: color 0.3s ease;
}
a:hover {
    text-decoration: underline;
    color: var(--text-accent);
}
h1 {
    font-size: var(--font-heading);
    color: var(--text-heading);
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
}

h2 {
    font-size: var(--font-subheading);
    color: var(--text-subheading);
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
}

h3 {
    font-size: var(--font-subtitle);
    color: var(--text-subtitle);
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
}

p {
    font-size: var(--font-body);
    color: var(--text-body);
    line-height: 1.6em;
}
footer {
    border-top: 1px solid var(--border-color);
    font-size: .8em;
    margin: 0 auto;
    width: 70%;
    max-width: 800px;
    transition: border-color 0.3s ease;
}

ul.posts { 
    margin: 20px auto 40px; 
    font-size: 1.5em;
}

ul.posts li {
    list-style: none;
}

/* Timeline Styles */
.timeline-container {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    height: 60vh;
}

/* Hide timeline toggle on desktop */
.timeline-toggle {
    display: none;
}

/* Mobile Hamburger Menu */
.hamburger-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1002;
    background: var(--nav-bg-color);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hamburger-toggle::after {
    content: '📅';
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--text-accent);
    color: var(--bg-primary);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    border: 2px solid var(--bg-primary);
}

body.timeline-page .hamburger-toggle::after {
    display: flex;
}

.hamburger-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-body);
    transition: all 0.3s ease;
    border-radius: 1px;
}

.hamburger-toggle:hover {
    background: var(--text-accent);
    border-color: var(--text-accent);
}

.hamburger-toggle:hover span {
    background: var(--bg-color);
}

.hamburger-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    background: var(--nav-bg-color);
    border-right: 2px solid var(--border-color);
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding: 20px;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-header h3 {
    color: var(--text-heading);
    margin: 0;
    font-size: var(--font-subheading);
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--text-body);
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.mobile-menu-close:hover {
    color: var(--text-accent);
}

.mobile-menu-section {
    margin-bottom: 30px;
}

.mobile-menu-section h4 {
    color: var(--text-subheading);
    margin: 0 0 15px 0;
    font-size: var(--font-subtitle);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-links li {
    margin-bottom: 10px;
}

.mobile-nav-links a {
    display: block;
    padding: 12px 15px;
    color: var(--text-body);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.mobile-nav-links a:hover,
.mobile-nav-links a:focus {
    background: var(--bg-secondary);
    color: var(--text-accent);
    transform: translateX(5px);
}

/* Timeline hint styling */
.timeline-hint {
    color: var(--text-body);
    font-size: 0.9em;
    margin: 0 0 15px 0;
    opacity: 0.8;
    font-style: italic;
}

.timeline-section h4 {
    color: var(--text-accent);
    margin-bottom: 10px;
}

.mobile-timeline-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-timeline-item:hover,
.mobile-timeline-item.active {
    background: var(--text-accent);
    color: var(--bg-color);
    border-color: var(--text-accent);
    transform: translateX(5px);
}

.mobile-timeline-item span {
    font-weight: bold;
    font-size: var(--font-body);
}

.mobile-theme-toggle {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-body);
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--font-body);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-theme-toggle:hover {
    background: var(--text-accent);
    color: var(--bg-color);
    border-color: var(--text-accent);
}

.timeline-sidebar {
    width: 200px;
    border-right: 2px solid var(--border-color);
    padding-right: 20px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding-top: 20%;
    cursor: grab;
    user-select: none;
}

.timeline-sidebar:active {
    cursor: grabbing;
}

.timeline-sidebar::before {
    content: '⇅ scroll';
    position: absolute;
    top: 10px;
    right: 5px;
    font-size: 10px;
    color: var(--border-color);
    opacity: 0.5;
    pointer-events: none;
    font-family: 'JetBrains Mono', monospace;
}

.timeline-sidebar:hover::before {
    opacity: 0.8;
}

.timeline-item {
    position: relative;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px 20px 8px 15px;
    margin: 2px 0;
    opacity: 0.4;
    transform: scale(0.8);
    border-left: 2px solid transparent;
    width: 100%;
    box-sizing: border-box;
    min-height: 40px;
    display: flex;
    align-items: center;
    z-index: 1;
}

.timeline-item.active {
    opacity: 1;
    transform: scale(1.2);
    padding: 15px 0 15px 15px;
    margin: 10px 0;
    border-left: 3px solid var(--text-accent);
    background: none;
}

.timeline-item:not(.active):hover {
    opacity: 0.6;
    transform: scale(0.85);
}

.timeline-date {
    font-weight: bold;
    color: var(--text-body);
    font-size: var(--font-body);
    transition: font-size 0.5s ease;
    flex: 1;
}

.timeline-item.active .timeline-date {
    font-size: 1.3em;
}

.timeline-dot {
    position: absolute;
    right: -11px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--border-color);
    border: 2px solid var(--border-color);
    transition: all 0.5s ease;
    pointer-events: none;
}

.timeline-item.active .timeline-dot {
    background-color: var(--text-accent);
    border-color: var(--text-accent);
    width: 24px;
    height: 24px;
    right: -15px;
}

/* Add visual separation for active item */
.timeline-item.active::before,
.timeline-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: -20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    opacity: 0.3;
}

.timeline-item.active::before {
    top: -15px;
}

.timeline-item.active::after {
    bottom: -15px;
}

/* Ensure the entire sidebar captures scroll events */
.timeline-sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: auto;
}

/* Home Page Styles */

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 0 40px 0;
    margin-bottom: 60px;
}

.hero-title {
    color: var(--text-heading);
    font-size: var(--font-heading);
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-title .highlight {
    color: var(--text-accent);
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: var(--font-subtitle);
    margin-bottom: 30px;
}

.hero-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--nav-bg-color);
    padding: 15px 25px;
    border-radius: 25px;
    margin: 0 auto;
    max-width: fit-content;
    border: 1px solid var(--border-color);
}

.status-indicator {
    font-size: 1.2em;
}

.status-text {
    color: var(--text-body);
    font-size: var(--font-body);
}

/* Skills Section */
.skills {
    padding-top: 60px;
    margin-bottom: 60px;
}

.skills h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-subheading);
    font-size: var(--font-subheading);
    font-weight: bold;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.skill-category h3 {
    color: var(--text-accent);
    margin-bottom: 15px;
    font-size: var(--font-subtitle);
    font-weight: bold;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: var(--nav-bg-color);
    color: var(--text-tag);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: var(--font-small);
    font-weight: normal;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: var(--text-accent);
    color: var(--bg-color);
    transform: translateY(-2px);
}

.stats-row {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 40px;
}

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

.stat-number {
    display: block;
    font-size: 2.5em;
    font-weight: bold;
    color: var(--text-accent);
}

.stat-label {
    color: var(--text-muted);
    font-size: var(--font-body);
}

/* Projects Section */
.projects {
    padding-top: 60px;
    margin-bottom: 60px;
}

.projects h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-subheading);
    font-size: var(--font-subheading);
    font-weight: bold;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--nav-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .project-card:hover {
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1);
}

/* Typography system handles all text contrast automatically */

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.project-header h3 {
    color: var(--text-subheading);
    margin: 0;
    font-size: var(--font-subtitle);
    font-weight: bold;
}

.project-links {
    display: flex;
    gap: 10px;
}

.project-link {
    font-size: var(--font-small);
    padding: 5px 10px;
    background: var(--text-accent);
    color: var(--bg-color);
    text-decoration: none;
    border-radius: 15px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: var(--text-subheading);
    transform: translateY(-1px);
}

.project-description {
    color: var(--text-body);
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tech-tag {
    background: var(--bg-color);
    color: var(--text-accent);
    padding: 4px 8px;
    border-radius: 10px;
    font-size: var(--font-tiny);
    border: 1px solid var(--border-color);
}

/* Quick Links Section */
.quick-links {
    padding-top: 60px;
    margin-bottom: 60px;
}

.quick-links h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: var(--font-heading);
    color: var(--text-heading);
}

.links-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.link-card {
    background: var(--nav-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 6px 16px;
    text-decoration: none;
    color: var(--text-body);
    transition: all 0.3s ease;
    font-size: var(--font-tag);
    font-weight: bold;
    white-space: nowrap;
}

.link-card:hover {
    transform: translateY(-1px);
    background: var(--text-accent);
    color: var(--bg-color);
    text-decoration: none;
}

.link-icon {
    font-size: 1.8em;
    margin-bottom: 8px;
}

.link-card h3 {
    margin: 0 0 6px 0;
    font-size: var(--font-body);
    color: var(--text-subtitle);
}

.link-card p {
    margin: 0;
    font-size: 0.75em;
    opacity: 0.8;
    line-height: 1.3;
}

/* Responsive Design */

/* Mobile First - Base styles for mobile (320px+) */
@media (max-width: 480px) {
    /* Add body padding for mobile */
    body {
        padding: 0 15px;
    }
    
    /* Show hamburger menu on mobile */
    .hamburger-toggle {
        display: flex;
    }
    
    /* Hide desktop navigation on mobile */
    nav {
        display: none;
    }
    
    /* Hide desktop timeline toggle */
    .timeline-toggle {
        display: none !important;
    }
    
    /* Hide desktop timeline overlay */
    .timeline-overlay {
        display: none !important;
    }
    
    /* Hide desktop timeline sidebar */
    .timeline-sidebar {
        display: none !important;
    }
    
    .container {
        width: 90%;
        margin: 40px auto 40px auto;
        padding: 0 20px;
    }
    
    /* Mobile navigation */
    nav {
        height: 30px;
        padding: 8px 0;
    }
    
    nav ul {
        width: 95%;
        gap: 5px;
    }
    
    nav ul li {
        margin: 0 5px;
        font-size: 0.9em;
    }
    
    nav::after {
        width: 90%;
    }
    
    .hero {
        padding: 60px 0 20px 0;
        margin-bottom: 40px;
    }
    
    .hero-title {
        font-size: 2em;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1.2em;
        margin-bottom: 20px;
    }
    
    .hero-status {
        flex-direction: column;
        text-align: center;
        padding: 12px 15px;
        gap: 8px;
    }
    
    .status-text {
        font-size: 0.9em;
    }
    
    /* Skills section mobile */
    .skills, .projects, .quick-links {
        padding-top: 40px;
    }
    
    .skills h2, .projects h2, .quick-links h2 {
        font-size: 2em;
        margin-bottom: 25px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .skill-category h3 {
        font-size: 1.1em;
    }
    
    .skill-tags {
        justify-content: center;
    }
    
    .skill-tag {
        font-size: 0.8em;
        padding: 5px 10px;
    }
    
    .stats-row {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .stat-number {
        font-size: 2em;
    }
    
    /* Projects section mobile */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .project-card {
        padding: 20px 15px;
    }
    
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .project-header h3 {
        font-size: 1.2em;
    }
    
    .project-links {
        align-self: stretch;
        justify-content: center;
    }
    
    /* Quick links mobile */
    .links-grid {
        gap: 6px;
    }
    
    .link-card {
        padding: 5px 12px;
        font-size: 0.8em;
    }
    
    /* Timeline content mobile */
    .timeline-content {
        padding: 0;
        width: 100%;
    }
    
    .timeline-content-item h2 {
        font-size: 1.4em;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* Reset mobile styles for larger screens */
@media (min-width: 481px) {
    /* Hide hamburger menu on desktop */
    .hamburger-toggle {
        display: none !important;
    }
    
    .mobile-menu-overlay {
        display: none !important;
    }
    
    .mobile-menu {
        display: none !important;
    }
    
    /* Show regular navigation on desktop */
    nav {
        display: block !important;
    }
    
    .timeline-toggle {
        display: none !important;
    }
    
    .timeline-overlay {
        display: none !important;
    }
    
    .timeline-sidebar {
        position: static !important;
        transform: none !important;
        width: 200px !important;
        height: auto !important;
        padding: 0 20px 0 0 !important;
        background: transparent !important;
        border: none !important;
        border-right: 2px solid var(--border-color) !important;
        margin-bottom: 0 !important;
        box-shadow: none !important;
        z-index: auto !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .timeline-sidebar::before {
        display: none !important;
    }
    
    .timeline-item {
        padding: 8px 20px 8px 15px !important;
        margin: 2px 0 !important;
        background: transparent !important;
        border: none !important;
        border-left: 2px solid transparent !important;
    }
    
    .timeline-date {
        font-size: 0.9em !important;
        white-space: nowrap !important;
        overflow: visible !important;
        min-width: fit-content !important;
    }
    
    .timeline-item:hover,
    .timeline-item.active {
        transform: scale(1.2) !important;
        padding: 15px 0 15px 15px !important;
        margin: 10px 0 !important;
        border-left: 3px solid var(--text-accent) !important;
        background: none !important;
    }
    
    .timeline-item.active .timeline-date {
        font-size: 1.1em !important;
    }
}

/* Tablets and small laptops (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        width: 90%;
        margin: 45px auto 45px auto;
    }
    
    .hero-title {
        font-size: 2.8em;
    }
    
    .hero-subtitle {
        font-size: 1.5em;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .stats-row {
        gap: 40px;
    }
    
    .stat-number {
        font-size: 2.2em;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .links-grid {
        gap: 10px;
    }
    
    /* Timeline for tablets */
    .timeline-container {
        height: 50vh;
    }
    
    .timeline-sidebar {
        width: 180px;
    }
}

/* Large tablets and small desktops (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        width: 85%;
    }
    
    .hero-title {
        font-size: 3.2em;
    }
    
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .links-grid {
        gap: 12px;
    }
}

/* Large desktops (1025px+) */
@media (min-width: 1025px) {
    .container {
        width: 75%;
        max-width: 1200px;
    }
    
    .hero-title {
        font-size: 3.8em;
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .links-grid {
        gap: 15px;
    }
}

.timeline-content {
    flex: 1;
    padding: 0 20px;
    overflow-y: auto;
}

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

.timeline-content-item.active {
    display: block;
}

.timeline-content-item h2 {
    color: var(--text-subheading);
    font-size: var(--font-subheading);
    font-weight: bold;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.timeline-content-item p {
    color: var(--text-body);
    margin-bottom: 20px;
    line-height: 1.6;
}

.timeline-content-item ul {
    margin-left: 20px;
}

.timeline-content-item li {
    margin-bottom: 10px;
    color: var(--text-body);
}

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

/* Scrollbar styling for timeline sidebar */
.timeline-sidebar::-webkit-scrollbar {
    width: 6px;
}

.timeline-sidebar::-webkit-scrollbar-track {
    background: var(--bg-color);
}

.timeline-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.timeline-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--text-accent);
}