/* GLOBAL STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    font-size: 17px;
}

body {
    background-color: #f3f4f6;
    color: #1f2937;
    line-height: 1.6;
    padding: 92px 6% 40px;
}

/* LAYOUT CONTAINER */
.container {
    max-width: 1200px;
    margin: 0 auto;    
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* TOP HERO HEADER */
.hero-header {
    background-color: #1f2937;
    color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.header-main {
    display: flex;
    align-items: center;
    gap: 35px; 
}

/* PROFILE IMAGE */
.profile-img-container {
    width: 175px;
    height: 175px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-dp {
    width: 175px;
    height: 175px;
    border-radius: 50%;
    object-fit: cover;
    border: 3.5px solid #3b82f6;
}

.avatar {
    width: 175px;
    height: 175px;
    background-color: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: #ffffff;
}

.hero-header h1 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 37.5px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

/* SUBTITLE SETUP */
.subtitle {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 500;
}

.university {
    color: #e5e7eb;
    font-size: 1.1rem;
    font-weight: 400;
    margin-top: 2px;
}

.location {
    font-size: 0.9rem;
    color: #60a5fa;
    margin-top: 6px;
}

/* HORIZONTAL CONTACT BAR */
.contact-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    border-top: 1px solid #374151;
    padding-top: 20px;
}

.contact-bar p {
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-bar i {
    color: #3b82f6;
}

.contact-bar a {
    color: #ffffff;
    text-decoration: none;
}

.contact-bar a:hover {
    color: #60a5fa;
}

/* MAIN BODY SECTION */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* TOP ROW - full-width stacked cards, aligned with every other section */
.top-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.card {
    background-color: #ffffff;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.card h2 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 20.25px;
    color: #111827;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 10px;
}

.card h2 i {
    color: #3b82f6;
}

.card p {
    margin-bottom: 15px;
    color: #4b5563;
}

/* TECHNICAL SKILLS SECTION GRID */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 18px 34px;
}

.skill-group {
    padding-bottom: 2px;
    min-width: 0;
}

.skill-group h4 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    color: #6b7280;
    letter-spacing: 0.8px;
    margin-bottom: 5px;
    font-weight: 700;
}

.skill-group p {
    font-size: 0.95rem;
    color: #1f2937;
    font-weight: 500;
    margin-bottom: 0;
}

/* TIMELINE ENTRIES */
.timeline-item {
    margin-bottom: 52px;
    padding-left: 20px;
    border-left: 2px solid #e5e7eb;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
}

.timeline-header h3 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 17.25px;
    color: #1f2937;
}

.date {
    font-size: 0.98rem; 
    color: #6b7280;
    font-weight: 600;
    white-space: nowrap;
}

.company {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 10px;
    color: #4b5563;
}

.company-logo {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    margin-right: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.sub-role {
    font-weight: 700;
    font-size: 0.92rem;
    color: #3b82f6;
    letter-spacing: 0.2px;
    margin: 14px 0 4px;
}

/* Multiple roles at one company (e.g. intern -> contract) */
.company-title {
    color: #1f2937;
    text-decoration: none;
}

.company-title:hover {
    color: #3b82f6;
}

.role-progression {
    border-left: 2px solid #bfdbfe;
    padding-left: 12px;
    margin: 6px 0 10px;
}

.role-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 2px 0;
}

.role-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #374151;
}

.role-type {
    font-weight: 500;
    color: #6b7280;
}

.role-row .date {
    font-size: 0.88rem;
}

.advisor {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: -6px;
    margin-bottom: 10px;
}

.company a {
    color: #3b82f6;
    text-decoration: none;
}

.company a:hover {
    text-decoration: underline;
}

/* Publication author list (academic style) */
.pub-authors {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.55;
}

.pub-authors .pub-me {
    color: #3b82f6;
    font-weight: 700;
}

.pub-venue {
    font-style: italic;
    font-size: 0.92rem;
    color: #4b5563;
}

.pub-links a {
    margin-right: 18px;
    color: #3b82f6;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}

.pub-links a:hover {
    text-decoration: underline;
}

/* Tight, even vertical rhythm inside publication entries
   (id-scoped so it beats .card p's 15px bottom margin) */
#publications .pub-authors { margin: 2px 0 6px; }
#publications .pub-venue   { margin: 0 0 6px; }
#publications .pub-links   { margin: 8px 0 10px; }
#publications ul           { margin: 0 0 0 20px; }

.main-content ul {
    margin-left: 20px;
    color: #4b5563;
    font-size: 0.95rem;
}

.main-content li {
    margin-bottom: 6px;
}

/* PROJECT CONFIGURATION */
.project-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.project-card {
    background-color: #f9fafb;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #3b82f6; 
}

.project-card h4 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #1f2937;
    font-size: 16.5px;
    margin-bottom: 4px;
}

