@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Orbitron', sans-serif;
    background-color: #0e0b16;
    color: #e84545;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.link-section img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 10px;
    margin-right: 20px;
}

#main-content {
    position: sticky;
    top: 0;
    background-color: #1a1a2e;
    padding: 0 20px;
    border-bottom: 4px solid #e84545;
    z-index: 1000;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

nav a {
    color: #e84545;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
    padding: 15px 0;
    display: inline-block;
}

nav a:hover {
    color: #903749;
}

nav .cv-link {
    background-color: #e84545;
    color: #1a1a2e;
    padding: 8px 18px;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav .cv-link:hover {
    background-color: #903749;
    color: #fff;
}

.title-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 1;
    margin: 0;
    padding: 0;
}

.title-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(10px);
    z-index: 0;
}

.title-content {
    position: relative;
    z-index: 2;
    text-align: center;
    background-color: rgba(14, 11, 22, 0.65);
    padding: 30px 50px;
    border-radius: 12px;
}

.title-content h1 {
    font-size: 3rem;
    color: #e84545;
}

#rotating-text {
    color: #e84545;
    font-style: italic;
    transition: opacity 0.3s ease;
    font-size: 3rem;
}

.blinking-cursor::after {
    content: '|';
    opacity: 1;
    margin-left: 5px;
    animation: blink 0.5s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.Logo-Pic {
    width: 50px;
    border-radius: 50%;
    margin: 8px 0;
    display: block;
}

section {
    padding: 40px 20px;
    text-align: center;
    background-color: #1a1a2e;
    margin: 10px 20px;
    border-radius: 10px;
}

#about p, #hobbies p, #Portfolio p, #Awards p, #Research > p {
    max-width: 800px;
    margin: 0 auto;
    color: #f2f2f2;
}

#experience-education-section {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.experience-section {
    flex: 1 1 100%;
    padding: 20px;
    background-color: #1f4068;
    color: #f2f2f2;
    border-radius: 8px;
    text-align: left;
}

.education-section {
    flex: 1 1 100%;
    padding: 20px;
    background-color: #1f4068;
    color: #f2f2f2;
    border-radius: 8px;
    text-align: left;
}

.skills-section {
    flex: 1 1 100%;
    min-width: 250px;
    padding: 20px;
    background-color: #162447;
    color: #f2f2f2;
    border-radius: 8px;
    text-align: left;
}

.experience-item, .education-item {
    margin-bottom: 20px;
}

.experience-item p, .education-item p {
    color: #f2f2f2;
}

h4 {
    font-size: 1.2rem;
    color: #e84545;
    margin-bottom: 8px;
}

ul {
    list-style-type: square;
    margin-left: 20px;
}

.skills-section ul {
    list-style: none;
    padding: 0;
}

.skills-section li {
    margin-bottom: 10px;
}

.skills-section strong {
    color: #e84545;
}

.year-buttons {
    text-align: center;
    margin: 20px 0;
}

.year-buttons button {
    margin: 5px;
    padding: 10px 24px;
    font-size: 1rem;
    font-family: 'Orbitron', sans-serif;
    color: #e84545;
    background-color: #1a1a2e;
    border: 2px solid #e84545;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.year-buttons button:hover {
    background-color: #e84545;
    color: #1a1a2e;
}

.year-buttons button.active {
    background-color: #e84545;
    color: #1a1a2e;
}

.year-section {
    display: none;
    margin: 30px 0;
}

