/* Global Styles */
:root {
    /* Brand Colors */
    --bg-color: #020205;
    /* Deep Space Black */
    --text-primary: #ffffff;
    --text-secondary: #e0e0ea;
    --accent-color: #00d2d3;
    /* Science Cyan */

    /* Card Colors - Premium Glass */
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-hover: rgba(0, 210, 211, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background: radial-gradient(circle at center, #1a1a2e 0%, #000000 100%);
    /* Deep gradient fallback */
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: block;
    /* Removed flex center to allow natural scrolling if needed */
}

/* Canvas Background */
#canvas1 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: transparent;
    /* Allows gradient behind it to show */
}

/* Main Container */
.container {
    width: 100%;
    max-width: 800px;
    /* Increased width for better grid layout */
    margin: 0 auto;
    padding: 60px 20px;
    z-index: 10;
    position: relative;
    animation: fadeIn 1s ease-out;
}

/* Profile Header */
.profile-header {
    text-align: center;
    margin-bottom: 50px;
}

.profile-image-container {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, #6c5ce7, #00d2d3);
    box-shadow: 0 0 30px rgba(108, 92, 231, 0.5);
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #000;
}

.status-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background-color: #2ecc71;
    border: 3px solid #000;
    border-radius: 50%;
    box-shadow: 0 0 10px #2ecc71;
}

.name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #a29bfe);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.title {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
    font-weight: 300;
}

.university {
    font-size: 1rem;
    color: #00d2d3;
    font-weight: 600;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 15px;
}

.social-icons a {
    color: var(--text-secondary);
    font-size: 1.6rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-icons a:hover {
    color: #fff;
    transform: translateY(-5px) scale(1.1);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

/* Sections */
.section-title {
    font-size: 1.5rem;
    margin: 40px 0 20px;
    padding-left: 10px;
    border-left: 4px solid var(--accent-color);
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Links Section */
.links-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.link-card {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 18px 24px;
    border-radius: 18px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

    /* Reveal Animation */
    opacity: 0;
    animation: slideUp 0.6s ease-out forwards;
}

.link-card:nth-child(1) {
    animation-delay: 0.1s;
}

.link-card:nth-child(2) {
    animation-delay: 0.2s;
}

.link-card:nth-child(3) {
    animation-delay: 0.3s;
}

.link-card:nth-child(4) {
    animation-delay: 0.4s;
}

.link-card:nth-child(5) {
    animation-delay: 0.5s;
}

.link-card:nth-child(6) {
    animation-delay: 0.6s;
}

.link-card:hover {
    background: var(--card-hover);
    border-color: rgba(0, 210, 211, 0.6);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.highlight-card {
    background: rgba(0, 210, 211, 0.15);
    border: 1px solid rgba(0, 210, 211, 0.5);
    box-shadow: 0 0 20px rgba(0, 210, 211, 0.15);
}

.icon-box {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    margin-right: 18px;
    font-size: 1.3rem;
    color: #fff;
}

.link-text {
    flex-grow: 1;
    font-weight: 500;
    font-size: 1.1rem;
    letter-spacing: 0.3px;
}

.arrow-box {
    font-size: 1rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.link-card:hover .arrow-box {
    color: #fff;
    transform: translateX(5px);
}

/* About Section */
.about-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 20px;
    line-height: 1.7;
    font-size: 1.05rem;
    color: #dcdce6;
    backdrop-filter: blur(10px);
    text-align: justify;
}

.about-card strong {
    color: #00d2d3;
    font-weight: 600;
}

/* News Section Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    /* Wider cards */
    gap: 25px;
}

.news-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    /* Smooth corners */
    text-decoration: none;
    color: #fff;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Contains image */
    backdrop-filter: blur(10px);
    height: 100%;
    /* Equal height */
}

/* News Image Card Styles */
.news-img-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.news-card:hover .news-img {
    transform: scale(1.05);
    /* Zoom effect on hover */
}

.news-content-wrapper {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card:hover {
    background: rgba(108, 92, 231, 0.15);
    transform: translateY(-8px);
    border-color: rgba(108, 92, 231, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.news-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    padding: 6px 14px;
    background: rgba(108, 92, 231, 0.15);
    color: #a29bfe;
    border: 1px solid rgba(108, 92, 231, 0.3);
    border-radius: 50px;
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
}

.news-content-wrapper h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    font-weight: 700;
    line-height: 1.3;
}

.news-content-wrapper p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 15px;
    text-align: justify;
    /* Justified text as requested */
}

.read-more {
    font-size: 0.9rem;
    color: #00d2d3;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.read-more i {
    font-size: 0.8rem;
    margin-left: 6px;
    transition: transform 0.3s;
}

.news-card:hover .read-more i {
    transform: translateX(5px);
}


/* Footer */
footer {
    margin-top: 60px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    padding-bottom: 30px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .container {
        padding: 40px 15px;
    }

    .name {
        font-size: 1.8rem;
    }

    .link-card {
        padding: 16px 20px;
    }

    .icon-box {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    .news-img {
        height: 180px;
    }
}

/* Featured & Latest Section */
.featured-section {
    margin-top: 40px;
    margin-bottom: 60px;
}

.featured-grid {
    display: grid;
    /* Use Grid */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    /* Responsive columns */
    gap: 20px;
}

.featured-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.featured-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 210, 211, 0.25);
    border-color: #00d2d3;
}

.featured-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(0, 210, 211, 0.1), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 2;
}

.featured-card:hover::before {
    opacity: 1;
}

.card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-card:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-date {
    font-size: 0.8rem;
    color: var(--accent-color);
    margin-bottom: 5px;
    display: block;
    font-weight: 600;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.3;
}

.card-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.card-footer {
    font-size: 0.9rem;
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Scroll Animation Classes */
.float-enter {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    animation: floatWave 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes floatWave {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Filter Section */
.filter-section {
    margin: 20px 0;
    text-align: center;
}

.filter-container {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    /* Slight glass container */
    padding: 8px 12px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: #fff;
}

.filter-btn.active {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(0, 210, 211, 0.4);
    font-weight: 700;
}

/* Hidden Class for Filtering */
.hidden {
    display: none !important;
}

/* Card Category Tag */
.card-tag {
    position: absolute;
    bottom: 12px;
    right: 15px;
    top: auto;
    background: rgba(0, 210, 211, 0.1);
    border: 1px solid rgba(0, 210, 211, 0.2);
    color: var(--accent-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(5px);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-tag:hover {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(0, 210, 211, 0.4);
}

/* Container for multiple tags */
.card-tags {
    position: absolute;
    bottom: 12px;
    right: 15px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

/* When Inside Container, Reset Position */
.card-tags .card-tag {
    position: relative;
    bottom: auto;
    right: auto;
}

/* CV Download Section */
.cv-download-container {
    margin-top: 25px;
    display: flex;
    justify-content: center;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #00d2d3, #6c5ce7);
    color: #fff;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.download-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 210, 211, 0.4);
    background: linear-gradient(135deg, #6c5ce7, #00d2d3);
}

.download-btn i {
    font-size: 1.2rem;
}