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

/* Light theme (default) */
:root {
    --primary-bg: #FAF6E9;
    --secondary-bg: #547792;
    --text-color: #333;
    --accent-color: #547792;
    --light-text: #FAF6E9;
    --card-bg: #ffffff;
    --shadow-color: rgba(84, 119, 146, 0.2);
    --transition-speed: 0.3s;
    --footer-bg: #3f5b71;
    --footer-text: #FAF6E9;
}

/* System dark mode — auto applies on all OS/browsers */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-bg: #1E2A38;
        --secondary-bg: #283C4F;
        --text-color: #E1E1E1;
        --accent-color: #68A4D8;
        --light-text: #E1E1E1;
        --card-bg: #243142;
        --shadow-color: rgba(0, 0, 0, 0.4);
        --footer-bg: #1a2532;
    }
}

/* Manual override: user picked light */
[data-theme="light"] {
    --primary-bg: #FAF6E9;
    --secondary-bg: #547792;
    --text-color: #333;
    --accent-color: #547792;
    --light-text: #FAF6E9;
    --card-bg: #ffffff;
    --shadow-color: rgba(84, 119, 146, 0.2);
    --footer-bg: #3f5b71;
    --footer-text: #FAF6E9;
}

/* Manual override: user picked dark */
[data-theme="dark"] {
    --primary-bg: #1E2A38;
    --secondary-bg: #283C4F;
    --text-color: #E1E1E1;
    --accent-color: #68A4D8;
    --light-text: #E1E1E1;
    --card-bg: #243142;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --footer-bg: #1a2532;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    min-height: 100vh;
    background-color: var(--primary-bg);
    transition: background-color var(--transition-speed) ease;
}

.cv-container {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background-color: var(--secondary-bg);
    color: var(--light-text);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-speed) ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Toggle icon: show moon by default (light), sun when dark */
.theme-toggle .fa-sun {
    display: none;
}

@media (prefers-color-scheme: dark) {
    .theme-toggle .fa-moon {
        display: none;
    }
    .theme-toggle .fa-sun {
        display: block;
    }
}

[data-theme="light"] .theme-toggle .fa-moon {
    display: block;
}
[data-theme="light"] .theme-toggle .fa-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    display: none;
}
[data-theme="dark"] .theme-toggle .fa-sun {
    display: block;
}

/* Header */
.cv-header {
    height: 150px;
    background-color: var(--card-bg);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 4px 10px -2px var(--shadow-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 60px;
    transition: background-color var(--transition-speed) ease;
}

.cv-header h1 {
    font-size: 43px;
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    position: relative;
}

.cv-header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 18px;
    position: relative;
    transition: color var(--transition-speed) ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a i {
    font-size: 16px;
    opacity: 0.9;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width var(--transition-speed) ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent-color);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* Layout */
.main-content {
    display: flex;
    flex: 1;
}

.left-column {
    flex-basis: 60%;
    background-color: var(--primary-bg);
    padding: 100px 40px 60px 100px;
    transition: background-color var(--transition-speed) ease;
}

/* Name Section */
.name-section {
    margin-bottom: 60px;
    text-align: center;
}

.name-section h2 {
    font-size: 64px;
    color: var(--text-color);
    font-weight: bold;
    padding-bottom: 10px;
}

.name-underline {
    border: none;
    height: 8px;
    background-color: var(--accent-color);
    margin: 0 auto 20px;
    width: 60%;
    max-width: 400px;
    display: block;
    border-radius: 4px;
}

.name-section .title {
    font-size: 64px;
    color: var(--text-color);
    opacity: 0.8;
    font-weight: normal;
    text-align: center;
    margin-top: -10px;
}

/* Sections */
.cv-section {
    margin-bottom: 80px;
}

.cv-section:last-child {
    margin-bottom: 0;
}

.cv-section h3 {
    font-size: 48px;
    color: var(--text-color);
    font-weight: bold;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.cv-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background-color: var(--accent-color);
}

.timeline-item {
    padding-left: 50px;
    position: relative;
    margin-bottom: 30px;
}

.timeline-dot {
    position: absolute;
    left: 16px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--accent-color);
}

.timeline-content {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--shadow-color);
    transition: background-color var(--transition-speed) ease;
}

.timeline-content h4 {
    font-size: 22px;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.timeline-date {
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.7;
    font-style: italic;
    margin-bottom: 10px;
}

/* Project Cards */
.experience-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.project-link {
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s ease-in-out;
}

.project-link:hover {
    transform: translateY(-6px);
}

.experience-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.25s ease-in-out;
    min-height: 180px;
    display: flex;
    flex-direction: column;
}

.project-link:hover .experience-card {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.card-header {
    background-color: var(--accent-color);
    color: var(--light-text);
    padding: 20px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.card-header h4 {
    font-size: 22px;
    font-weight: 600;
}

/* Right Column */
.right-column {
    flex-basis: 40%;
    background-color: var(--secondary-bg);
    padding: 60px 40px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background-color var(--transition-speed) ease;
}

.photo-area {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 40px;
    margin-top: 100px;
    background-color: var(--card-bg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border: 5px solid var(--light-text);
}

.photo-area img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Contact */
.contact-info {
    display: flex;
    width: 100%;
    justify-content: space-around;
    align-items: flex-start;
    color: var(--light-text);
    margin-top: 100px;
}

.contact-left,
.contact-right {
    flex-basis: 45%;
}

.contact-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-right p {
    margin-bottom: 10px;
    font-size: 16px;
}

.contact-right p strong {
    font-size: 18px;
    display: inline-block;
    margin-bottom: 5px;
}

.contact-item {
    font-size: 16px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--light-text);
    text-decoration: none;
    transition: transform var(--transition-speed) ease;
}

.contact-item i {
    font-size: 22px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed) ease;
}

.social-link:hover {
    transform: translateY(-3px);
}

.social-link:hover i {
    background-color: var(--light-text);
    color: var(--accent-color);
}

/* Footer */
.cv-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 15px;
    font-size: 14px;
    margin-top: auto;
    letter-spacing: 1px;
}

.cv-footer p {
    opacity: 0.9;
}

#current-year {
    font-weight: 600;
}

/* Fade-in Animation (replaces AOS) */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1000px) {
    .main-content {
        flex-direction: column;
    }

    .left-column,
    .right-column {
        flex-basis: 100%;
    }

    .left-column {
        padding: 40px 20px 40px 60px;
    }

    .cv-header {
        padding: 20px;
        height: auto;
        flex-direction: column;
    }

    .cv-header h1 {
        margin-bottom: 15px;
    }

    .main-nav ul {
        gap: 15px;
    }

    .name-section h2,
    .name-section .title {
        font-size: 48px;
    }

    .cv-section h3 {
        font-size: 36px;
    }

    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .contact-left,
    .contact-right {
        flex-basis: auto;
    }

    .experience-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .cv-header h1 {
        font-size: 32px;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 5px;
        align-items: center;
    }

    .left-column {
        padding: 20px;
    }

    .name-section h2,
    .cv-section h3,
    .name-section .title {
        font-size: 36px;
    }

    .contact-item i {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .contact-item span,
    .contact-right p {
        font-size: 14px;
    }

    .photo-area {
        width: 200px;
        height: 200px;
        margin-top: 40px;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-item {
        padding-left: 35px;
    }

    .timeline-dot {
        left: 6px;
    }
}
