/* Theme variables */
:root {
    /* Light theme (default) */
    --bg-color: white;
    --text-color: #333;
    --header-bg: #fff;
    --header-border: #eee;
    --link-color: #0077cc;
    --link-hover: #005fa3;
    --left-column-bg: #f9f9f9;
    --left-column-border: #eee;
    --timeline-border: #0077cc;
    --timeline-personal-color: #28a745;
    --timeline-content-bg: #f9f9f9;
    --timeline-content-shadow: rgba(0, 0, 0, 0.1);
    --work-filter-bg: rgba(0, 119, 204, 0.1);
    --personal-filter-bg: rgba(40, 167, 69, 0.1);
    --modal-overlay: rgba(0, 0, 0, 0.8);
    --modal-bg: #fefefe;
    --modal-shadow: rgba(0, 0, 0, 0.2);
}

/* Dark theme */
[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --header-bg: #1e1e1e;
    --header-border: #333;
    --link-color: #64b5f6;
    --link-hover: #90caf9;
    --left-column-bg: #1e1e1e;
    --left-column-border: #333;
    --timeline-border: #64b5f6;
    --timeline-personal-color: #4caf50;
    --timeline-content-bg: #262626;
    --timeline-content-shadow: rgba(0, 0, 0, 0.3);
    --work-filter-bg: rgba(100, 181, 246, 0.2);
    --personal-filter-bg: rgba(76, 175, 80, 0.2);
    --modal-overlay: rgba(0, 0, 0, 0.9);
    --modal-bg: #262626;
    --modal-shadow: rgba(0, 0, 0, 0.4);
}

/* Clean, paper-like design with two-column layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
    padding: 0;
}

/* Header styles */
.main-header {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s, border-color 0.3s;
}

.main-header nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-header nav li {
    padding: 0;
}

.main-header nav a {
    display: block;
    padding: 1rem 2rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.2s ease;
}

.main-header nav a:hover {
    background-color: rgba(128, 128, 128, 0.1);
    color: var(--link-hover);
}

.main-header nav li.active a {
    color: var(--link-color);
    border-bottom: 3px solid var(--link-color);
}

/* Theme toggle button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    margin-right: 1.5rem;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: background-color 0.3s;
}

.theme-toggle:hover {
    background-color: rgba(128, 128, 128, 0.1);
}

.theme-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--link-color);
}

/* Two-column layout */
.two-column-layout {
    display: flex;
    min-height: calc(100vh ); /* Adjusted to make room for header */
    width: 100%;
    padding-top: 50px;
}

.column {
    padding: 2rem;
}

/* Left column: Profile and contacts */
.left-column {
    flex: 0 0 400px;
    background-color: var(--left-column-bg);
    border-right: 1px solid var(--left-column-border);
    /* text-align: center; */
    display: flex;
    flex-direction: column;
    /* position: sticky; */
    top: 50px; /* Same as header height */
    /* height: calc(100vh - 50px); Viewport height minus header */
    overflow-y: auto;
    transition: background-color 0.3s, border-color 0.3s;
}

.left-column h1 {
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
}

.profile-image {
    margin: 0 auto 0;
    /* width: 300px;
    height: 300px; */
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.social-links {
    padding-top: 2rem;
}

.social-links h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: #555;
}

.social-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background-color: #ddd;
    color: #333;
    text-align: center;
    line-height: 40px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    transform: scale(1.1);
    background-color: #bbb;
    color: #fff;
}

