/* --- Color & Font Variables --- */
:root {
    --primary-color: #2563eb; /* blue-600 */
    --secondary-color: #0d9488; /* teal-600 */
    --accent-gradient: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    --font-sans: 'Inter', sans-serif;
    --ease-out-quint: cubic-bezier(0.23, 1, 0.32, 1);
}

/* --- Base Styles --- */
body {
    font-family: var(--font-sans);
    background-color: #f8fafc; /* slate-50 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #a8a29e; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #78716c; }

/* --- Hero Section --- */
#home {
    background-image: url('photo.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.hero-content {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Header & Navigation --- */
#header {
    transition: all 0.4s var(--ease-out-quint);
}
#header.header-scrolled {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
}
#header.header-scrolled nav {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.nav-link {
    position: relative;
    color: #4b5563;
    font-weight: 500;
    transition: color 0.4s var(--ease-out-quint);
    padding-bottom: 6px;
}
.nav-link:hover { color: var(--primary-color); }
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-image: var(--accent-gradient);
    transition: width 0.4s var(--ease-out-quint);
}
.nav-link:hover::after, .nav-link-active::after { width: 100%; }
.nav-link-active {
    color: var(--primary-color);
    font-weight: 600;
}

/* --- General Content Styling --- */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 4rem;
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
    background-image: var(--accent-gradient);
}
.subsection-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

/* --- Timeline for Experience & Education --- */
.timeline-line {
    position: absolute;
    left: 1rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background-color: #e5e7eb;
}
.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 2.5rem;
    perspective: 1000px;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    height: 1rem;
    width: 1rem;
    border-radius: 9999px;
    background-color: #fff;
    border: 3px solid var(--primary-color);
    transition: transform 0.3s var(--ease-out-quint);
}
.timeline-item:hover .timeline-dot {
    transform: scale(1.2);
}
.timeline-content {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    transform-style: preserve-3d;
    transition: transform 0.4s var(--ease-out-quint), box-shadow 0.4s var(--ease-out-quint);
}
.timeline-item:hover .timeline-content {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.07), 0 4px 6px -4px rgb(0 0 0 / 0.07);
}


/* --- Generic Content Item (Publications, Projects, News) --- */
.content-item {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    border-left: 4px solid #e5e7eb;
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: border-left-color 0.4s var(--ease-out-quint), box-shadow 0.4s var(--ease-out-quint), transform 0.4s var(--ease-out-quint);
}
.content-item:hover {
    border-left-color: var(--primary-color);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.07), 0 4px 6px -4px rgb(0 0 0 / 0.07);
}
.item-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}
.item-meta {
    font-style: italic;
    color: #6b7280;
    margin-top: 0.25rem;
}
.item-link {
    display: inline-block;
    margin-top: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    transition: color 0.3s;
}
.item-link:hover { color: var(--secondary-color); }

/* Staggered list animation */
#achievements ul li {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s var(--ease-out-quint), transform 0.5s var(--ease-out-quint);
}

/* --- Certifications --- */
.cert-card {
    background-color: #f1f5f9;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    border-radius: 0.75rem;
    font-weight: 500;
    transition: all 0.4s var(--ease-out-quint);
}
.cert-card:hover {
    background-image: var(--accent-gradient);
    color: #fff;
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgb(37 99 235 / 0.2), 0 4px 6px -4px rgb(37 99 235 / 0.2);
}


/* --- Contact & Buttons --- */
.gradient-button {
    background-image: var(--accent-gradient);
    color: white;
    font-weight: 600;
    padding: 0.875rem 1.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    transition: transform 0.3s var(--ease-out-quint), box-shadow 0.3s var(--ease-out-quint);
}
.gradient-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgb(37 99 235 / 0.2), 0 4px 6px -4px rgb(37 99 235 / 0.2);
}
.social-icon {
    color: #4b5563;
    transition: color 0.3s, transform 0.3s var(--ease-out-quint);
}
.social-icon:hover {
    color: var(--primary-color);
    transform: scale(1.1) translateY(-2px);
}

/* --- Footer --- */
.footer {
    padding: 1.5rem 0;
    color: #d1d5db;
    background-color: #111827;
}

/* --- Typing Animation --- */
#typing-effect::after {
    content: '|';
    animation: blink-light 1.2s step-end infinite;
}
@keyframes blink-light {
    from, to { color: transparent; }
    50% { color: #e5e7eb; }
}

/* --- Master Fade-in Animation for Sections --- */
.fade-in-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s var(--ease-out-quint), transform 1s var(--ease-out-quint);
}
.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Initial hero text animations --- */
@keyframes fade-in-down {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-down {
    animation: fade-in-down 1s var(--ease-out-quint) forwards;
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up {
    opacity: 0; /* Start hidden */
    animation: fade-in-up 1s var(--ease-out-quint) forwards;
}

.delay-300 { animation-delay: 0.3s; }
.delay-600 { animation-delay: 0.6s; }

