/* === Reset & Basic Setup === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Ensure full-width layout and disable horizontal scroll */
html,
body {
    width: 100%;
    overflow-x: hidden;
}

/* === Global Body Styling === */
body {
    font-family: 'Orbitron', sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    line-height: 1.6;
}

/* Subtle tech-style background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(#4dd0e1 1px, transparent 1px),
                      radial-gradient(#00ff99 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

/* === Particle Background === */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

/* Particle movement animation */
.particles div {
    position: absolute;
    border-radius: 50%;
    animation: float 12s linear infinite;
    z-index: -1;
}

@keyframes float {
    0% { transform: translateY(0) translateX(0); opacity: 0.6; }
    50% { transform: translateY(-40vh) translateX(15vw); opacity: 0.3; }
    100% { transform: translateY(-80vh) translateX(-10vw); opacity: 0.6; }
}

/* === Header === */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 1rem 2rem;
    background-color: #1a1a1a;
    border-bottom: 1px solid #4dd0e1;
    box-shadow: 0 0 10px rgba(77, 208, 225, 0.3);
    color: white;
}

/* Header logo */
header h1 {
    color: #4dd0e1;
    font-size: 1.5rem;
}

/* === Navigation === */
nav {
    display: flex;
    flex-wrap: wrap;
}

nav a {
    margin: 0 1rem;
    color: #e0e0e0;
    text-decoration: none;
    position: relative;
    transition: 0.3s;
}

/* Hover underline animation */
nav a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    background-color: #4dd0e1;
    bottom: -3px;
    left: 0;
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

/* === Language Switcher === */
.lang-switcher {
    position: relative;
    margin-top: 0.5rem;
}

/* Dropdown wrapper */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

/* Language button */
.lang-btn {
    background: #121212;
    border: 2px solid #4dd0e1;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    color: #4dd0e1;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background-color: #4dd0e1;
    color: #121212;
}

/* Dropdown options */
.lang-options {
    display: none;
    position: absolute;
    top: 110%;
    right: 0;
    background: #1a1a1a;
    border: 1px solid #4dd0e1;
    border-radius: 5px;
    min-width: 120px;
    z-index: 1001;
}

/* Show dropdown when active */
.lang-dropdown.active .lang-options {
    display: block;
}

/* Language option buttons */
.lang-option {
    display: block;
    width: 100%;
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    text-align: left;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.lang-option:hover {
    background-color: #4dd0e1;
    color: #121212;
}

/* === Hero Section === */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 0 20px;
    text-align: center;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #4dd0e1;
}

.hero p {
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border: 2px solid #4dd0e1;
    border-radius: 5px;
    color: #4dd0e1;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.btn:hover {
    background-color: #4dd0e1;
    color: #121212;
}

/* === Section Layout === */
section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: auto;
    width: 100%;
    scroll-margin-top: 80px;
}

/* Prevent header overlap on anchor jump */
section::before {
    content: "";
    display: block;
    height: 80px;
    margin-top: -80px;
    visibility: hidden;
}

/* === Projects === */
.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

/* Project and card base styling */
.project-card,
.card {
    background-color: #1a1a1a;
    border: 1px solid #4dd0e1;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

/* Hover highlight */
.project-card:hover,
.card:hover {
    border-color: #3cff00;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(77, 208, 225, 0.4);
}

/* === Footer === */
footer {
    text-align: center;
    padding: 2rem;
    background-color: #1a1a1a;
    border-top: 1px solid #4dd0e1;
}

/* === Contact Links === */
.contact-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* Button hover glow */
.contact-links .btn::after {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(77, 208, 225, 0.2);
    transition: all 0.3s ease;
    z-index: 0;
}

.contact-links .btn:hover::after {
    left: 0;
}

.contact-links .btn:hover {
    color: #121212;
    background-color: #4dd0e1;
}

/* GitHub button styling */
.github-btn {
    border-color: #333;
    background-color: #24292e;
    color: #fff;
}

.github-btn::after {
    background: rgba(77, 208, 225, 0.15);
}

.github-btn:hover {
    background-color: #4dd0e1;
    color: #121212;
    border-color: #4dd0e1;
}

/* === GitHub Stats === */
.cards-container.github-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.github-card img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* === Responsive Design === */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    nav {
        margin-top: 0.5rem;
        width: 100%;
    }

    nav a {
        margin: 0.3rem 0.5rem;
    }

    .lang-switcher {
        align-self: flex-end;
        margin-top: 0.5rem;
    }

    .hero h2 { font-size: 1.7rem; }
    .hero p { font-size: 0.95rem; }
}

/* === Scroll-To-Top Button === */
.scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #121212;
    border: 2px solid #4dd0e1;
    color: #4dd0e1;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(77, 208, 225, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* === Generic Card Grid === */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Card styling for skills, certificates, etc. */
.card {
    background-color: #1a1a1a;
    padding: 1.5rem;
    border-radius: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(77, 208, 225, 0.4);
}

.card h4 {
    margin-bottom: 0.5rem;
    color: #4dd0e1;
}

.card p {
    font-size: 0.9rem;
    color: #e0e0e0;
}

/* === Navigation & Hamburger Menu === */
.menu-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .menu-right {
        position: fixed;
        top: 0;
        right: -250px;
        height: 100%;
        width: 250px;
        background-color: rgba(0,0,0,0.95);
        flex-direction: column;
        align-items: flex-start;
        padding: 70px 20px;
        gap: 20px;
        transition: right 0.3s ease;
        z-index: 999;
    }

    .menu-right.active { right: 0; }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .hamburger { display: flex; }
}

/* Hamburger animation (open state) */
.hamburger.open div:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open div:nth-child(2) {
    opacity: 0;
}

.hamburger.open div:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}