/* Font Awesome icon styles */
.fab, .fa {
    font-size: 20px;
    line-height: 40px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Dark mode styles for social icons */
body.dark-mode .social-links a {
    background-color: #555;
    color: #eee;
}

body.dark-mode .social-links a:hover {
    background-color: #777;
    color: #fff;
}

a {
    text-decoration: none;
    color: var(--link-color);
    font-weight: bold;
    transition: color 0.2s;
    font-size: 1.1rem;
}

a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Right column: Description */
.right-column {
    flex: 1;
    padding: 3rem 1rem 1rem 1rem;
    overflow-y: auto;
    height: calc(100vh - 50px); /* Viewport height minus header */
}

/* Timeline styles */
.timeline-container h2 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: #444;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

/* Timeline filters */
.timeline-filters {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.filter-option input {
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

.filter-option span {
    font-weight: 500;
}

.filter-option.work {
    background-color: var(--work-filter-bg);
    transition: background-color 0.3s;
}

.filter-option.work span {
    color: var(--link-color);
    transition: color 0.3s;
}

.filter-option.personal {
    background-color: var(--personal-filter-bg);
    transition: background-color 0.3s;
}

.filter-option.personal span {
    color: var(--timeline-personal-color);
    transition: color 0.3s;
}

.timeline {
    position: relative;
    padding: 0 0 0 2rem;
}

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

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

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--bg-color);
    border: 2px solid var(--timeline-border);
    z-index: 1;
    transition: background-color 0.3s, border-color 0.3s;
}

/* Personal timeline items */
.timeline-item.personal::before {
    border-color: var(--timeline-personal-color);
}

.timeline-item.personal .timeline-date {
    color: var(--timeline-personal-color);
}

.timeline-item.personal .timeline-content {
    border-left: 3px solid var(--timeline-personal-color);
}

.timeline-date {
    font-weight: bold;
    color: var(--link-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    transition: color 0.3s;
}

h1, h2, h3 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

/* Make timeline h3 elements brighter in dark mode */
[data-theme="dark"] .timeline-item h3 {
    color: #ffffff;
}

.timeline-content {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
    background-color: var(--timeline-content-bg);
    padding: 1.5rem;
    border-radius: 5px;
    box-shadow: 0 1px 3px var(--timeline-content-shadow);
    border-left: 3px solid var(--timeline-border);
    transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.timeline-text-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.timeline-content h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: #333;
}

.timeline-content p {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
}

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

.timeline-images-column {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Timeline images */
.timeline-images {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    max-width: 200px; /* Limits how wide the row of images can get */
}

.timeline-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 4px;
    transition: transform 0.2s;
}

.timeline-thumbnail:hover {
    transform: scale(1.05);
}

/* Modal styles */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: var(--modal-overlay);
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.modal-content {
    position: relative;
    background-color: var(--modal-bg);
    margin: 0;
    padding: 0;
    width: 95%;
    height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px 0 var(--modal-shadow), 0 6px 20px 0 var(--modal-shadow);
    animation: modalopen 0.3s;
    border-radius: 4px;
    overflow: hidden;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.modal-columns {
    display: flex;
    width: 100%;
    height: 100%;
}

.modal-main-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    height: 100%;
    position: relative;
}

.modal-thumbnails {
    width: 150px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    height: 100%;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.thumbnails-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-thumbnail {
    width: 100%;
    height: auto;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.modal-thumbnail:hover {
    transform: scale(1.05);
}

.modal-thumbnail.active {
    border-color: var(--link-color);
}

.modal-close-container {
    position: absolute;
    top: 10px;
    right: 20px;
    display: flex;
    align-items: center;
    z-index: 1001;
}

.modal-close {
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    text-shadow: 0 0 3px black;
    background-color: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-esc-hint {
    color: white;
    font-size: 12px;
    margin-left: 5px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 3px 6px;
    border-radius: 3px;
    text-shadow: 0 0 2px black;
}

.modal-close:hover {
    color: #ccc;
}

#modalImage {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    width: auto;
    height: auto;
}

@keyframes modalopen {
    from {opacity: 0; transform: scale(0.9);}
    to {opacity: 1; transform: scale(1);}
}

/* Timeline loading and error states */
.timeline-loading {
    text-align: center;
    padding: 2rem;
    color: #777;
    font-style: italic;
}

.timeline-error {
    text-align: center;
    padding: 2rem;
    color: #d9534f;
    background-color: rgba(217, 83, 79, 0.1);
    border-radius: 5px;
    margin: 1rem 0;
}

/* Tooltip for skills */
.tooltip {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    white-space: nowrap;
    z-index: 20;
}

[data-theme="dark"] .tooltip {
    background-color: rgba(255, 255, 255, 0.8);
    color: black;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .two-column-layout {
        flex-direction: column;
    }
    
    .left-column {
        flex: 0 0 auto;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    /* Timeline content stacks vertically on mobile */
    .timeline-content {
        flex-direction: column;
    }
    
    .timeline-images-column {
        align-items: flex-start;
        margin-top: 15px;
    }
    
    .timeline-images {
        max-width: 100%;
    }
    
    /* Modal adjustments for mobile */
    .modal-columns {
        flex-direction: column;
    }
    
    .modal-thumbnails {
        width: 100%;
        max-height: 120px;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .thumbnails-container {
        flex-direction: row;
    }
    
    .modal-thumbnail {
        width: 80px;
        height: 80px;
        object-fit: cover;
    }
}
