/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Nostalgic color palette with modern twist */
    --primary-bg: #1a1a2e;
    --secondary-bg: #16213e;
    --accent-color: #0f3460;
    --highlight: #e94560;
    --text-primary: #f1f1f1;
    --text-secondary: #a6a6a6;
    --border-color: #533483;
    --card-bg: #0f3460;
    --gradient-start: #533483;
    --gradient-end: #e94560;
}

body {
    font-family: 'Courier New', Courier, monospace;
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    text-align: justify;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 5px;
    background: rgba(15, 52, 96, 0.8);
    padding: 5px;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.lang-btn {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 8px 16px;
    border-radius: 15px;
    cursor: pointer;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    color: var(--text-primary);
    background: rgba(233, 69, 96, 0.2);
}

.lang-btn.active {
    background: var(--highlight);
    color: var(--text-primary);
}

/* Ripple Grid Background */
.ripple-grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.3;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header Styles with Glitch Effect */
.header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    border: 3px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.header-content h1 {
    font-size: 4.0em;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.3);
}

.glitch {
    position: relative;
    color: var(--text-primary);
    display: inline-block;
}

.glitch:hover::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    right: 0;
    text-shadow: -2px 0 var(--highlight);
    top: 0;
    color: var(--text-primary);
    background: transparent;
    overflow: hidden;
    filter: blur(2px);
    opacity: 0.8;
    animation: glitch-anim 0.8s infinite;
}

.glitch:hover::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    right: 0;
    text-shadow: 3px 0 cyan;
    top: 0;
    color: var(--text-primary);
    background: transparent;
    overflow: hidden;
    filter: blur(3px);
    opacity: 0.7;
    animation: glitch-anim 0.3s infinite reverse;
}

@keyframes glitch-anim {
    0% {
        clip-path: inset(40% 0 61% 0);
    }

    20% {
        clip-path: inset(92% 0 1% 0);
    }

    40% {
        clip-path: inset(43% 0 1% 0);
    }

    60% {
        clip-path: inset(25% 0 58% 0);
    }

    80% {
        clip-path: inset(54% 0 7% 0);
    }

    100% {
        clip-path: inset(58% 0 43% 0);
    }
}

.subtitle {
    font-size: 1.2em;
    color: var(--text-secondary);
    font-style: italic;
}

/* Navigation Styles */
.nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    padding: 20px;
    background: var(--accent-color);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    padding: 10px 25px;
    border: 2px solid var(--highlight);
    border-radius: 5px;
    background: linear-gradient(135deg, var(--gradient-start) 0%, transparent 100%);
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link:hover {
    background: linear-gradient(135deg, var(--gradient-end) 0%, var(--gradient-start) 100%);
}

/* Section Styles */
.section {
    margin-bottom: 50px;
    padding: 30px;
    background: rgba(15, 52, 96, 0.5);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.section-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: var(--highlight);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    border-bottom: 3px solid var(--border-color);
    padding-bottom: 10px;
}

/* About Section */
.about-content {
    font-size: 1.2em;
    line-height: 1.8;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.about-photo {
    flex-shrink: 0;
}

.about-photo a {
    border: none !important;
    border-bottom: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
}

.about-photo a:hover {
    background: none !important;
    border-bottom: none !important;
}

.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--highlight);
    box-shadow: 0 8px 24px rgba(233, 69, 96, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(233, 69, 96, 0.6);
}

.about-text {
    flex: 1;
}

.about-content p {
    margin-bottom: 15px;
}

.about-content a {
    color: #64b5f6;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #64b5f6;
    transition: all 0.3s ease;
}

.about-content a:hover {
    color: var(--highlight);
    border-bottom-color: var(--highlight);
    background: rgba(233, 69, 96, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.project-card {
    background: linear-gradient(145deg, var(--card-bg) 0%, var(--accent-color) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    text-decoration: none !important;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--highlight), var(--gradient-start));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--highlight);
    box-shadow: 0 12px 32px rgba(233, 69, 96, 0.3);
    text-decoration: none !important;
}

.project-card h3,
.project-card .project-title {
    font-size: 1.3em;
    margin-bottom: 12px;
    color: var(--highlight);
    font-weight: bold;
    line-height: 1.4;
}

.project-card p,
.project-card .project-description {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
    line-height: 1.7;
    text-decoration: none;
    flex-grow: 1;
    font-size: 1.2em;
    text-align: left;
}

.project-title {
    font-size: 1.3em;
    margin-bottom: 12px;
    color: var(--highlight);
    font-weight: bold;
    text-align: left;

}

.project-description {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    line-height: 1.7;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.project-tag {
    background: rgba(83, 52, 131, 0.6);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 1em;
    border: 1px solid rgba(233, 69, 96, 0.5);
    transition: all 0.2s ease;
}

.project-tag:hover {
    background: var(--highlight);
    border-color: var(--highlight);
}

.project-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--highlight);
    text-decoration: none;
    font-weight: bold;
    border: 2px solid var(--highlight);
    padding: 8px 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: var(--highlight);
    color: var(--text-primary);
}

