/*
Theme Name: Custom Academic Theme - Two-Column Layout
Author: Your Name
Description: A custom theme for academic portfolio with a two-column layout.
Version: 1.3
*/

:root {
    --primary-color: #4A90E2; /* A professional blue */
    --secondary-color: #81D8D0; /* Tiffany Blue for highlights */
    --skill-color-1: #e74c3c; /* A warm red for Languages */
    --skill-color-2: #f39c12; /* A friendly orange for Tools */
    --skill-color-3: #2980b9; /* A deeper blue for Frameworks */
    --dark-background: #2c3e50; /* A deep, modern slate blue */
    --light-background: #f8f9fa; /* A very light grey for the body */
    --text-color: #34495e; /* A softer, more readable dark grey */
    --light-text-color: #ecf0f1; /* Light text for dark backgrounds */
    --border-radius: 8px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Lato', Arial, sans-serif;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    background-color: var(--light-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.wrapper {
    display: grid;
    grid-template-columns: 1fr 2.5fr; /* Sidebar takes 1 part, main content 2.5 parts */
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
}

/* --- Sidebar Styles --- */
.sidebar {
    /* REMOVED fixed height to allow content to grow */
}

.sidebar-content {
    display: flex;
    flex-direction: column;
}

.profile {
    text-align: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.profile-pic {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, var(--primary-color), var(--secondary-color)) border-box;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.25),
                0 0 0 0 rgba(129, 216, 208, 0.4);
    transition: var(--transition);
    animation: pulse 3s ease-in-out infinite;
}

.profile-pic:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 32px rgba(74, 144, 226, 0.35),
                0 0 0 10px rgba(129, 216, 208, 0.1);
}

.profile h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8em;
    margin: 0 0 10px 0;
    color: var(--dark-background);
}

.profile p {
    font-size: 1em;
    color: var(--text-color);
    margin: 0;
}

.sidebar-section {
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-section:last-of-type {
    border-bottom: none;
}

.sidebar-section h2 {
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--dark-background);
    margin-top: 0;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
    font-weight: 700;
}

.sidebar-section h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.social-icons {
    display: flex;
    justify-content: flex-start;
    gap: 50px;
    flex-wrap: wrap;
    padding-left: 25px;
}

.social-icons .icon-link {
    display: inline-block;
    width: 40px;
    height: 40px;
    transition: var(--transition);
}

.social-icons svg {
    width: 100%;
    height: 100%;
    transition: var(--transition);
}

.social-icons .icon-link:hover {
    transform: translateY(-5px) scale(1.1);
}

.education-timeline {
    position: relative;
    padding-left: 10px;
}

.education-entry {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    position: relative;
}

.education-entry:last-child {
    margin-bottom: 0;
}

.education-entry::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 35px;
    bottom: -25px;
    width: 2px;
    background: linear-gradient(to bottom, var(--secondary-color), transparent);
}

.education-entry:last-child::before {
    display: none;
}

.edu-icon {
    min-width: 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    box-shadow: 0 3px 10px rgba(74, 144, 226, 0.3);
    transition: var(--transition);
}

.edu-icon i {
    color: white;
    font-size: 1em;
}

.education-entry:hover .edu-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.5);
}

.edu-content {
    flex: 1;
}

.edu-content h3 {
    margin: 0 0 5px 0;
    font-size: 0.95em;
    color: var(--dark-background);
    font-weight: 700;
    line-height: 1.4;
}

.edu-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    transition: var(--transition);
}

.edu-content a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* --- Skills Section in Sidebar --- */
.skills-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-left: 10px;
}

.skill-group-card h3 {
    margin: 0 0 10px 0;
    font-size: 0.85em;
    color: var(--dark-background);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 0;
}

.skill-group-card h3 i {
    color: var(--primary-color);
    font-size: 1em;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.skill-tags span {
    font-size: 0.75em;
    background: white;
    color: var(--text-color);
    padding: 5px 10px;
    border-radius: 12px;
    transition: var(--transition);
    border: 1px solid #e0e0e0;
}

.skill-tags span:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(129, 216, 208, 0.3);
}

/* --- Main Content Styles --- */
.main-content section {
    background: #fff;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    /* Animation */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease-out forwards;
}

/* Staggered animation for sections */
.main-content section:nth-of-type(1) { animation-delay: 0.1s; }
.main-content section:nth-of-type(2) { animation-delay: 0.2s; }
.main-content section:nth-of-type(3) { animation-delay: 0.3s; }