.project-date {
    font-size: 0.93rem; 
    color: #9ca3af;
    margin-bottom: 12px !important;
}

.project-card p {
    font-size: 0.95rem;
    color: #4b5563;
    margin-bottom: 0;
}

/* Award entries with a certificate thumbnail */
#awards .award-item,
#extracurricular .award-item {
    display: flex;
    align-items: center;
    gap: 22px;
}

#awards .award-thumb,
#extracurricular .award-thumb {
    flex: 0 0 170px;
    width: 170px;
}

#awards .award-thumb img,
#extracurricular .award-thumb img {
    display: block;
    width: 100%;
    height: 124px;
    object-fit: cover;
    object-position: center top;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#awards .award-thumb a:hover img,
#extracurricular .award-thumb a:hover img {
    border-color: #3b82f6;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.18);
}

#awards .award-body,
#extracurricular .award-body {
    flex: 1;
    min-width: 0;
}

@media (max-width: 700px) {
    #awards .award-item,
#extracurricular .award-item {
        flex-direction: column;
        gap: 14px;
    }
    #awards .award-thumb,
#extracurricular .award-thumb {
        flex: 0 0 auto;
        width: 100%;
        max-width: 260px;
    }
}

/* RESPONSIVE DESIGN FOR SMALLER SCREENS */
@media (max-width: 950px) {
    body {
        padding: 84px 4% 30px;
    }
}

@media (max-width: 750px) {
    body {
        padding: 80px 15px 30px;
    }
    .header-top-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .header-main {
        flex-direction: column;
        text-align: center;
    }
    .contact-bar {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    .top-grid {
        grid-template-columns: 1fr;
    }
    .timeline-header,
    .role-row {
        flex-direction: column;
        gap: 4px;
    }
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    .nav-toggle {
        display: block;
    }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background: rgba(17, 24, 39, 0.98);
        padding: 0 20px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }
    .nav-links.open {
        max-height: 440px;
        padding: 6px 20px 16px;
    }
    .nav-links li {
        width: 100%;
    }
    .nav-links a {
        display: block;
        padding: 11px 0;
        width: 100%;
    }
    .nav-cta {
        display: inline-block;
        margin-top: 6px;
    }
}

/* ============================================================
   INTERACTIVE ENHANCEMENTS
   ============================================================ */

html {
    scroll-behavior: smooth;
}

/* Scroll progress bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    z-index: 1000;
    transition: width 0.12s linear;
}

/* Hero: subtle gradient + entrance animation */
.hero-header {
    background: linear-gradient(135deg, #111827 0%, #1f2937 58%, #243b53 100%);
    animation: heroIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes heroIn {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: none; }
}

/* Scroll-reveal (applied via JS) */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal.in-view {
    opacity: 1;
    transform: none;
}

/* Cards stay static on hover (no lift) so they don't look clickable */

/* Project cards stay fully static (no hover pop) */

/* Timeline entries: just a subtle blue accent bar on hover (no slide) */
.timeline-item {
    transition: border-left-color 0.3s ease;
}

.timeline-item:hover {
    border-left-color: #3b82f6;
}

/* Profile photo stays static (it isn't clickable) */

/* Animated underline for contact links */
.contact-bar a {
    position: relative;
}

.contact-bar a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 0;
    height: 2px;
    background: #60a5fa;
    transition: width 0.3s ease;
}

.contact-bar a:hover::after {
    width: 100%;
}

/* Generic link transitions */
a {
    transition: color 0.2s ease, opacity 0.2s ease;
}

/* Underline resource captions on hover so users know they're clickable */
.project-card a:hover,
.timeline-item ul a:hover {
    text-decoration: underline !important;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ============================================================
   NAVIGATION BAR
   ============================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
}

.nav-inner {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 20px;
}

.nav-logo {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.3px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-logo:hover {
    color: #60a5fa;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 0;
}

.nav-links a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #60a5fa;
}

.nav-cta {
    background: #3b82f6;
    color: #ffffff !important;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-cta:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.35rem;
    cursor: pointer;
    line-height: 1;
}

/* offset so anchor links land below the fixed navbar */
.card {
    scroll-margin-top: 82px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    padding: 8px 0 2px;
}

.site-footer a {
    color: #3b82f6;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* ============================================================
   BACK TO TOP BUTTON
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: #3b82f6;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
    z-index: 800;
}

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

.back-to-top:hover {
    background: #2563eb;
    transform: translateY(-3px);
}