/* -------------------------------------------------------------------------- */
/*                                 Variables                                  */
/* -------------------------------------------------------------------------- */
:root {
    /* Primary Palette - Light Mode Default */
    --bg-body: #f8fafc;
    /* Slate 50 */
    --bg-paper: #ffffff;
    --bg-sidebar: #0f172a;
    /* Slate 900 */

    --text-primary: #1e293b;
    /* Slate 800 */
    --text-secondary: #64748b;
    /* Slate 500 */
    --text-on-dark: #f1f5f9;
    /* Slate 100 */
    --text-muted-on-dark: #94a3b8;
    /* Slate 400 */

    --accent: #3b82f6;
    /* Blue 500 */
    --accent-hover: #2563eb;
    /* Blue 600 */
    --accent-glow: rgba(59, 130, 246, 0.3);

    --border-color: #e2e8f0;
    /* Slate 200 */
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius: 12px;

    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

[data-theme="dark"] {
    --bg-body: #020617;
    /* Slate 950 */
    --bg-paper: #0f172a;
    /* Slate 900 */
    --bg-sidebar: #020617;
    /* Slate 950 (darker than paper) or subtle variation */

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;

    --border-color: #1e293b;
    /* Slate 800 */
    --accent: #60a5fa;
    /* Blue 400 (lighter for dark mode) */
    --accent-hover: #93c5fd;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

/* -------------------------------------------------------------------------- */
/*                                   Layout                                   */
/* -------------------------------------------------------------------------- */
.resume-container {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile first: stacked */
    max-width: 1000px;
    width: 100%;
    background-color: var(--bg-paper);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

@media (min-width: 768px) {
    .resume-container {
        grid-template-columns: 380px 1fr;
        /* Sidebar | Main Content - Widened for email */
    }

    .profile-header {
        text-align: left;
        /* Keep left alignment on desktop */
    }
}

/* -------------------------------------------------------------------------- */
/*                                   Sidebar                                  */
/* -------------------------------------------------------------------------- */
.profile-section {
    background-color: var(--bg-sidebar);
    color: var(--text-on-dark);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    /* Force brighter accent in the profile section as it is always dark */
    --accent: #60a5fa;
}

/* Profile Header */
.profile-header {
    text-align: center;
    /* Center by default (mobile) */
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    /* Ensures image doesn't distort */
    margin: 0 auto 1.5rem auto;
    border: 3px solid var(--accent);
    display: block;
}



.name {
    font-family: var(--font-heading);
    font-size: 2rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.name .surname {
    color: var(--accent);
}

.title {
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted-on-dark);
    border-top: 2px solid var(--accent);
    padding-top: 1rem;
    margin-top: 1rem;
    display: inline-block;
}

/* Contact Info */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-list li a {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text-on-dark);
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.2s ease;
}

.contact-list li a:hover {
    background: var(--accent);
    color: white;
    transform: translateX(5px);
}

.contact-list i {
    width: 20px;
    text-align: center;
    color: var(--accent);
    transition: color 0.2s;
}

.contact-list li a:hover i {
    color: white;
}

/* Skills */
.skills-section h3,
.contact-info h3 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.skills-list li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
}

.skills-list li::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
    margin-right: 10px;
}

/* -------------------------------------------------------------------------- */
/*                                Main Content                                */
/* -------------------------------------------------------------------------- */
.main-content {
    background-color: var(--bg-paper);
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-primary);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--accent);
    display: inline-block;
}

.about-me p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Timeline Components (Education / Experience) */
.timeline-item {
    position: relative;
    padding-left: 30px;
    /* Increased padding for new line positioning */
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
}

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

/* The Vertical Line */
.timeline-item::after {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    /* Starts exactly at the dot's top level */
    bottom: 0;
    /* Ends at the bottom of the content */
    width: 2px;
    background-color: var(--border-color);
}

/* The Dot */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -4px;
    /* Centered on the 2px line (10px width / 2 - 2px width / 2) */
    top: 5px;
    width: 10px;
    height: 10px;
    background-color: var(--bg-paper);
    border: 2px solid var(--accent);
    border-radius: 50%;
    transition: background-color 0.2s;
    z-index: 1;
    /* Ensure dot stays on top of the line */
}

.timeline-item:hover::before {
    background-color: var(--accent);
}

.timeline-header h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.date {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background-color: var(--bg-body);
    padding: 2px 8px;
    border-radius: 4px;
    margin: 5px 0 8px 0;
    font-weight: 500;
}

.institution {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.timeline-item .description {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* -------------------------------------------------------------------------- */
/*                                    Theme Toggle                            */
/* -------------------------------------------------------------------------- */
#theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background-color: var(--bg-sidebar);
    color: var(--text-on-dark);
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
}

#theme-toggle:hover {
    transform: scale(1.1);
    background-color: var(--accent);
}

/* -------------------------------------------------------------------------- */
/*                                Responsiveness                              */
/* -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    body {
        padding: 0;
        /* Full width on mobile */
    }

    .resume-container {
        border-radius: 0;
        /* No corners on mobile */
        box-shadow: none;
    }

    .profile-section {
        padding: 2rem 1.5rem;
    }

    .main-content {
        padding: 2rem 1.5rem;
    }

    .name {
        font-size: 1.8rem;
    }
}