.main-content h2 {
    font-size: 2em;
    margin-top: 0;
}

#publications ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#publications li {
    margin-bottom: 20px;
    padding: 20px;
    border-left: 5px solid var(--secondary-color);
    background: var(--light-background);
    border-radius: 6px;
    transition: var(--transition);
}

#publications li:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

#publications a {
    font-weight: bold;
    color: var(--text-color);
    text-decoration: none;
}

#publications a:hover {
    color: var(--primary-color);
}

#publications span, #publications em {
    display: block;
    margin-top: 5px;
    color: #555;
}

#publications em { font-style: italic; color: #777; }

footer {
    text-align: center;
    padding: 20px;
    color: #777;
    font-size: 0.9em;
    grid-column: 1 / -1; /* Span across all columns */
    margin-top: -30px; /* Offset the section margin */
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(74, 144, 226, 0.25),
                    0 0 0 0 rgba(129, 216, 208, 0.4);
    }
    50% {
        box-shadow: 0 8px 24px rgba(74, 144, 226, 0.25),
                    0 0 0 8px rgba(129, 216, 208, 0.15);
    }
}

/* --- Responsive Design --- */

/* Tablet and below (1024px) */
@media (max-width: 1024px) {
    .wrapper {
        grid-template-columns: 1fr; /* Stack columns */
        padding: 30px 20px;
        gap: 30px;
    }

    .sidebar {
        position: static;
        height: auto;
    }

    .social-icons {
        gap: 30px;
        justify-content: center;
        padding-left: 0;
    }

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

/* Mobile landscape and portrait tablet (768px) */
@media (max-width: 768px) {
    .wrapper {
        padding: 20px 15px;
        gap: 25px;
    }

    .profile h1 {
        font-size: 1.5em;
    }

    .profile p {
        font-size: 0.95em;
    }

    .profile-pic {
        width: 130px;
        height: 130px;
    }

    .main-content section {
        padding: 20px;
    }

    .main-content h2 {
        font-size: 1.6em;
    }

    .social-icons {
        gap: 20px;
    }

    .social-icons .icon-link {
        width: 35px;
        height: 35px;
    }

    #publications li {
        padding: 15px;
        margin-bottom: 15px;
    }

    /* Center education and skills content only, keep titles aligned left */
    .skills-container {
        padding-left: 0;
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
    }

    .education-timeline {
        padding-left: 0;
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Mobile portrait (480px) */
@media (max-width: 480px) {
    .wrapper {
        padding: 15px 10px;
        gap: 20px;
    }

    .profile {
        padding-bottom: 15px;
        margin-bottom: 15px;
    }

    .profile h1 {
        font-size: 1.3em;
    }

    .profile p {
        font-size: 0.9em;
    }

    .profile-pic {
        width: 110px;
        height: 110px;
        border: 3px solid transparent;
    }

    .sidebar-section {
        padding: 15px 0;
    }

    .sidebar-section h2 {
        font-size: 1em;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }

    .social-icons {
        gap: 15px;
        padding-left: 0;
    }

    .social-icons .icon-link {
        width: 32px;
        height: 32px;
    }

    /* Center education and skills content only, keep titles aligned left */
    .skills-container {
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
    }

    .education-timeline {
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
    }

    .education-entry {
        margin-bottom: 20px;
    }

    .edu-icon {
        min-width: 32px;
        width: 32px;
        height: 32px;
        margin-right: 12px;
    }

    .edu-icon i {
        font-size: 0.9em;
    }

    .edu-content h3 {
        font-size: 0.9em;
    }

    .edu-content a {
        font-size: 0.85em;
    }

    .skill-group-card h3 {
        font-size: 0.8em;
    }

    .skill-tags {
        gap: 5px;
    }

    .skill-tags span {
        font-size: 0.7em;
        padding: 4px 8px;
    }

    .main-content section {
        padding: 15px;
        margin-bottom: 20px;
    }

    .main-content h2 {
        font-size: 1.4em;
        margin-bottom: 15px;
    }

    #about p {
        font-size: 0.95em;
        text-align: left;
    }

    #publications li {
        padding: 12px;
        margin-bottom: 12px;
        border-left-width: 3px;
    }

    #publications a {
        font-size: 0.95em;
    }

    #publications span,
    #publications em {
        font-size: 0.85em;
        margin-top: 4px;
    }

    footer {
        font-size: 0.8em;
        padding: 15px;
    }
}

#about p {
    text-align: justify;
}
