 /* ---------- RESET & GLOBAL ---------- */
 * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background-color: #121212;
    color: #e8e8e8;
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* focus state for keyboard navigation */
a:focus-visible, button:focus-visible, .social-btn:focus-visible {
    outline: 2px solid #569cd6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- NAVBAR (sticky, clean) ---------- */
.navbar {
    background-color: #1e1e1e;
    padding: 0.75rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #2c2c2c;
}

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

.navbar-left h1 {
    font-size: 1.6rem;
    color: #ffffff;
    letter-spacing: -0.5px;
    font-weight: 600;
}

.navbar-right ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    flex-wrap: wrap;
}

.navbar-right ul li a {
    color: #dcdcdc;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.4s ease-in-out;
}

.navbar-right ul li a:hover {
    color: #569cd6;    
    text-decoration: none;
}

/* ---------- MAIN CONTAINER ---------- */
.container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #1e1e1e;
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* header */
header {
    text-align: center;
    margin-bottom: 2.5rem;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #9cdcfe 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

header h2 {
    font-size: 1.4rem;
    font-weight: 400;
    color: #569cd6;
    margin-top: 0.5rem;
}

/* section headings */
section {
    margin-bottom: 3rem;
    scroll-margin-top: 5rem;
}

section h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #d7e7f6;
    border-left: 4px solid #569cd6;
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}

/* about section */
.about-container {
    overflow: auto;  /* clears float */
}

.profile-picture {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 50%;
    float: right;                /* text flows around it */
    shape-outside: circle(50%); /* text follows circular shape */
    shape-margin: 1.2rem;       /* gap between text and circle */
    margin: 0 0 1rem 1.5rem;    /* spacing from text */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    border: 3px solid #569cd6;
}


.about-container p {
    flex: 1;
    font-size: 1.05rem;
    line-height: 1.65;
    color: #e0e0e0;
}

/* lists (experience, education) */
ul {
    list-style: none;
}

ul li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

ul li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: #569cd6;
    font-size: 1rem;
}

a {
    color: #9cdcfe;
    text-decoration: none;
    transition: color 0.4s ease-in-out;  /* slow color change */
}

a:hover {
    color: #569cd6;
    text-decoration: none;
}

/* skills pills */
.skills span {
    display: inline-block;
    background: #2d2d2d;
    color: #e0e0e0;
    padding: 0.4rem 1rem;
    border-radius: 40px;
    margin: 0.4rem 0.4rem 0 0;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #3a3a3a;
    transition: all 0.2s;
}

.skills span:hover {
    background: #569cd6;
    color: #121212;
    border-color: #569cd6;
}

/* tables (publications & talks) */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.95rem;
}

th, td {
    padding: 12px 10px;
    text-align: left;
    vertical-align: top;
}

th {
    background-color: #252525;
    color: #9cdcfe;
    font-weight: 600;
    border-bottom: 2px solid #569cd6;
}

tr {
    border-bottom: 1px solid #2e2e2e;
}

tr:nth-child(even) {
    background-color: #1a1a1a;
}

/* special style for year cells (previously inline bg) */
.year-cell {
    background-color: #252526;
    font-weight: 600;
    color: #d7e7f6;
    border-right: 1px solid #3a3a3a;
}

/* social buttons */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.social-btn {
    background-color: #2c2c2c;
    color: #e8e8e8;
    padding: 0.6rem 1.5rem;
    border-radius: 40px;
    font-weight: 500;
    transition: all 0.25s;
    display: inline-block;
    border: 1px solid #3f3f3f;
    transition: background-color 0.3s, color 0.3s, transform 0.2s;
}

.social-btn:hover {
    background-color: #569cd6;
    color: #121212;
    text-decoration: none;
    border-color: #569cd6;
    transform: translateY(-2px);
}

footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #2c2c2c;
    font-size: 0.85rem;
    color: #888;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #569cd6;
    color: #121212;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s, transform 0.2s, visibility 0.3s;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

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

.back-to-top:hover {
    background-color: #9cdcfe;
    transform: translateY(-3px);
}

.back-to-top i {
    font-size: 1.4rem;
}

/* ---------- RESPONSIVE (Mobile first) ---------- */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
    }
    .navbar-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    .navbar-right ul {
        justify-content: center;
        gap: 1rem;
    }
    .navbar-right ul li a {
        font-size: 0.9rem;
    }
    .container {
        margin: 1rem;
        padding: 1.2rem;
    }
    header h1 {
        font-size: 2.2rem;
    }
    header h2 {
        font-size: 1.1rem;
    }
    .profile-picture {
        float: none;
        shape-outside: none;
        display: block;
        margin: 0 auto 1.5rem auto;
    }
    .about-container {
        text-align: center;
    }
    .about-container p {
        text-align: left;
    }
    section h3 {
        font-size: 1.5rem;
    }
    table, th, td {
        font-size: 0.8rem;
    }
    th, td {
        padding: 8px 6px;
    }
    .skills span {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }

    .back-to-top {
        bottom: 1.2rem;
        right: 1.2rem;
        width: 44px;
        height: 44px;
    }
}

/* small devices */
@media (max-width: 480px) {
    .navbar-right ul {
        gap: 0.7rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    .social-btn {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
    .container {
        padding: 1rem;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}

/* print styles */
@media print {
    .navbar, .social-links, footer {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
    .container {
        box-shadow: none;
        margin: 0;
        padding: 0;
    }
    a {
        color: black;
        text-decoration: none;
    }
}