/* CSS Variables for theming */
:root {
    --bg-color: #fff;
    --text-color: #000;
    --text-secondary: #333;
    --text-muted: #666;
    --text-faded: #999;
    --link-color: #0066cc;
    --link-hover: #004499;
    --border-color: #eee;
    --tech-color: #0066cc;
}

/* Dark mode variables */
body.dark-mode {
    --bg-color: #0a0a0a;
    --text-color: #e0e0e0;
    --text-secondary: #bbb;
    --text-muted: #999;
    --text-faded: #666;
    --link-color: #4da6ff;
    --link-hover: #80bfff;
    --border-color: #333;
    --tech-color: #4da6ff;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue",
        sans-serif;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-size: 16px;
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
    position: relative;
    overflow-x: hidden;
}

/* Animated background pattern */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, var(--link-color) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: pulsePattern 3s ease-in-out infinite;
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
}

body.dark-mode::before {
    opacity: 0.15;
}

@keyframes pulsePattern {
    0%,
    100% {
        opacity: 0.1;
    }
    50% {
        opacity: 1;
    }
}

/* Dark mode animation adjustment */
body.dark-mode::before {
    animation: pulsePatternDark 3s ease-in-out infinite;
}

@keyframes pulsePatternDark {
    0%,
    100% {
        opacity: 0.1;
    }
    50% {
        opacity: 1;
    }
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.name {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.title {
    font-size: 18px;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Navigation Links */
.links {
    text-align: center;
    margin-bottom: 50px;
    font-size: 16px;
}

.links a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

.separator {
    margin: 0 15px;
    color: var(--text-muted);
}

/* Content */
.content {
    flex: 1;
}

section {
    margin-bottom: 50px;
}

h2 {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-color);
    letter-spacing: 1px;
}

h4 {
    font-size: 16px;
    font-weight: 400;
    text-align: center;
    margin-top: 30px;
    color: var(--text-color);
    letter-spacing: 1px;
}

/* About Section */
.about p {
    margin-bottom: 15px;
    text-align: center;
    color: var(--text-secondary);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.about p:last-child {
    color: var(--text-muted);
    font-size: 15px;
}

/* Tech Stack */
.tech-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 500px;
    margin: 0 auto;
}

.tech-list span {
    color: var(--tech-color);
    font-weight: 500;
    font-size: 15px;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.footer p {
    font-size: 13px;
    color: var(--text-faded);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 40px 20px;
    }

    .name {
        font-size: 24px;
        letter-spacing: 1px;
    }

    .title {
        font-size: 14px;
    }

    .links {
        font-size: 15px;
    }

    .separator {
        margin: 0 10px;
    }

    .tech-list {
        gap: 15px;
    }

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

    .date {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 30px 15px;
    }

    .name {
        font-size: 20px;
    }

    .links {
        font-size: 14px;
        line-height: 1.8;
    }

    .links a,
    .separator {
        display: inline-block;
    }

    .tech-list {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    section {
        margin-bottom: 40px;
    }
}

/* Print Styles */
@media print {
    body {
        font-size: 14px;
    }

    .container {
        padding: 20px;
    }

    .links a {
        color: #000;
        text-decoration: none;
    }

    .links a::after {
        content: " (" attr(href) ")";
        font-size: 10px;
        color: #666;
    }
}

/* Scroll Progress Bar */
.scroll-progress {
    background: linear-gradient(135deg, var(--text-color), var(--link-color));
    box-shadow: 0 0 10px var(--link-color);
}

/* Dark Mode Toggle */
.theme-toggle {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    background: var(--text-color);
    color: var(--bg-color);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition:
        transform 0.3s ease,
        background 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

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

.theme-toggle:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 18px;
        bottom: 2rem;
        right: 2rem;
    }
}
