/* Modern CSS for Ankit Kumar's Website */

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #0ea5e9;
    --text-color: #1e293b;
    --text-light: #64748b;
    --bg-color: #ffffff;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Dark Mode */
body.dark-mode {
    --primary-color: #f97316;
    --secondary-color: #9ca3af;
    --accent-color: #fb923c;
    --text-color: #f1f5f9;
    --text-light: #cbd5e1;
    --bg-color: #111827;
    --bg-light: #1f2937;
    --border-color: #374151;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    position: relative;
    overflow-x: hidden;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, var(--primary-color), var(--accent-color), var(--primary-color), var(--accent-color));
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    opacity: 0.03;
    z-index: -2;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}



.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    width: 3rem;
    height: 3rem;
    padding: 0;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    min-height: 3.5rem;
}

header h1::after {
    content: '|';
    animation: blink 1s infinite;
    color: var(--primary-color);
}

header h1.typing-done::after {
    display: none;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.x-icon {
    font-weight: bold;
    font-size: 1.1rem;
}

/* Navigation Menu */
.section-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.section-nav a {
    padding: 0.75rem 1.5rem;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.section-nav a:hover,
.section-nav a.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Job Market Button Styling */
.job-market-btn {
    background: linear-gradient(135deg, #dc2626, #ef4444) !important;
    border-color: #dc2626 !important;
    color: white !important;
    font-weight: 600 !important;
    position: relative;
    overflow: hidden;
}

.job-market-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.job-market-btn:hover::before {
    left: 100%;
}

.job-market-btn:hover {
    background: linear-gradient(135deg, #b91c1c, #dc2626) !important;
    border-color: #b91c1c !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 25px -5px rgba(220, 38, 38, 0.4) !important;
}

.job-market-btn i {
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Content Sections */
.content-section {
    display: none;
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.content-section.active {
    display: block;
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.contact-item:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

.contact-item:hover i,
.contact-item:hover .x-icon {
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 20%, 60%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    80% { transform: translateY(-5px); }
}

.contact-item i,
.contact-item .x-icon {
    font-size: 2rem;
}

.contact-item span {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Main Content */
main {
    margin-top: 2rem;
}

.content-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

/* Intro Section */
.profile-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: start;
}

.profile-image {
    text-align: center;
}

.profile-image img {
    width: 100%;
    max-width: 250px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.profile-image figcaption {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}

.bio p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* News Section */
.news-list {
    list-style: none;
}

.news-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.news-list li:hover {
    background: var(--bg-light);
    transform: translateX(10px);
    border-left: 4px solid var(--primary-color);
}

.publication {
    transition: all 0.3s ease;
}

.publication:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.talk {
    transition: all 0.3s ease;
}

.talk:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.news-list li:last-child {
    border-bottom: none;
}

.date {
    font-weight: 600;
    color: var(--primary-color);
    min-width: 100px;
    font-size: 0.9rem;
}

/* Publications */
.publication-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.publication {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow);
}

.publication h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.award {
    color: #dc2626;
    font-size: 0.9rem;
    font-weight: 500;
}

.authors {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.venue {
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.link-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.link-btn:hover {
    background: var(--accent-color);
    transform: translateY(-1px);
}

/* Talks */
.talk-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.talk {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.talk h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.talk .date {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.talk p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Teaching Table */
.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.teaching-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.teaching-table th,
.teaching-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.teaching-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.teaching-table tr:nth-child(even) {
    background: var(--bg-light);
}

.teaching-table tr:hover {
    background: #e0f2fe;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    color: var(--text-light);
}

footer hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin-bottom: 1rem;
}

/* Responsive Design - Mobile First */
@media (max-width: 1024px) {
    .profile-section {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem 0.75rem;
    }
    
    header {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }
    
    header h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .social-links {
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .social-links a {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
    
    .section-nav {
        gap: 0.5rem;
        margin-top: 1.5rem;
    }
    
    .section-nav a {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        flex: 1;
        text-align: center;
    }
    
    .theme-toggle {
        font-size: 0.8rem;
    }
    
    .content-section {
        padding: 1.5rem 1rem;
    }
    
    .content-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .contact-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .contact-item {
        padding: 1.25rem;
    }
    
    .contact-item i,
    .contact-item .x-icon {
        font-size: 1.5rem;
    }
    
    .bio p {
        font-size: 1rem;
    }
    
    .news-list li {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem 0;
    }
    
    .date {
        min-width: auto;
        font-weight: 700;
    }
    
    .publication {
        padding: 1.25rem;
    }
    
    .publication h3 {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    
    .award {
        display: block;
        margin-top: 0.25rem;
    }
    
    .links {
        justify-content: flex-start;
        margin-top: 1rem;
    }
    
    .link-btn {
        flex: 1;
        text-align: center;
    }
    
    .talk {
        padding: 1.25rem;
    }
    
    .talk h3 {
        font-size: 1rem;
        line-height: 1.4;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.75rem 0.5rem;
    }
    
    header h1 {
        font-size: 1.6rem;
        line-height: 1.3;
    }
    
    .social-links {
        gap: 0.5rem;
    }
    
    .social-links a {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
    
    .section-nav {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .section-nav a {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .content-section {
        padding: 1.25rem 0.75rem;
    }
    
    .content-section h2 {
        font-size: 1.4rem;
    }
    
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .contact-item {
        padding: 1rem;
    }
    
    .contact-item span {
        font-size: 0.8rem;
    }
    
    .profile-image img {
        max-width: 200px;
    }
    
    .publication,
    .talk {
        padding: 1rem;
    }
    
    .publication h3,
    .talk h3 {
        font-size: 0.95rem;
    }
    
    .links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .link-btn {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .social-links a,
    .section-nav a,
    .link-btn {
        min-height: 44px;
    }
    
    .section-nav a {
        padding: 0.75rem 1rem;
    }
}
/* Blog post pages */
.post-meta {
    opacity: 0.7;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Post navigation (prev/next) */
.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}
.post-nav a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
}
.post-nav a:hover {
    text-decoration: underline;
}
.post-nav .nav-older {
    margin-left: auto;
    text-align: right;
}
