/* =========================================
   1. VARIABLES & THEMES
   Change colors here to customize the look.
   ========================================= */
:root {
    /* --- Light Mode Colors --- */
    --bg-color: #f4f4f5;         /* Main background */
    --card-bg: #ffffff;          /* Card background */
    --text-primary: #18181b;     /* Main text color */
    --text-secondary: #52525b;   /* Subtitles/dates */
    --accent-color: #2563eb;     /* Links/Buttons highlight */
    --border-color: #e4e4e7;     /* Borders */
    
    /* --- Layout & Fonts --- */
    --max-width: 900px;          /* Width of the central content column */
    --radius: 12px;              /* Rounded corners size */
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --- Dark Mode Overrides --- */
/* These colors apply when the 'dark-mode' class is added to body */
body.dark-mode {
    --bg-color: #09090b;         /* Very dark background (almost black) */
    --card-bg: #18181b;          /* Slightly lighter for cards */
    --text-primary: #fafafa;     /* White text */
    --text-secondary: #a1a1aa;   /* Grey text */
    --accent-color: #60a5fa;     /* Lighter blue for dark mode */
    --border-color: #27272a;     /* Dark borders */
}

/* =========================================
   2. GLOBAL RESET & BASE STYLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth theme transition */
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    padding: 20px;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* =========================================
   3. LAYOUT & NAVIGATION
   ========================================= */
.container {
    max-width: var(--max-width);
    margin: 0 auto; /* Centers content */
    padding-top: 40px;
}

.navbar {
    display: flex;
    justify-content: flex-end; /* Aligns links to right */
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 0;
    gap: 20px;
}

.nav-links a {
    margin-left: 20px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.nav-links a:hover { color: var(--accent-color); }

/* Theme Toggle Button */
#theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle:hover { background-color: var(--card-bg); }

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 60px 0;
    gap: 40px;
}

/* Mobile: Stack hero vertically */
@media (max-width: 768px) {
    .hero { flex-direction: column-reverse; text-align: center; }
    .hero-actions { justify-content: center; }
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.hero .subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero .bio {
    max-width: 500px;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.hero-image img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 20px;
    transform: rotate(3deg); /* Slight tilt effect */
    border: 4px solid var(--card-bg);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.2);
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--text-primary);
    color: var(--bg-color);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    margin-right: 15px;
}

.social-link {
    margin-right: 15px;
    font-weight: 500;
    color: var(--text-secondary);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 20px; /* Space between the resume button and icons */
}

.social-icon {
    font-size: 1.6rem; /* Sets the size of the icons */
    color: var(--text-muted); /* Grey by default */
    transition: color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
}

.social-icon:hover {
    color: var(--text-main); /* Turns white/black on hover */
    transform: translateY(-2px); /* Slight lift effect */
}

/* =========================================
   5. WORK / EDUCATION TOGGLE
   ========================================= */
.experience-section {
    margin: 60px 0;
}

.toggle-container {
    background-color: var(--card-bg);
    display: inline-flex;
    padding: 5px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.toggle-btn {
    background: none;
    border: none;
    padding: 8px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s;
}

/* The active button style */
.toggle-btn.active {
    background-color: var(--bg-color);
    color: var(--text-primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Toggle Logic: Hide/Show */
.list-content { display: none; }
.active-content { display: block; animation: fadeIn 0.4s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* List Items (Cards) */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.list-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.list-header h3 { font-size: 1.1rem; }
.list-header .date { font-size: 0.9rem; color: var(--text-secondary); }
.role { font-weight: 500; color: var(--accent-color); margin-bottom: 15px; }

.achievements li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 15px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.achievements li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* =========================================
   6. PROJECTS GRID
   ========================================= */
.projects-section h2 {
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: 25px;
}

.project-card {
    padding: 0; /* Remove default card padding for image flush */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.project-info { padding: 20px; }
.project-info h3 { margin-bottom: 10px; }
.project-info p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 15px; }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tags span {
    background-color: var(--bg-color);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-sm {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 6px;
    margin-right: 8px;
    background-color: var(--bg-color);
}
.btn-sm:hover { border-color: var(--accent-color); color: var(--accent-color); }

/* =========================================
   7. FOOTER
   ========================================= */
footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

/* --- Timeline Layout --- */

/* The Container */
.timeline-wrapper {
    position: relative;
    padding-left: 10px; /* Slight offset */
}

/* The Vertical Line */
/* We draw a line down the left side of the wrapper */
.timeline-wrapper::before {
    content: '';
    position: absolute;
    top: 15px; /* Starts slightly below the top */
    bottom: 0;
    left: 35px; /* Aligns with the center of the logos (50px width / 2 + padding) */
    width: 2px;
    background-color: var(--border-color); /* Uses your existing grey border color */
    z-index: 0;
}

/* Individual Item Container */
.timeline-item {
    display: flex;
    gap: 25px; /* Space between Logo and Text */
    margin-bottom: 40px; /* Space between different jobs */
    position: relative;
    z-index: 1;
}

/* Left Column (Logo) */
.timeline-left {
    flex-shrink: 0; /* Prevents logo from shrinking */
    width: 50px;
}

.timeline-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--card-bg); /* Prevents line showing through transparent logos */
    border: 2px solid var(--card-bg); /* Tiny border to clean edges */
    position: relative; 
    z-index: 2; /* Sits ON TOP of the vertical line */
}

/* Right Column (Content) */
.timeline-right {
    flex-grow: 1;
    padding-top: 5px; /* Aligns text slightly better with logo center */
}

/* Header Row (Title + Date) */
.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.timeline-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.timeline-header .date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: nowrap; /* Keeps date on one line */
    margin-left: 15px;
}

/* Role & Bullets */
.role {
    font-size: 1rem;
    color: var(--text-secondary); /* Often slightly lighter than title */
    margin-bottom: 10px;
    font-weight: 500;
}

.achievements {
    margin-bottom: 15px;
}

.achievements li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.5;
}

/* --- Pill Buttons (The white buttons in your screenshot) --- */
.timeline-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-pill {
    background-color: var(--bg-body); /* Or white in dark mode */
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 20px; /* High radius makes it a 'pill' */
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-pill:hover {
    background-color: var(--border-color); /* Slight darken on hover */
}

/* Ensure Dark Mode variables work for these pill buttons */
body.dark-mode .btn-pill {
    background-color: #ffffff; /* White button in dark mode as per screenshot */
    color: #000000;
    border: none;
}