html {
    scroll-behavior: smooth;
}

:root {
    --bg-color: #fdfdfd;
    --text-color: #1a1a1a;
    --text-muted: #555;
    --accent-color: #e63946;
    /* Vibrant Red */
    --font-main: 'Space Mono', monospace;
    --spacing-unit: 1rem;
    --container-width: 800px;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    background-image:
        linear-gradient(90deg, rgba(0, 0, 0, 0.08) 1px, transparent 1px),
        linear-gradient(rgba(0, 0, 0, 0.08) 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Cool background element */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(230, 57, 70, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    flex: 1;
    position: relative;
}

/* Top Bar (Language + Contacts) */
.top-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}



.top-contacts {
    display: flex;
    gap: 1rem;
}

.top-contacts a {
    color: var(--text-muted);
    text-decoration: none;
    border: none;
    transition: color 0.3s ease;
}

.top-contacts a:hover {
    color: var(--accent-color);
}

/* Navbar */
.navbar {
    margin-bottom: 4rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 1rem;
    background-color: var(--bg-color);
    padding-top: 1rem;
}

.navbar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Language Switcher */
.language-switcher {
    position: absolute;
    top: 1rem;
    right: 0;
    display: flex;
    gap: 0.3rem;
    font-size: 0.9rem;
    font-weight: 700;
}

.lang-option {
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.lang-option.active {
    color: var(--accent-color);
}

.lang-option:hover {
    color: var(--text-color);
}

.separator {
    color: var(--text-muted);
}

.navbar a {
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: none;
    transition: color 0.3s ease;
    font-weight: 700;
}

.navbar a:hover {
    color: var(--accent-color);
}

/* Header */
header {
    margin-bottom: 4rem;
    animation: fadeIn 0.8s ease-out;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    text-align: center;
}

.header-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-item svg {
    color: var(--accent-color);
}

/* Typography */
h1,
h2,
h3,
h4,
h5 {
    font-weight: 700;
    margin: 0;
    color: var(--text-color);
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
}

h2::before {
    content: '//';
    color: var(--accent-color);
    margin-right: 0.8rem;
    font-weight: 400;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid var(--text-color);
    transition: all 0.2s ease;
}

a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* Sections */
section {
    margin: 4rem 0;
    animation: slideUp 0.8s ease-out;
}

/* Education & Experience Items */
.education-item,
.job {
    margin-bottom: 3rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(0, 0, 0, 0.05);
    transition: border-left-color 0.3s ease;
}

.education-item:hover,
.job:hover {
    border-left-color: var(--accent-color);
}

.education-header,
.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.job-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.company-logo {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: contain;
    background-color: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 2px;
}

.education-subheader,
.job-subheader {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.institution,
.company {
    font-weight: 700;
    color: var(--text-color);
}

.date,
.location {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
}

.education-header h3 a,
.job-header h3 {
    border-bottom: none;
    font-size: 1.2rem;
}

.education-header h3 a:hover {
    color: var(--accent-color);
}

.company a {
    border-bottom: none;
}

/* Lists */
ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.job ul li,
.education-item ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.job ul li::before,
.education-item ul li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: 700;
}

/* Tables */
.course-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.course-table th,
.course-table td {
    border: 1px solid #eee;
    padding: 10px;
}

.course-table th {
    background-color: #f9f9f9;
    text-align: left;
    font-weight: 700;
}

/* Projects List */
#projects ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

#projects ul li {
    background: #fff;
    padding: 1.5rem;
    border: 1px solid #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#projects ul li:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: var(--accent-color);
}

#projects h3 {
    /* Assuming h3 inside li for project title if structured that way, else a tag */
    margin-bottom: 0.5rem;
}

#projects a {
    font-weight: 700;
    border-bottom: none;
    display: inline-block;
    margin-bottom: 0.5rem;
}

#projects p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.all-projects {
    display: inline-block;
    margin-top: 2rem;
    font-weight: 700;
}

/* Contacts Section */
#contacts {
    text-align: center;
    margin-bottom: 6rem;
}

#contacts ul {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

#contacts li {
    list-style: none;
}

#contacts a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    border-bottom: none;
    color: var(--text-color);
    transition: all 0.3s ease;
}

#contacts a:hover {
    color: var(--accent-color);
    transform: translateY(-5px);
}

#contacts svg {
    width: 40px;
    height: 40px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

#contacts a:hover svg {
    transform: scale(1.1);
}

#contacts span {
    font-weight: 700;
    font-size: 1.1rem;
}

/* Footer */
footer {
    margin-top: auto;
    padding-top: 4rem;
    padding-bottom: 2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
    opacity: 0.7;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    .navbar ul {
        flex-direction: column;
        gap: 0.8rem;
    }

    .top-bar {
        justify-content: space-between;
    }

    header h1 {
        font-size: 2rem;
    }

    .education-header,
    .job-header,
    .education-subheader,
    .job-subheader {
        flex-direction: column;
        align-items: flex-start;
    }

    #projects ul {
        grid-template-columns: 1fr;
    }
}

/* Disabled links */
a.disabled {
    pointer-events: none;
    color: var(--text-muted);
    border-bottom: 1px dashed var(--text-muted);
}

/* Tech Tags */
.tech-stack {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.tech-tag {
    font-size: 0.75rem;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: var(--text-muted);
    font-family: var(--font-main);
}