#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#loading-screen img {
    width: 300px;
    height: auto;
}

#loading-screen {
    transition: opacity 0.5s ease;
}

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

/* Variables */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --transition: all 0.3s ease;
}

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Header Styles */
/* .header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem 0;
    text-align: center;
} */
/* .header {
    background: url('https://i.gifer.com/QWc9.gif') center center/cover;
    position: relative;
    color: white;
    padding: 3rem 0;
    text-align: center;
} */

/* Import Coding Font */
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;700&display=swap');

/* Header */
.header {
    background: url('https://i.gifer.com/QWc9.gif') center center/cover;
    position: relative;
    color: white;
    padding: 3rem 0;
    text-align: center;
    font-family: 'Source Code Pro', monospace;
}

/* Profile Image */
/* .profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 4px solid white;
    margin-bottom: 1.5rem;
} */

/* Static Text */
.static-text {
    margin: 0;
    padding: 0.5rem 0;
    font-size: 1.5rem;
}

/* Larger Text for Name */
.static-text.large {
    font-size: 2.5rem;
    font-weight: bold;
}

/* Typing Text */
.typing-text {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    border-right: 2px solid white;
    font-size: 1.5rem;
}

/* Typing Animations */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    from { border-right-color: white; }
    to { border-right-color: transparent; }
}

/* Blinking Cursor */
.typing-text {
    animation: blink 0.5s step-end infinite;
}



/* Add an overlay to make text more readable */
/* .header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.header .container {
    position: relative;
    z-index: 2;
}
 */

.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 4px solid white;
    margin-bottom: 1.5rem;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.profile-img:hover {
    transform: scale(1.05);
}

.typing-text {
    margin-top: 1rem;
    font-size: 1.2rem;
    font-weight: 300;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.section {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.edu-item .date {
    color: gray;
    font-size: 0.8rem;
    font-style: oblique;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
    align-items: stretch; /* This will stretch all items to the same height */
}

/* .achievement-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
} */

.achievement-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    height: 250px;  /* Fixed height */
    max-height: 250px; /* Max height to avoid excessive stretching */
    overflow-y: auto;  /* Allow scrolling if content exceeds the height */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}


.achievement-card:hover {
    transform: translateY(-5px);
}

.achievement-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.achievement-card p {
    margin: 0.3rem 0;
}

.achievement-card span {
    font-weight: 600;
}

.achievement-card .location {
    color: #666;
    font-size: 0.9rem;
}

.achievement-card .year {
    color: var(--primary-color);
    font-weight: 500;
    margin-top: 0.5rem;
}

.achievement-card sup {
    font-size: 0.6em;
    font-weight: normal;
}

.achievement-card {
    /* Styling for the individual cards */
    border: 1px solid #ddd;
    padding: 15px;
    margin: 10px;
    background-color: #f9f9f9;
}

/* .hidden {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-out;
} */

.hidden {
    display: none;
}


.achievements-grid a {
    opacity: 1;
    transition: opacity 0.3s ease-out;
}

.achievements-grid a:not(.hidden) {
    opacity: 1;
}


.toggle-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
    display: inline-block;
}

.toggle-button:focus {
    outline: 2px solid var(--primary-color); /* Adds a focus ring around the button */
}

.toggle-button:hover {
    background-color: #45a049;
}


/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skills-list, .language-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1rem;
}

.skills-list li {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
}

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

.language-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.language-name {
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.language-level {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: white;
}

.native {
    background: #2ecc71;
}

.c1 {
    background: #3498db;
}

.b2 {
    background: #9b59b6;
}

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

.research-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.research-item:hover {
    transform: translateY(-5px);
}

.research-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.research-item .date {
    color: gray;
    font-size: 0.8rem;
    font-style: oblique;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline-item {
    padding: 1.5rem;
    border-left: 2px solid var(--primary-color);
    margin-left: 1rem;
    position: relative;
}

.timeline-item .date {
    color: gray;
    font-size: 0.6rem;
    font-style: oblique;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 1.5rem;
    width: 1rem;
    height: 1rem;
    background: var(--primary-color);
    border-radius: 50%;
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-5px);
    background: var(--primary-color);
    color: white;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--primary-color);
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 2rem 0;
    }
    
    .main-content {
        padding: 0 1rem;
    }
    
    .section {
        padding: 1.5rem;
    }
}

#message {
    margin-top: 2rem;
    padding: 2rem;
    background-color: #f9f9f9;
    border-radius: 10px;
}

#message h2 {
    text-align: center;
    margin-bottom: 1rem;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

input, textarea {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

button.btn {
    padding: 0.75rem;
    border: none;
    background-color: #007bff;
    color: white;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button.btn:hover {
    background-color: #0056b3;
}

#dynamic-line {
    font-size: 1.5rem;  /* Adjust size as needed */
    white-space: nowrap; /* Prevent text from wrapping and changing the width */
    overflow: hidden;    /* Hide overflowed content */
    display: inline-block;
    min-width: 100%;     /* Ensure it takes up at least the full width of its container */
    height: 2rem;        /* Set a height for the typing effect */
    line-height: 2rem;   /* Set line-height to align text properly */
}