:root {
    /* Light mode colors */
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8f8f8;
    --bg-quaternary: #f8f9fa;
    --bg-tech: #f8f8f8;
    --bg-skill-tag: #f5f5f5;
    --bg-tech-tag: #e8f0ff;

    --text-primary: #2c2c2c;
    --text-secondary: #555;
    --text-tertiary: #666;
    --text-quaternary: #444;
    --text-heading: #1a1a1a;

    --accent-primary: #2c5aa0;
    --accent-secondary: #1a4480;
    --accent-success: #28a745;

    --border-primary: #e0e0e0;
    --border-secondary: #ddd;
    --border-tech-tag: #d0e2ff;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.08);

    --icon-color: #757575;
}

/* Dark mode colors */
body.dark-mode {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #1c2128;
    --bg-quaternary: #21262d;
    --bg-tech: #1c2128;
    --bg-skill-tag: #21262d;
    --bg-tech-tag: #1c3a5e;

    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --text-tertiary: #8b949e;
    --text-quaternary: #c9d1d9;
    --text-heading: #f0f6fc;

    --accent-primary: #58a6ff;
    --accent-secondary: #79c0ff;
    --accent-success: #3fb950;

    --border-primary: #30363d;
    --border-secondary: #30363d;
    --border-tech-tag: #1c3a5e;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.3);

    --icon-color: #8b949e;
}

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

body {
    font-family: 'Times New Roman', Georgia, serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-primary);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 1000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus States for Accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 18px 20px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--accent-primary);
    background: var(--bg-tertiary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 60px 0;
    text-align: center;
    border-bottom: 3px solid var(--accent-primary);
}

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 3px solid var(--border-primary);

    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;

    color: var(--icon-color);
}

.profile-img img {
    width: 90%;

    height: 90%;
    border-radius: 50%;
    object-fit: cover;
}


.header h1 {
    font-size: 2.8rem;
    margin-bottom: 8px;
    font-weight: 400;
    color: var(--text-heading);
}

.header .title {
    font-size: 1.3rem;
    color: var(--accent-primary);
    margin-bottom: 8px;
    font-weight: 600;
}

.header .location {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-style: italic;
}

.social-links {
    margin-top: 25px;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.3rem;
    margin: 0 12px;
    transition: color 0.3s;
    text-decoration: none;
}

.social-links a:hover {
    color: var(--accent-primary);
}

.nav {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: center;
    padding: 0;
}

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

.nav li {
    margin: 0;
}

.nav a {
    display: block;
    padding: 18px 30px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav a:hover,
.nav a.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    background: var(--bg-primary);
}

/* Main Content */
.main-content {
    display: flex;
    gap: 40px;
    margin: 50px 0;
}

.content {
    flex: 2;
}

.sidebar {
    flex: 1;
}

.section {
    background: var(--bg-secondary);
    padding: 40px;
    margin-bottom: 35px;
    border-radius: 0;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--accent-primary);
}

.section h2 {
    color: var(--text-heading);
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border-primary);
    padding-bottom: 12px;
}

.section h3 {
    color: var(--text-heading);
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 400;
}

.section p {
    margin-bottom: 18px;
    color: var(--text-quaternary);
    text-align: justify;
    font-size: 1.05rem;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.project {
    padding: 25px 0;
    border-bottom: 1px solid var(--border-primary);
    margin-bottom: 25px;
}

.project:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-heading);
}

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

.project-links a {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.project-links a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

.project-tech {
    background: var(--bg-tech);
    padding: 8px 0;
    margin-bottom: 15px;
    border-left: 3px solid var(--accent-primary);
    padding-left: 15px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background: var(--bg-tech-tag);
    color: var(--accent-primary);
    padding: 3px 8px;
    font-size: 0.85rem;
    border: 1px solid var(--border-tech-tag);
    font-weight: 500;
}

.project-description ul {
    padding-left: 20px;
}

.project-description li {
    margin-bottom: 8px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Experience */
.experience-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-primary);
    margin-bottom: 20px;
}

.experience-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.exp-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-heading);
}

.exp-company {
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 5px;
}

.exp-period {
    color: var(--text-tertiary);
    font-size: 0.95rem;
    font-style: italic;
}

.exp-description {
    margin-top: 12px;
}

.exp-description ul {
    padding-left: 20px;
    margin: 0;
}

.exp-description li {
    margin-bottom: 8px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Skills */
.skill-category {
    margin-bottom: 30px;
}

.skill-category h4 {
    color: var(--text-heading);
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-primary);
    padding-bottom: 5px;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: var(--bg-skill-tag);
    color: var(--text-primary);
    padding: 6px 14px;
    border: 1px solid var(--border-secondary);
    font-size: 0.9rem;
    transition: all 0.3s;
    font-family: 'Courier New', monospace;
}

.skill-tag:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* Contact */
.contact-info {
    list-style: none;
}

.contact-info li {
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    font-size: 1rem;
}

.contact-info i {
    width: 25px;
    color: var(--accent-primary);
    margin-right: 15px;
    margin-top: 2px;
}

.contact-info a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: var(--accent-primary);
}

/* Achievements */
.achievement {
    background: var(--bg-quaternary);
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid var(--accent-success);
}

.achievement-title {
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 8px;
}

.achievement-desc {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Education */
.education-item {
    background: var(--bg-tertiary);
    padding: 20px;
    border-left: 4px solid var(--accent-primary);
}

.edu-degree {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 5px;
}

.edu-school {
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 5px;
}

.edu-location {
    color: var(--text-tertiary);
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        gap: 20px;
        margin: 30px 0;
    }

    .header h1 {
        font-size: 2.2rem;
    }

    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav a {
        padding: 15px 20px;
        font-size: 0.9rem;
    }

    .section {
        padding: 25px 20px;
    }

    .container {
        padding: 0 15px;
    }

    .project-header,
    .exp-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .project-links {
        margin-top: 10px;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 0.6s forwards;
}

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

.section:nth-child(1) {
    animation-delay: 0.1s;
}

.section:nth-child(2) {
    animation-delay: 0.2s;
}

.section:nth-child(3) {
    animation-delay: 0.3s;
}

.section:nth-child(4) {
    animation-delay: 0.4s;
}

/* Styles for the narrative About section */
.about-narrative {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 800px;
    margin-bottom: 40px;
}

.about-narrative p {
    margin-bottom: 20px;
}

.about-highlight {
    color: var(--accent-primary);
    font-weight: 500;
}