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

:root {
    --primary-color: #00d2ff;
    --secondary-color: #3a7bd5;
    --text-color: #ffffff;
    --bg-overlay: rgba(0, 0, 0, 0.6);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --blur-amount: 10px;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background-image: url("../res/background.gif");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Overlay */
#background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--bg-overlay), url("../res/overlay-pattern.png"), url("../res/overlay.svg");
    background-attachment: fixed, fixed, fixed;
    background-position: top left, top left, center center;
    background-repeat: no-repeat, repeat, no-repeat;
    background-size: cover, auto, cover;
    z-index: 999;
    pointer-events: none;
    animation: overlay 1.5s 1.5s forwards;
    opacity: 0.43;
    /* From original opacity: 43% */
}

@keyframes overlay {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 0.43;
    }
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    transition: 0.3s;
}

header.scrolled {
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem 5%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: 0.3s;
    position: relative;
}

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

.nav-links a:hover::after {
    width: 100%;
}

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

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Sections Global */
section {
    padding: 100px 5%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 3px;
    bottom: -10px;
    left: 25%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* Hero Section */
#hero {
    text-align: center;
    padding-top: 15vh;
}

#hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.highlight {
    color: var(--primary-color);
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#hero h2 {
    font-size: 1.8rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
    opacity: 0.9;
}



/* Search Bar */
#searchbar {
    max-width: 600px;
    margin: 0 auto 3rem;
    position: relative;
}

.search-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    backdrop-filter: blur(var(--blur-amount));
    box-shadow: var(--glass-shadow);
    transition: 0.3s;
}

.search-container:hover,
.search-container:focus-within {
    transform: scale(1.02);
    box-shadow: 0 8px 32px 0 rgba(0, 210, 255, 0.2);
    border-color: var(--primary-color);
}

.search-container input {
    background: transparent;
    border: none;
    color: var(--text-color);
    width: 100%;
    padding: 0.8rem;
    font-size: 1.1rem;
    outline: none;
    font-family: inherit;
}

.search-container input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-icon {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

/* Social Links */
.social-links {
    margin-top: 2rem;
}

.social-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    font-size: 1.2rem;
    margin: 0 10px;
    transition: 0.3s;
    backdrop-filter: blur(var(--blur-amount));
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 210, 255, 0.4);
}

/* News Panel */
.news-panel {
    max-width: 720px;
    margin: 2.5rem auto 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    backdrop-filter: blur(var(--blur-amount));
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    text-align: left;
}

.news-tabs {
    display: flex;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
}

.news-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.3s;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    letter-spacing: 0.02em;
}

.news-tab:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

.news-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(0, 210, 255, 0.05);
}

.news-content {
    max-height: 260px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.news-content::-webkit-scrollbar {
    width: 4px;
}

.news-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
}

.news-list {
    padding: 0.5rem 0;
}

.news-list.hidden {
    display: none;
}

.news-item {
    display: flex;
    flex-direction: column;
    padding: 0.7rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
    color: var(--text-color);
    transition: background 0.2s;
    gap: 0.15rem;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    background: rgba(0, 210, 255, 0.08);
}

.news-item-title {
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
    transition: color 0.2s;
}

.news-item:hover .news-item-title {
    color: var(--primary-color);
}

.news-item-date {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Skeleton loader */
.news-skeleton {
    padding: 0.7rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.news-skeleton-line {
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.05) 25%,
        rgba(255,255,255,0.12) 50%,
        rgba(255,255,255,0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    margin-bottom: 6px;
}

.news-skeleton-line.short {
    width: 40%;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* About Section */
.about-content {
    background: var(--glass-bg);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--blur-amount));
    box-shadow: var(--glass-shadow);
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.skill-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    transition: 0.3s;
    border: 1px solid transparent;
    color: var(--text-color);
    text-decoration: none;
    display: block;
}

.skill-item:hover {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.skill-item i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    color: var(--primary-color);
}

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

.project-card {
    background: var(--glass-bg);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    transition: 0.3s;
    backdrop-filter: blur(var(--blur-amount));
    position: relative;
    height: 300px;
    /* Placeholder height */
    display: flex;
    align-items: center;
    /* Center content for placeholder */
    justify-content: center;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0.1;
    z-index: -1;
}

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

.project-info {
    padding: 2rem;
    text-align: center;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.project-links {
    margin-top: 1.5rem;
}

.btn-sm {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    margin: 0 5px;
    transition: 0.3s;
}

.btn-sm:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Contact & Footer Section */
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.footer-contact {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 2rem 5% 1rem;
    font-size: 1rem;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-contact i {
    color: var(--primary-color);
}

.footer-contact a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 4px;
}

footer {
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    color: rgba(255, 255, 255, 0.7);
}

.copyright {
    padding: 2rem;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0px;
        height: 100vh;
        top: 0vh;
        background-color: #1a1a1a;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        padding-top: 5rem;
        z-index: 999;
    }

    .nav-links li {
        opacity: 0;
        margin: 2rem 0;
    }

    .burger {
        display: block;
        z-index: 1000;
    }

    .nav-active {
        transform: translateX(0%);
    }

    @keyframes navLinkFade {
        from {
            opacity: 0;
            transform: translateX(50px);
        }

        to {
            opacity: 1;
            transform: translateX(0px);
        }
    }

    #hero h1 {
        font-size: 2.5rem;
    }
}