:root {
    /* Dark mode variables (default) */
    --primary: #0a192f;
    --secondary: #112240;
    --accent: #64ffda;
    --text: #8892b0;
    --light-text: #ccd6f6;
    --bg-color: #0a192f;
    --card-bg: #112240;
    --form-bg: rgba(255, 255, 255, 0.05);
    --form-border: rgba(255, 255, 255, 0.1);
}

/* Light mode variables */
.light-mode {
    --primary: #f5f5f5;
    --secondary: #e0e0e0;
    --accent: #0a6c61;
    --text: #4a4a4a;
    --light-text: #2c2c2c;
    --bg-color: #ffffff;
    --card-bg: #f0f0f0;
    --form-bg: rgba(0, 0, 0, 0.03);
    --form-border: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--primary);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

section {
    padding: 100px 0;
}

.accent-text {
    color: var(--accent);
}

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-circle {
    width: 120px;
    height: 120px;
    border: 3px solid var(--secondary);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    position: absolute;
    font-size: 2rem;
    font-weight: 700;
    color: var(--light-text);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Theme Toggle */
.theme-toggle {
    position: relative;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.theme-toggle i {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 24px;
    color: var(--light-text);
    transition: all 0.3s ease;
}

.dark-mode .light-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.dark-mode .dark-icon {
    opacity: 0;
    transform: rotate(90deg);
}

.light-mode .light-icon {
    opacity: 0;
    transform: rotate(-90deg);
}

.light-mode .dark-icon {
    opacity: 1;
    transform: rotate(0deg);
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 20px 0;
}

header.scrolled {
    background-color: rgba(var(--primary-rgb), 0.9);
    padding: 15px 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.light-mode header.scrolled {
    background-color: rgba(245, 245, 245, 0.9);
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--light-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    color: var(--accent);
}

.nav-link {
    color: var(--light-text);
    margin: 0 15px;
    position: relative;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link::before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent);
    transition: all 0.3s ease;
}

.nav-link:hover::before {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease;
    background-color: var(--light-text);
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    z-index: 1;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    transition: background 0.3s ease;
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-subtitle {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 20px;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards 0.3s;
}

.hero-title {
    font-size: 70px;
    font-weight: 700;
    color: var(--light-text);
    margin-bottom: 20px;
    line-height: 1.1;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards 0.6s;
}

.typing-text {
    font-size: 60px;
    opacity: 1;
    transform: translateY(0);
    animation: none;
}

#typing-element {
    color: var(--accent);
    border-right: 0.08em solid var(--accent);
    animation: blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: var(--accent);
    }
}

.hero-description {
    font-size: 20px;
    max-width: 600px;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards 0.9s;
}

.btn-custom {
    background-color: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards 1.2s;
}

.btn-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(100, 255, 218, 0.1);
    transition: all 0.3s ease;
    z-index: -1;
}

.btn-custom:hover {
    color: var(--accent);
}

.btn-custom:hover::before {
    width: 100%;
}

/* About Section */
.section-title {
    font-size: 32px;
    color: var(--light-text);
    font-weight: 700;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent);
}

.about-img-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.about-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    position: relative;
    z-index: 1;
    filter: grayscale(50%);
    transition: all 0.3s ease;
}

.about-img-container::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent);
    border-radius: 5px;
    z-index: 0;
    transition: all 0.3s ease;
}

.about-img-container:hover .about-img {
    filter: grayscale(0%);
}

.about-img-container:hover::after {
    top: 10px;
    left: 10px;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.skill-item {
    position: relative;
    padding-left: 20px;
}

.skill-item::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Projects Section */
.project-card {
    background-color: var(--card-bg);
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.project-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-content {
    padding: 25px;
}

.project-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--light-text);
    margin-bottom: 15px;
}

.project-description {
    margin-bottom: 20px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tech-tag {
    background-color: rgba(var(--accent-rgb), 0.1);
    color: var(--accent);
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 20px;
    margin-right: 10px;
    margin-bottom: 10px;
}

.light-mode .tech-tag {
    background-color: rgba(10, 108, 97, 0.1);
}

.project-links a {
    color: var(--light-text);
    margin-right: 15px;
    font-size: 20px;
    transition: all 0.3s ease;
}

.project-links a:hover {
    color: var(--accent);
}

/* Contact Section */
.contact-form {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.form-control {
    background-color: var(--form-bg);
    border: 1px solid var(--form-border);
    color: var(--light-text);
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.form-control:focus {
    background-color: var(--form-bg);
    border-color: var(--accent);
    box-shadow: none;
    color: var(--light-text);
}

.social-links {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: var(--card-bg);
    border-radius: 50%;
    margin: 0 10px;
    color: var(--light-text);
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--accent);
    color: var(--primary);
    transform: translateY(-5px);
}

/* Footer */
footer {
    background-color: var(--card-bg);
    padding: 30px 0;
    text-align: center;
    transition: background-color 0.3s ease;
}

.footer-text {
    font-size: 14px;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--accent);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--card-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        margin: 10px 0;
        display: block;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 50px;
    }
}

@media (max-width: 768px) {
    section {
        padding: 70px 0;
    }

    .hero-title {
        font-size: 40px;
    }

    .typing-text {
        font-size: 36px;
    }

    .hero-description {
        font-size: 18px;
    }

    .section-title {
        font-size: 28px;
    }
}