/* --- CSS VARIABLES & RESET --- */
:root {
    --bg-color: #0a192f;
    --light-bg: #112240;
    --lighter-bg: #1d2d50;
    --text-primary: #ccd6f6;
    --text-secondary: #8892b0;
    --accent: #64ffda;
    --accent-tint: rgba(100, 255, 218, 0.1);
    --transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
    --font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.section-title {
    display: flex;
    align-items: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--text-primary);
    font-weight: 700;
}

.section-title::after {
    height: 1px;
}

.section-title span {
    color: var(--accent);
    margin-right: 10px;
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: 400;
}

section {
    padding: 100px 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- SCROLL INDICATOR --- */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--accent);
    z-index: 1000;
    transition: width 0.1s ease;
}

/* --- NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(10px);
    z-index: 100;
    transition: var(--transition);
    box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
}

nav.scrolled {
    padding: 15px 50px;
    box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.9);
}

.logo {
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 2px;
    border: 2px solid var(--accent);
    padding: 5px 10px;
    border-radius: 4px;
    transition: var(--transition);
}

.logo:hover {
    background: var(--accent-tint);
    transform: translateY(-2px);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links li a {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-primary);
    padding: 10px;
    position: relative;
}

.nav-links li a::after {
    content: "";
    position: absolute;
    bottom: 5px;
    left: 10px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links li a:hover::after {
    width: calc(100% - 20px);
}

.nav-links li a:hover {
    color: var(--accent);
}

.nav-links li a span {
    color: var(--accent);
}

.resume-btn {
    border: 1px solid var(--accent);
    padding: 8px 15px;
    border-radius: 4px;
    margin-left: 10px;
    transition: var(--transition);
}

.resume-btn:hover {
    background: var(--accent-tint);
}

.hamburger {
    display: none;
    color: var(--accent);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 101;
}

/* --- LANGUAGE SWITCHER --- */
.lang-selector {
    position: relative;
    margin-left: 15px;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--light-bg);
    border: 1px solid var(--lighter-bg);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.lang-toggle:hover {
    border-color: var(--accent);
    background: var(--lighter-bg);
}

.lang-flag {
    font-size: 1.2rem;
    line-height: 1;
}

.lang-code {
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.lang-toggle i {
    color: var(--text-secondary);
    font-size: 0.7rem;
    transition: var(--transition);
}

.lang-dropdown.active .lang-toggle i {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--light-bg);
    border: 1px solid var(--lighter-bg);
    border-radius: 8px;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
    z-index: 1000;
}

.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--lighter-bg);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover {
    background: var(--lighter-bg);
    padding-left: 20px;
}

.lang-option.active {
    background: var(--accent-tint);
    border-left: 3px solid var(--accent);
}

.lang-option.active .lang-name {
    color: var(--accent);
    font-weight: 600;
}

.lang-option .lang-flag {
    font-size: 1.3rem;
}

.lang-name {
    color: var(--text-primary);
    flex: 1;
}

.lang-check {
    color: var(--accent);
    font-size: 0.9rem;
    opacity: 0;
}

.lang-option.active .lang-check {
    opacity: 1;
}

/* --- HERO SECTION --- */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 0;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.6;
}

.hero-content {
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

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

.hero-intro {
    color: var(--accent);
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-name {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-subtitle {
    font-size: clamp(2rem, 7vw, 3.5rem);
    font-weight: 800;
    color: var(--text-secondary);
    line-height: 1.1;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-desc {
    max-width: 540px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 50px;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.btn {
    display: inline-block;
    padding: 1.25rem 1.75rem;
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--accent);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
    animation: fadeInUp 1s ease-out 1s both;
}

.btn:hover {
    background: var(--accent-tint);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px var(--accent);
}

/* --- ABOUT SECTION --- */
.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.about-text p span {
    color: var(--accent);
    font-weight: 600;
}

.skill-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 200px));
    gap: 10px;
    margin-top: 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.skill-list li {
    position: relative;
    padding-left: 20px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.skill-list li:hover {
    color: var(--accent);
    transform: translateX(5px);
}

.skill-list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 1.2rem;
}

.about-img-wrapper {
    position: relative;
    border-radius: 4px;
    transition: var(--transition);
    max-width: 300px;
    margin: 0 auto;
}

.about-img-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent);
    opacity: 0.4;
    border-radius: 4px;
    transition: var(--transition);
    mix-blend-mode: screen;
}

