/*
 * Copyright © 2026 Siva Prabhakar (https://sivaprabhakar.in). All Rights Reserved.
 * Base Design: Copyright © 2026 Jaisal E. K. (https://jaisal.in). Base Design Reuse Rights Reserved.
 * Design completed and handed over to Siva Prabhakar on 27 February 2026. Provided as a finished project
 * for independent use and maintenance, without ongoing warranties or liabilities.
 */

:root {
    --bg-base: #f7f6f3;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-main: #1c1c1c;
    --text-muted: #5a5a5a;
    --accent: #3E0097;
    --accent-light: rgba(62, 0, 151, 0.1);
    --font-display: 'Instrument Serif', serif;
    --font-sans: 'Inter', sans-serif;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 12px 48px rgba(62, 0, 151, 0.12);
}

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

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background-color: var(--bg-base);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.ambient-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 15% 50%, rgba(62, 0, 151, 0.05), transparent 50%),
                radial-gradient(circle at 85% 30%, rgba(138, 43, 226, 0.03), transparent 50%);
    filter: blur(60px);
}

.glass-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.02);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-compact {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    cursor: pointer;
}

.avatar-small {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.profile-text {
    display: flex;
    flex-direction: column;
}

.name-title-small {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1;
}

.subtitle-small {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 0.05em;
}

.social-links-grid {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    gap: 0.3rem 0.6rem;
    margin-left: 1.5rem;
    border-left: 1px solid rgba(0,0,0,0.1);
    padding-left: 1.5rem;
    cursor: default;
}

.social-links-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.social-links-grid a:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
}

.social-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.social-links-grid a:hover .social-icon {
    opacity: 1;
}

.hamburger-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
    z-index: 200;
}

.nav-links-top {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    min-width: 260px;
    box-shadow: var(--shadow-hover);
    padding: 0.5rem;
    z-index: 200;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-dropdown:hover .dropdown-content {
    display: flex;
}

.nav-dropdown > .nav-item i {
    transition: transform 0.3s ease;
}

.nav-dropdown:hover > .nav-item i,
.nav-dropdown.open > .nav-item i {
    transform: rotate(180deg);
}

.dropdown-item {
    background: transparent;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.dropdown-item:hover, .dropdown-item.active {
    background: var(--accent-light);
    color: var(--accent);
}

.nav-item {
    background: transparent;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 100px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.5);
}

.nav-item.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(62, 0, 151, 0.15);
}

.mobile-social-card {
    display: none;
}

.mobile-social-links-grid {
    display: grid;
    grid-template-columns: repeat(6, max-content);
    justify-content: center;
    gap: 1.2rem;
}

.mobile-social-links-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-light);
    transition: transform 0.3s ease;
}

.mobile-social-links-grid a:hover {
    transform: translateY(-2px);
}

.mobile-social-links-grid .social-icon {
    width: 22px;
    height: 22px;
    opacity: 0.8;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.tab-panel {
    display: none;
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tab-panel.active {
    display: block;
}

@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: var(--text-main);
    line-height: 1;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    grid-auto-rows: minmax(min-content, max-content);
}

.overview-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr;
    min-height: calc(100vh - 189px);
}

.bento-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.span-1 { grid-column: span 1; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }

.profile-card-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
}

.profile-main-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.profile-text-content {
    display: flex;
    flex-direction: column;
}

.art-nav-card {
    background-color: #ffffff;
    background-image: radial-gradient(#d4d4d4 1px, transparent 1px);
    background-size: 16px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.art-morph-shape {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 180px;
    height: 180px;
    background: var(--accent-light);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: morph 6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
    z-index: 0;
}

@keyframes morph {
    0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; transform: rotate(0deg) scale(1) translate(0, 0); }
    20% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: rotate(45deg) scale(1.1) translate(10px, -15px); }
    40% { border-radius: 30% 70% 70% 40% / 50% 60% 30% 60%; transform: rotate(90deg) scale(0.9) translate(-10px, 15px); }
    60% { border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%; transform: rotate(135deg) scale(1.15) translate(15px, 5px); }
    80% { border-radius: 50% 50% 20% 80% / 20% 80% 50% 50%; transform: rotate(180deg) scale(0.95) translate(-15px, -10px); }
    100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; transform: rotate(360deg) scale(1) translate(0, 0); }
}

.art-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.art-icon {
    color: var(--accent);
    margin-bottom: 1rem;
    width: 42px;
    height: 42px;
}

.art-content h3 {
    color: var(--text-main);
    font-family: var(--font-display);
    font-size: 2rem;
    font-style: italic;
    margin-bottom: 1.5rem;
}

.art-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.art-btn {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.art-btn i {
    font-size: 1.2rem;
    color: var(--accent);
}

.art-btn:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
    border-color: var(--accent);
}

.art-btn:hover i {
    color: #fff;
}