/* Project Detail Pages */
.project-detail {
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(15, 52, 96, 0.8) 0%, rgba(83, 52, 131, 0.8) 100%);
    border: 3px solid var(--border-color);
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.project-content {
    width: 100%;
}

.project-content h2 {
    font-size: 1.8em;
    color: var(--highlight);
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: bold;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.project-content h2:first-child {
    margin-top: 0;
}

.project-content p {
    color: #ffffff;
    margin-bottom: 15px;
    line-height: 1.8;
    font-size: 1.2em;
}

.project-content ul {
    color: #ffffff;
    margin: 15px 0 15px 30px;
    line-height: 1.8;
    font-size: 1.2em;
}

.project-content ul li {
    margin-bottom: 10px;
    color: #ffffff;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.tech-item {
    background: rgba(83, 52, 131, 0.5);
    border: 2px solid var(--highlight);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.tech-item:hover {
    background: rgba(83, 52, 131, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(233, 69, 96, 0.3);
}

.tech-item h4 {
    color: var(--highlight);
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.tech-item p {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 0;
}

/* Publications Section */
.publications-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.publication-item {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--accent-color) 100%);
    border: 3px solid var(--border-color);
    border-radius: 10px;
    padding: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.publication-item:hover {
    transform: translateX(5px);
    border-color: var(--highlight);
    box-shadow: 0 8px 24px rgba(233, 69, 96, 0.4);
}

.publication-title {
    font-size: 1.6em;
    margin-bottom: 10px;
    color: var(--highlight);
    font-weight: bold;
}

.publication-authors {
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 12px;
    font-size: 1.1em;
}

.publication-description {
    color: var(--text-primary);
    margin-bottom: 15px;
    line-height: 1.6;
}

.publication-link {
    display: inline-block;
    color: var(--highlight);
    text-decoration: none;
    font-weight: bold;
    border: 2px solid var(--highlight);
    padding: 8px 16px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.publication-link:hover {
    background: var(--highlight);
    color: var(--text-primary);
}

/* Publication Detail Page */
.publication-detail .publication-content {
    font-size: 1.2em;
    line-height: 1.8;
}

.publication-detail h3 {
    color: var(--highlight);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.publication-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.back-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--highlight);
}

/* Reading Section */
.reading-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.reading-item {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--accent-color) 100%);
    border: 3px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.reading-item:hover {
    transform: translateY(-5px);
    border-color: var(--highlight);
    box-shadow: 0 8px 24px rgba(233, 69, 96, 0.4);
}

.reading-title {
    font-size: 1.3em;
    margin-bottom: 12px;
    color: var(--highlight);
    font-weight: bold;
}

.reading-description {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.6;
}

.reading-link {
    display: inline-block;
    color: var(--highlight);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.reading-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Contact Section */
.contact-content {
    text-align: center;
}

.contact-content p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-link {
    color: var(--text-primary);
    text-decoration: none;
    padding: 12px 30px;
    border: 2px solid var(--highlight);
    border-radius: 5px;
    background: linear-gradient(135deg, var(--gradient-start) 0%, transparent 100%);
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
}

.contact-link:hover {
    background: linear-gradient(135deg, var(--gradient-end) 0%, var(--gradient-start) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.4);
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px;
    margin-top: 40px;
    border-top: 3px solid var(--border-color);
    color: var(--text-secondary);
}

/* Results Table Styling */
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: rgba(15, 52, 96, 0.6);
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.results-table th,
.results-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.results-table th {
    background: rgba(83, 52, 131, 0.8);
    color: var(--highlight);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

.results-table td {
    color: var(--text-primary);
}

.results-table tbody tr:hover {
    background: rgba(233, 69, 96, 0.1);
}

.results-table .highlight-row {
    background: rgba(233, 69, 96, 0.15);
}

.results-table .highlight-row:hover {
    background: rgba(233, 69, 96, 0.25);
}

/* Project Content Links */
.project-content a {
    color: #64b5f6;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #64b5f6;
    transition: all 0.3s ease;
}

.project-content a:hover {
    color: var(--highlight);
    border-bottom-color: var(--highlight);
    background: rgba(233, 69, 96, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
}

.project-content a.nav-link {
    color: var(--text-primary);
    border-bottom: none;
    border: 2px solid var(--highlight);
}

.project-content a.nav-link:hover {
    padding: 10px 25px;
    border-bottom: none;
    border: 2px solid var(--highlight);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2em;
    }

    .section-title {
        font-size: 1.8em;
    }

    .nav {
        flex-direction: column;
    }

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

    .contact-links {
        flex-direction: column;
    }

    .about-content {
        flex-direction: column;
        align-items: center;
        font-size: 1em;
        gap: 20px;
    }

    .about-text {
        text-align: justify;
    }

    .profile-photo {
        width: 150px;
        height: 150px;
    }

    .section {
        padding: 20px;
        margin-bottom: 30px;
    }

    .container {
        padding: 10px;
    }

    .project-card p,
    .project-card .project-description {
        font-size: 1em;
    }

    .project-content p,
    .project-content ul {
        font-size: 1em;
    }
}

/* Scrollbar Styling for nostalgic feel */
/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--gradient-end) var(--primary-bg);
}

/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--gradient-end) 0%, var(--gradient-start) 100%);
}