.about-img-wrapper:hover::before {
    opacity: 0;
}

.about-img-wrapper::after {
    content: "";
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent);
    border-radius: 4px;
    z-index: -1;
    transition: var(--transition);
}

.about-img-wrapper:hover::after {
    top: 10px;
    left: 10px;
}

.profile-placeholder {
    width: 100%;
    height: 300px;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 3rem;
    border-radius: 4px;
    transition: var(--transition);
}

.profile-placeholder:hover {
    transform: scale(1.05);
}

/* --- EXPERIENCE SECTION --- */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.job-card {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 5px;
    margin-bottom: 30px;
    transition: var(--transition);
    border-left: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.job-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--accent-tint);
    transition: width 0.3s ease;
    z-index: 0;
}

.job-card:hover::before {
    width: 100%;
}

.job-card:hover {
    transform: translateY(-5px);
    border-left: 3px solid var(--accent);
    box-shadow: var(--shadow);
}

.job-card > * {
    position: relative;
    z-index: 1;
}

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

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

.company {
    color: var(--accent);
    transition: var(--transition);
}

.job-card:hover .company {
    text-decoration: underline;
}

.job-duration {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.job-desc ul {
    margin-top: 15px;
}

.job-desc li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.job-desc li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 1.2rem;
}

/* --- PROJECTS SECTION --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background-color: var(--light-bg);
    padding: 2rem 1.75rem;
    border-radius: 4px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--accent-tint);
    transition: height 0.3s ease;
    z-index: 0;
}

.project-card:hover::before {
    height: 100%;
}

.project-card > * {
    position: relative;
    z-index: 1;
}

.project-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow);
}

.project-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.folder-icon {
    color: var(--accent);
    font-size: 2.5rem;
    transition: var(--transition);
}

.project-card:hover .folder-icon {
    transform: translateY(-5px);
}

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

.project-links a {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: var(--transition);
}

.project-links a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

.project-title {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    transition: var(--transition);
}

.project-card:hover .project-title {
    color: var(--accent);
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* --- CONTACT SECTION --- */
#contact {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 150px;
}

.contact-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.contact-text {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 50px;
    line-height: 1.8;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.8rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-5px);
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

footer a {
    color: var(--accent);
}

footer a:hover {
    text-decoration: underline;
}

/* --- BACK TO TOP BUTTON --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--light-bg);
    border: 1px solid var(--accent);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent-tint);
    transform: translateY(-3px);
}

/* --- LOADING ANIMATION --- */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-logo {
    color: var(--accent);
    font-size: 3rem;
    font-weight: bold;
    letter-spacing: 2px;
    border: 3px solid var(--accent);
    padding: 20px 30px;
    border-radius: 4px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
}

/* --- MEDIA QUERIES --- */
@media (max-width: 768px) {
    nav {
        padding: 15px 25px;
    }
    
    .lang-selector {
        margin-left: 0;
    }
    
    .lang-toggle {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .lang-code {
        display: none;
    }
    
    .lang-flag {
        font-size: 1.4rem;
    }
    
    .lang-dropdown {
        right: -10px;
    }

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

    .about-img-wrapper {
        order: -1;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        background-color: var(--light-bg);
        width: min(75vw, 400px);
        height: 100vh;
        padding: 100px 50px;
        text-align: center;
        box-shadow: -10px 0 30px -15px rgba(2, 12, 27, 0.7);
    }
    
    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
    }

    .hamburger {
        display: block;
    }

    .section-title::after {
        width: 100px;
    }

    section {
        padding: 80px 0;
    }

    .skill-list {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

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

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    nav {
        padding: 15px 20px;
    }

    .hero-desc {
        font-size: 1rem;
    }

    .btn {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-title span {
        font-size: 1.2rem;
    }

    .skill-list {
        grid-template-columns: 1fr;
    }

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

    .job-duration {
        margin-top: 5px;
    }
}