.bento-card h3 {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.bento-card h4 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.details-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.clean-list {
    list-style: none;
}

.clean-list li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.clean-list li::before {
    content: '\2192';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.education-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.edu-node .year {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.edu-node span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.tag i {
    font-size: 1.1rem;
    color: var(--accent);
}

.industry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.industry-item span {
    display: block;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.citation-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.citation {
    padding-left: 1.5rem;
    border-left: 2px solid var(--accent-light);
    color: var(--text-muted);
    line-height: 1.8;
}

.citation strong {
    color: var(--text-main);
}

.citation a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.citation a:hover {
    opacity: 0.7;
}

.gallery-intro {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.gallery-header .gallery-intro {
    margin-bottom: 0;
}

.back-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
}

.back-btn:hover {
    background: var(--accent);
    color: #fff;
}

.masonry-gallery {
    column-count: 3;
    column-gap: 1.5rem;
}

.art-piece {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    cursor: crosshair;
    box-shadow: var(--shadow-soft);
}

.art-placeholder {
    width: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.art-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
}

.art-piece:hover .art-placeholder {
    transform: scale(1.05);
}

.art-piece:hover .art-overlay {
    opacity: 1;
}

.art-title {
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.8rem;
    line-height: 1.2;
}

.art-medium {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
}

.art-count {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    background: var(--accent);
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    display: inline-block;
    margin-top: 0.5rem;
    font-weight: 500;
}

.app-footer {
    text-align: center;
    padding-top: 3rem;
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--glass-border);
}

.footer-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--text-main);
}


/* Research work card */
.research-work-card {
    padding: 2.25rem;
}

.research-work-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
    align-items: start;
}

.research-work-kicker {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.research-work-title {
    font-family: var(--font-sans);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.research-work-media {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.research-figure {
    margin: 0;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.research-figure img {
    width: 100%;
    height: auto;
    display: block;
}

.research-figure figcaption {
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
}

@media (max-width: 900px) {
    .research-work-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .span-3, .span-2 {
        grid-column: span 2;
    }
    .masonry-gallery {
        column-count: 2;
    }
    .header-content {
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .overview-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        min-height: auto;
    }
    .span-1, .span-2, .span-3, .span-4 {
        grid-column: span 1;
    }
    .section-title {
        font-size: 3rem;
        margin-bottom: 1.5rem;
    }
    .app-container {
        padding: 2rem 1.5rem;
    }
    .bento-card {
        padding: 2rem;
    }
    .header-content {
        position: relative;
    }
    .header-socials {
        display: none;
    }
    .mobile-social-card {
        display: block;
    }
    .hamburger-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .nav-links-top {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, padding 0.4s ease;
        opacity: 0;
        border-bottom: none;
    }
    .nav-links-top.menu-open {
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        opacity: 1;
        padding: 1.5rem 2rem 2.5rem;
        border-bottom: 1px solid var(--glass-border);
        box-shadow: 0 16px 32px rgba(0,0,0,0.1);
    }
    .nav-dropdown {
        width: 100%;
    }
    .nav-dropdown:hover .dropdown-content {
        display: none;
    }
    .nav-dropdown.open .dropdown-content {
        display: flex;
    }
    .dropdown-content {
        position: static;
        transform: none;
        background: transparent;
        border: none;
        box-shadow: none;
        padding-left: 1rem;
        border-left: 2px solid var(--accent-light);
        margin-left: 1rem;
        margin-top: 0.5rem;
    }
    .nav-item, .dropdown-item {
        white-space: nowrap;
        width: 100%;
        justify-content: space-between;
        padding: 1rem 1.25rem;
    }
    .profile-card-large {
        flex-direction: column;
        text-align: center;
    }
    .app-footer {
        font-size: 0.8rem;
    }
}

@media (max-width: 600px) {
    .mobile-social-links-grid {
        grid-template-columns: repeat(3, max-content);
    }
    .industry-grid {
        grid-template-columns: 1fr;
    }
    .education-timeline {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .masonry-gallery {
        column-count: 1;
    }
    .avatar-small {
        width: 44px;
        height: 44px;
    }
    .name-title-small {
        font-size: 1.4rem;
    }
    .profile-compact {
        gap: 0.75rem;
    }
    .app-container {
        padding: 1.5rem 1rem;
    }
    .bento-card {
        padding: 1.5rem;
    }
    .section-title {
        font-size: 2.2rem;
        margin-bottom: 1.25rem;
    }
    .gallery-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .profile-main-img {
        width: 140px;
        height: 140px;
    }
    .app-footer {
        font-size: 0.75rem;
    }
}

/* Research section helpers */
.research-divider {
    border: 0;
    border-top: 1px solid var(--glass-border);
    margin: 1.5rem 0;
}

/* Reduce only the Hardware Validation image(s) by filename (no cropping) */
.research-figure img[src*="expt_setup"],
.research-figure img[src*="hardware_setup_final"]{
    width: 85%;
    max-width: 420px;
    height: auto;
    display: block;
    margin: 0 auto;
}

@media (max-width: 620px){
    .research-figure img[src*="expt_setup"],
    .research-figure img[src*="hardware_setup_final"]{
        width: 100%;
        max-width: 360px;
    }
}