.year-section.visible {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.year-section h3 {
    grid-column: 1 / -1;
}

.project-card {
    background-color: #1f4068;
    padding: 20px;
    border-radius: 10px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.project-card:hover {
    transform: translateY(-5px);
    background-color: #162447;
}

.project-card::after {
    content: "Click to Learn More!";
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: #f2f2f2;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover::after {
    opacity: 1;
}

.project-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.project-image {
    width: 100%;
    height: 140px;
    border-radius: 8px;
    margin-bottom: 10px;
    object-fit: contain;
}

.about-container {
    display: flex;
    align-items: center;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    color: #e84545;
    margin-bottom: 20px;
}

.about-text p {
    font-size: 1rem;
    line-height: 1.6;
}

.about-image img {
    width: 250px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

#hobbies {
    margin-top: 10px;
}

.hobby {
    display: flex;
    align-items: center;
    border: 1px solid #1a1a2e;
    border-radius: 5px;
    padding: 15px;
    margin: 15px 0;
    background-color: #162447;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

.hobby img {
    width: 150px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 20px;
}

.hobby-content {
    flex: 1;
}

.hobby-content h3 {
    margin: 0;
    font-size: 1.5em;
    color: #e84545;
    text-align: left;
}

.hobby-content p {
    margin-top: 8px;
    font-size: 1em;
    color: #f2f2f2;
    text-align: left;
}

#Social img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 10px;
    margin: 5px 10px;
    transition: transform 0.2s ease;
}

#Social img:hover {
    transform: scale(1.1);
}

h3 {
    color: #e84545;
}

footer {
    margin-top: auto;
    text-align: center;
    padding: 15px 20px;
    background-color: #1a1a2e;
    border-top: 2px solid #e84545;
    color: #f2f2f2;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

footer p {
    flex: 1;
    text-align: center;
}

footer a {
    color: #e84545;
}

.Footer-Logo {
    width: 30px;
    height: auto;
    transition: transform 0.2s ease;
}

.Footer-Logo:hover {
    transform: scale(1.1);
}

.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.research-card {
    background-color: #1f4068;
    padding: 24px;
    border-radius: 10px;
    text-align: left;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.research-card:hover {
    transform: translateY(-5px);
    background-color: #162447;
}

.research-card h4 {
    margin-bottom: 10px;
}

.research-abstract {
    color: #f2f2f2;
    font-size: 0.95rem;
    line-height: 1.6;
}

.research-card .research-link {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background-color: #e84545;
    color: #1a1a2e;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.research-card .research-link:hover {
    background-color: #903749;
    color: #fff;
}

/* Responsive styles for tablet and mobile */
@media only screen and (max-width: 960px) {
    #main-content {
        position: sticky;
        top: 0;
        background-color: #1a1a2e;
        z-index: 1000;
    }

    header {
        flex-wrap: wrap;
    }

    nav {
        overflow: hidden;
        width: 100%;
    }

    nav ul {
        display: none;
        flex-direction: column;
        background-color: #1a1a2e;
        width: 100%;
        top: 0px;
        left: 0;
        z-index: 1;
        padding: 10px;
        text-align: left;
        gap: 0;
    }

    nav ul.active {
        display: flex;
    }

    nav a {
        color: #e84545;
        padding: 12px 0px;
        text-decoration: none;
        font-size: 1.1rem;
        display: block;
        width: 100%;
        text-align: center;
    }

    nav a:hover {
        color: #903749;
    }

    nav .cv-link {
        display: inline-block;
        width: auto;
        margin: 8px auto;
    }

    .hamburger {
        display: block;
        cursor: pointer;
        color: #e84545;
        font-size: 2rem;
        background: none;
        border: none;
        font-family: inherit;
    }

    .hamburger:hover {
        color: #903749;
    }

    .title-content h1 {
        font-size: 1.8rem;
    }

    #rotating-text {
        font-size: 1.8rem;
    }

    .title-content {
        padding: 20px 25px;
    }

    #Social img {
        width: 50px;
        height: 50px;
        object-fit: cover;
        border-radius: 10px;
        margin: 5px 10px;
    }

    .about-container {
        flex-direction: column;
        text-align: center;
    }

    .about-image img {
        width: 200px;
    }

    .hobby {
        flex-direction: column;
        text-align: center;
    }

    .hobby img {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .hobby-content h3,
    .hobby-content p {
        text-align: center;
    }

    #experience-education-section {
        flex-direction: column;
    }

    .year-section.visible {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    section {
        margin: 10px 12px;
        padding: 30px 16px;
    }

    footer {
        flex-direction: column;
        gap: 8px;
    }
}

/* Small mobile styles */
@media only screen and (max-width: 600px) {
    .title-content h1 {
        font-size: 1.3rem;
    }

    #rotating-text {
        font-size: 1.3rem;
    }

    .title-content {
        padding: 15px 18px;
    }

    h2 {
        font-size: 1.3rem;
    }

    h4 {
        font-size: 1rem;
    }

    .about-image img {
        width: 180px;
    }

    .hobby img {
        width: 120px;
    }

    .year-buttons button {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .year-section.visible {
        grid-template-columns: 1fr;
    }

    .project-image {
        height: 120px;
    }

    section {
        margin: 8px 8px;
        padding: 25px 12px;
    }

    .experience-section,
    .education-section,
    .skills-section {
        padding: 15px;
    }

    .skills-section li {
        font-size: 0.85rem;
    }

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

    .research-card {
        padding: 18px;
    }

    .research-abstract {
        font-size: 0.85rem;
    }

    footer p {
        font-size: 0.8rem;
    }
}

/* Ensure hamburger is hidden on larger screens */
@media only screen and (min-width: 961px) {
    .hamburger {
        display: none;
    }

    nav ul {
        display: flex;
        gap: 30px;
    }
}