/* CSS Variables for Light/Dark Mode */
:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --placeholder-color: #808080;
    --placeholder-light: #d3d3d3;
    --placeholder-medium: #a0a0a0;
    --toggle-bg: #333333;
    --toggle-text: #ffffff;
    --button-bg: #000000;
    --button-text: #ffffff;
}

body.dark-mode {
    --bg-color: #1a1a1a;
    --text-color: #ffffff;
    --placeholder-color: #555555;
    --placeholder-light: #333333;
    --placeholder-medium: #444444;
    --toggle-bg: #cccccc;
    --toggle-text: #000000;
    --button-bg: #555555;
    --button-text: #ffffff;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dark-mode-toggle:hover {
    opacity: 0.8;
    transform: scale(1.2);
}

.dark-mode-toggle img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 20px;
    background-color: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.scroll-to-top:hover {
    opacity: 0.8;
    transform: scale(1.2);
}

.scroll-to-top.show {
    display: flex;
}

.scroll-to-top img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    filter: brightness(0);
    transition: filter 0.3s ease;
}

body.dark-mode .scroll-to-top img {
    filter: brightness(0) invert(1);
}

header {
    text-align: left;
    margin: 60px 0 40px 0;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hello-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.lottie-container {
    flex-shrink: 0;
}

.lottie-container video {
    height: calc(96px * 1.1);
    width: auto;
    aspect-ratio: 1;
    object-fit: contain;
}

h1 {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-color);
}

.hello-text {
    font-size: 96px;
    font-weight: normal;
    margin-bottom: 0;
    color: #ec4f9d;
    line-height: 1.1;
}

.intro-text {
    font-size: 48px;
    font-weight: normal;
    color: var(--text-color);
    margin-bottom: 10px;
}

.intro-text strong {
    font-weight: bold;
}

.intro-text .subtitle {
    font-size: 48px;
    font-weight: normal;
    color: var(--text-color);
}

.subtitle {
    font-size: 28px;
    font-weight: normal;
    color: var(--text-color);
}

.cursor {
    display: inline-block;
    animation: blink 1s infinite;
    margin-left: 2px;
    color: #ec4f9d;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

section {
    margin-bottom: 50px;
}

h2 {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 30px;
    color: var(--text-color);
}

/* Experience Section */
.experience-item {
    margin-bottom: 40px;
}

.experience-header {
    margin-bottom: 15px;
}

.experience-left {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}
.experience-text h3 a {
    color: var(--text-color);
    text-decoration: none;
}

.experience-text h3 a:hover {
    text-decoration: underline;
}
.experience-bullets a {
    color: inherit;
    text-decoration: underline;
}

.experience-bullets a:hover {
    text-decoration: underline;
}.company-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: contain;
    object-position: center;
    flex-shrink: 0;
    background-color: #ffffff;
    padding: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

body.dark-mode .company-logo {
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.experience-text {
    flex: 1;
}

.company-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 5px;
}

.company-row h3 {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-color);
}

.date {
    font-size: 16px;
    color: var(--text-color);
}

.job-title {
    font-size: 18px;
    font-weight: normal;
    font-style: italic;
    color: var(--text-color);
    margin-top: 5px;
}

.experience-bullets {
    margin-left: 75px;
    list-style-position: outside;
    padding-left: 20px;
}

.experience-bullets li {
    margin-bottom: 10px;
    color: var(--text-color);
}

/* Skills Section */
.skills-grid {
    display: grid;
    gap: 4px;
    grid-auto-flow: row;
    margin-bottom: 20px;
}

.programming-languages {
    grid-template-columns: repeat(10, 70px);
}

.frameworks-libraries {
    grid-template-columns: repeat(8, 70px);
}

.tools-databases {
    grid-template-columns: repeat(8, 70px);
}

.skill-item {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    object-fit: contain;
    object-position: center;
    background-color: rgba(255, 255, 255, 0.5);
    padding: 2px;
    justify-self: start;
    cursor: pointer;
    transition: transform 0.3s ease;
    transform-origin: bottom center;
}

body.dark-mode .skill-item {
    background-color: #ffffff;
}

