/* styles.css - Complete Stylesheet */

/* ========================================
   COLOR VARIABLES
   ======================================== */
:root {
    /* Primary Brand Colors */
    --primary-color: #17a2b8;           /* Main brand color (aquamarina) */
    --primary-dark: #138496;            /* Darker shade for hovers */

    /* Navigation */
    --nav-bg: #008080;                  /* Navigation background (teal) */
    --nav-text: white;                  /* Navigation text color */

    /* Borders & Accents */
    --border-color: #17a2b8;            /* Main border color */
    --border-light: #eee;               /* Light borders */

    /* Text Colors */
    --text-primary: #333;               /* Main text */
    --text-secondary: #555;             /* Secondary text */
    --text-muted: #666;                 /* Muted text */

    /* Backgrounds */
    --bg-body: #f5f5f5;                 /* Page background */
    --bg-card: white;                   /* Card/section background */
    --bg-project: #f0f9fa;              /* Project card background (light aqua tint) */

    /* Icons & Links */
    --icon-color: #17a2b8;              /* Icon color */
    --link-color: #17a2b8;              /* Link color */
    --link-hover: #138496;              /* Link hover color */
}

/* Dark Mode Variables */
body.dark-mode {
    --primary-color: #58a6ff;
    --primary-dark: #79c3fc;

    --nav-bg: #0d1117;
    --nav-text: white;

    --border-color: #58a6ff;
    --border-light: #30363d;

    --text-primary: #e0e0e0;
    --text-secondary: #c9d1d9;
    --text-muted: #8b949e;

    --bg-body: #1a1a1a;
    --bg-card: #161b22;
    --bg-project: #0d1117;

    --icon-color: #58a6ff;
    --link-color: #58a6ff;
    --link-hover: #79c3fc;
}

/* ========================================
   BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
}

/* ========================================
   HEADER
   ======================================== */
.site-header {
    background-color: var(--bg-card);
    padding: 1.5rem 2rem;
    text-align: center;
    border-bottom: 3px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

/* ========================================
   NAVIGATION
   ======================================== */
nav {
    background-color: var(--nav-bg);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex: 1;
}

nav a {
    color: var(--nav-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary-color);
}

.dark-mode-toggle {
    background: none;
    border: 2px solid var(--nav-text);
    color: var(--nav-text);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.dark-mode-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ========================================
   LAYOUT
   ======================================== */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.page {
    display: none;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: fadeIn 0.4s;
}

.page.active {
    display: block;
}

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

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* ========================================
   LINKS & ICONS
   ======================================== */
a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* ========================================
   PROFILE SECTION (HOME PAGE)
   ======================================== */
.profile-section {
    display: flex;
    gap: 2rem;
    align-items: start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border-color);
}

.bio {
    flex: 1;
    min-width: 300px;
}

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

.contact-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.contact-links a {
    font-size: 1.6rem;
    color: var(--icon-color);
    padding: 0;
    background: none;
    text-decoration: none;
    transition: color 0.2s, transform 0.2s;
}

.contact-links a:hover {
    color: var(--link-hover);
    transform: scale(1.15);
}

/* ========================================
   PUBLICATIONS (RESEARCH PAGE)
   ======================================== */
.publication {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.publication:last-child {
    border-bottom: none;
}

.publication h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.publication .authors {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.publication .venue {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.publication a {
    color: var(--link-color);
}

/* ========================================
   PROJECTS (PROJECTS PAGE)
   ======================================== */
.project {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-project);
    border-radius: 6px;
    border-left: 4px solid var(--border-color);
}

.project h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.project p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.project a {
    color: var(--link-color);
}

.project a:hover {
    text-decoration: underline;
}

/* ========================================
   CV PAGE - DOWNLOAD BUTTON
   ======================================== */
.cv-download {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

.cv-download:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(23, 162, 184, 0.4);
    text-decoration: none;
    color: white;
}

.cv-download i {
    margin-right: 0.5rem;
}

/* ========================================
   CV PAGE - TIMELINE
   ======================================== */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--primary-dark));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: flex-start;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-content {
    width: calc(50% - 40px);
    padding: 1.5rem;
    background: var(--bg-project);
    border-radius: 8px;
    border: 2px solid var(--border-color);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.timeline-content:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(23, 162, 184, 0.2);
}

.timeline-icon {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border: 4px solid var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.timeline-date {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.timeline-date.current {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    display: inline-flex;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 2px 6px rgba(23, 162, 184, 0.3);
    }
    50% {
        box-shadow: 0 4px 12px rgba(23, 162, 184, 0.5);
    }
}

.timeline-date i {
    font-size: 0.9rem;
}

/* Timeline Position Container */
.timeline-position {
    margin-bottom: 1.5rem;
    position: relative;
}

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

/* Concurrent Position Styling */
.timeline-position.concurrent {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px dashed var(--border-color);
    background: linear-gradient(to bottom, transparent 0%, var(--bg-card) 100%);
    padding: 1.5rem;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    border-radius: 6px;
}

.concurrent-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.timeline-date-inline {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
}

.timeline-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

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

.timeline-location {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.timeline-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: 0.75rem;
}

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

/* ========================================
   FOOTER
   ======================================== */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    margin-top: 3rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    /* Navigation */
    nav {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        gap: 1rem;
        flex-wrap: wrap;
    }

    /* Layout */
    .container {
        padding: 1rem;
    }

    .page {
        padding: 1.5rem;
    }

    /* Profile Section */
    .profile-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }

    .bio {
        min-width: 100%;
    }

    /* Timeline Responsive */
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        flex-direction: column !important;
        align-items: flex-start;
        padding-left: 60px;
    }

    .timeline-content {
        width: 100%;
    }

    .timeline-icon {
        left: 20px;
        transform: translateX(0);
    }

    .timeline-position.concurrent {
        margin-left: 0;
        margin-right: 0;
    }
}

/* ========================================
   DARK MODE SPECIFIC ADJUSTMENTS
   ======================================== */
body.dark-mode .timeline-content {
    background: var(--bg-project);
    border-color: var(--border-color);
}

body.dark-mode .timeline-icon {
    background-color: var(--primary-color);
    border-color: var(--bg-card);
}

body.dark-mode .timeline-position.concurrent {
    background: linear-gradient(to bottom, transparent 0%, var(--bg-card) 100%);
    border-top-color: var(--border-color);
}