/* ==========================================================================
   Ramesh Boggula — Academic Portfolio
   Fonts: Orbitron (headings), Inter (body)
   ========================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #000000;
    --bg-alt: #0a0a0a;
    --surface: rgba(30, 30, 30, 0.7);
    --surface-border: rgba(255, 255, 255, 0.08);
    --surface-hover: rgba(255, 255, 255, 0.15);
    --text: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --accent: #ffffff;
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Inter', -apple-system, system-ui, BlinkMacSystemFont, sans-serif;
    --max-width: 1100px;
    --radius: 8px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

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

a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--text-muted);
    transition: border-color 0.2s;
}

a:hover {
    border-color: var(--text);
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--surface-border);
    transition: background 0.3s;
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-brand {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.25rem;
    letter-spacing: 2px;
    border: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    transition: transform 0.3s, opacity 0.3s;
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 1.5rem 4rem;
    overflow: hidden;
}

/* ---- VFX: 2 layers only ---- */
.hero-vfx {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Layer 1 — ambient glow (static feel) */
.hero-glow {
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(40,130,240,0.28) 0%,
        rgba(40,130,240,0.14) 25%,
        rgba(40,130,240,0.05) 50%,
        transparent 70%
    );
    animation: glow-pulse 8s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.06); }
}



/* ---- Hero content ---- */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
}

.hero-name {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(2.2rem, 5.5vw, 3.8rem);
    letter-spacing: 4px;
    line-height: 1.15;
    margin-bottom: 0.85rem;
    text-shadow: 0 0 40px rgba(60,150,240,0.10);
}

.hero-title {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.hero-affiliation,
.hero-role {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.hero-role {
    margin-top: 0.25rem;
}

@media (prefers-reduced-motion: reduce) {
    .hero-glow { animation: none; }
}

/* --- Sections --- */
.section {
    padding: 5rem 1.5rem;
}

.section-alt {
    background-color: var(--bg-alt);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    text-transform: uppercase;
    letter-spacing: 4px;
    text-align: center;
    margin-bottom: 3rem;
}

.subsection-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
}

/* --- Cards --- */
.card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color 0.2s;
}

.card-portrait {
    display: flex;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
}

.about-portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: var(--radius);
}

.card:hover {
    border-color: var(--surface-hover);
}

.card h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.card h4 {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.card-compact {
    padding: 1.5rem;
}

/* Research areas: equal-size cards */
.research-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.research-grid .card-compact {
    height: 100%;
}

@media (min-width: 640px) {
    .research-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .research-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card-center {
    text-align: center;
}

/* --- Grid Layouts --- */
.two-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.three-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .two-col {
        grid-template-columns: repeat(2, 1fr);
    }
    .three-col {
        grid-template-columns: 1fr 2fr;
    }
}

@media (min-width: 900px) {
    .three-col {
        grid-template-columns: auto 1fr 1fr;
    }
}

/* About: equal-width 3-col with portrait */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .about-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- About specifics --- */
.edu-item {
    margin-bottom: 0.5rem;
}

.divider {
    border: none;
    border-top: 1px solid var(--surface-border);
    margin: 1rem 0;
}

.tag-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.tag-list li {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 100px;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* --- Grants --- */
.grants-list {
    display: grid;
    gap: 1.5rem;
}

.grant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.grant-role {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.grant-status {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
}

.status-review {
    background: rgba(59, 130, 246, 0.15);
    color: #93bbfc;
}

.status-resub {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf57;
}

.grant-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* --- Publications --- */
.pub-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.pub-tab {
    background: none;
    border: 1px solid var(--surface-border);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s;
}

.pub-tab:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

.pub-tab.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.pub-panel {
    display: none;
}

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

.pub-list {
    padding-left: 2rem;
}

.pub-list li {
    margin-bottom: 1.25rem;
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.pub-list li strong {
    color: var(--text);
}

.pub-list li em {
    color: var(--text-muted);
}

.pub-note {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Teaching / Students --- */
.course-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.course-list li {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.course-list li strong {
    color: var(--text);
}

.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.student-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    transition: border-color 0.2s;
}

.student-card:hover {
    border-color: var(--surface-hover);
}

.student-card h4 {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.student-degree {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.student-card p:last-child {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* --- Awards / Timeline --- */
.timeline {
    max-width: 700px;
    margin: 0 auto;
}

.timeline-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--surface-border);
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-year {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: var(--text-muted);
    min-width: 70px;
    padding-top: 0.15rem;
}

.timeline-content h4 {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* --- Service --- */
.service-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.service-list li {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.service-list li strong {
    color: var(--text);
}

/* --- Contact --- */
.contact-grid {
    max-width: 800px;
    margin: 0 auto;
}

.contact-grid a {
    border-bottom-color: var(--text-muted);
}

.profiles-placeholder {
    text-align: center;
    margin-top: 2rem;
}

/* --- Placeholders --- */
.placeholder {
    color: #e88a3a;
    font-style: italic;
    font-size: 0.85rem;
}

/* --- Footer --- */
.footer {
    padding: 2rem 1.5rem;
    text-align: center;
    border-top: 1px solid var(--surface-border);
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 1rem 1.5rem 1.5rem;
        gap: 1rem;
        border-bottom: 1px solid var(--surface-border);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        min-height: 85vh;
        padding-top: 5rem;
    }

    .hero-portrait {
        width: 140px;
        height: 140px;
    }

    .section {
        padding: 3.5rem 1.25rem;
    }

    .timeline-item {
        flex-direction: column;
        gap: 0.25rem;
    }

    .timeline-year {
        min-width: auto;
    }
}