.skill-item:hover {
    transform: translateY(-8px) scale(1.05);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.project-item {
    display: flex;
    flex-direction: column;
    background-color: #f8f8f8;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.project-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

body.dark-mode .project-item {
    background-color: #2a2a2a;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

body.dark-mode .project-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.project-image {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    object-fit: cover;
    object-position: center;
    margin-bottom: 15px;
    background-color: var(--placeholder-medium);
}

.project-item h3 {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-color);
}

.project-description {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.github-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    padding: 10px 20px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    font-family: inherit;
    width: fit-content;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.github-btn:hover {
    opacity: 0.9;
}

.github-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

body.dark-mode .github-btn {
    background-color: #ffffff;
    color: #000000;
}


/* Contact Section */
.contact {
    text-align: center;
    margin-top: 60px;
    margin-bottom: 40px;
}

.contact h2 {
    margin-bottom: 15px;
}

.contact-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.contact-link {
    color: var(--text-color);
    text-decoration: underline;
    font-size: 16px;
    transition: opacity 0.3s ease;
}

.contact-link.email-link {
    text-decoration: none;
}

.contact-link:hover {
    opacity: 0.8;
}

.contact-separator {
    color: var(--text-color);
    font-size: 16px;
}

/* Tablet Styles (800 - 1279px) */
@media (max-width: 1279px) {
    .scroll-to-top {
        display: none !important;
    }

    .container {
        max-width: 800px;
    }

    h1 {
        font-size: 40px;
    }

    .hello-text {
        font-size: 72px;
    }

    .intro-text {
        font-size: 36px;
    }

    .intro-text .subtitle {
        font-size: 36px;
    }

    .subtitle {
        font-size: 24px;
    }

    .lottie-container video {
        height: calc(72px * 1.1);
        width: auto;
        aspect-ratio: 1;
        object-fit: contain;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .programming-languages {
        grid-template-columns: repeat(8, 70px);
    }

    .frameworks-libraries {
        grid-template-columns: repeat(9, 70px);
    }

    .tools-databases {
        grid-template-columns: repeat(8, 70px);
    }

    .experience-bullets {
        margin-left: 75px;
    }
}

/* Mobile Styles (1 - 799px) */
@media (max-width: 799px) {
    .scroll-to-top {
        display: none !important;
    }

    body {
        padding: 15px;
    }

    .container {
        max-width: 100%;
    }

    .dark-mode-toggle {
        position: fixed;
        top: 15px;
        right: 15px;
        padding: 6px;
        z-index: 1000;
    }

    .dark-mode-toggle img {
        width: 25px;
        height: 25px;
    }

    .contact {
        margin-top: 40px;
        margin-bottom: 30px;
        gap: 10px;
    }

    .contact-link,
    .contact-separator {
        font-size: 14px;
    }

    header {
        margin-top: 20px;
    }

    .hello-line {
        flex-wrap: wrap;
        gap: 15px;
    }

    .lottie-container {
        align-self: center;
    }

    .lottie-container video {
        height: calc(56px * 1.1);
        width: auto;
        aspect-ratio: 1;
        object-fit: contain;
    }

    h1 {
        font-size: 32px;
    }

    .hello-text {
        font-size: 56px;
    }

    .intro-text {
        font-size: 32px;
    }

    .intro-text .subtitle {
        font-size: 32px;
    }

    .subtitle {
        font-size: 20px;
    }

    h2 {
        font-size: 24px;
    }

    .company-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .date {
        margin-top: 5px;
    }

    .experience-bullets {
        margin-left: 0;
        padding-left: 20px;
    }

    .company-logo {
        width: 50px;
        height: 50px;
    }

    .programming-languages {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    }

    .frameworks-libraries {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    }

    .tools-databases {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-image {
        height: 220px;
    }
}

/* Scroll Fade Indicator */
.scroll-fade-indicator {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    pointer-events: none;
    z-index: 100;
    background: linear-gradient(to top, var(--bg-color), transparent);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.scroll-fade-indicator.hidden {
    opacity: 0;
}

body.dark-mode .scroll-fade-indicator {
    background: linear-gradient(to top, var(--bg-color), transparent);
}

