/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0D1B2A;
    --bg-secondary: #415A77;
    --bg-light: #F8F9FA;
    --text-primary: #0D1B2A;
    --text-secondary: #415A77;
    --text-light: #F8F9FA;
    --accent: #415A77;
    --border: rgba(65, 90, 119, 0.2);
    --shadow: rgba(13, 27, 42, 0.1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0D1B2A;
        --bg-secondary: #1B263B;
        --bg-light: #0D1B2A;
        --text-primary: #F8F9FA;
        --text-secondary: #E0E1DD;
        --text-light: #F8F9FA;
        --accent: #778DA9;
        --border: rgba(248, 249, 250, 0.1);
        --shadow: rgba(0, 0, 0, 0.3);
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    font-size: 1.1rem;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Removed gradient animation for performance */

/* Top Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(13, 27, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-image-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent);
}

.profile-image-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lottie-style Avatar Animation */
.lottie-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--bg-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: avatarPulse 3s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(65, 90, 119, 0.3);
}

.avatar-inner {
    width: 70%;
    height: 70%;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.2rem;
    animation: avatarRotate 3s ease-in-out infinite;
}

@keyframes avatarPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(65, 90, 119, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(65, 90, 119, 0.5);
    }
}

@keyframes avatarRotate {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(5deg);
    }
    75% {
        transform: rotate(-5deg);
    }
}

/* Large avatar specific styles */
#lottie-avatar-large .avatar-inner {
    font-size: 2.5rem;
}

#lottie-avatar-small .avatar-inner {
    font-size: 1rem;
}

.brand-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-light);
    margin: 0;
    line-height: 1.2;
}

.brand-text span {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links .nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in;
    position: relative;
}

.nav-links .nav-link:hover,
.nav-links .nav-link.active {
    background: var(--accent);
    color: var(--text-light);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-actions .social-links {
    display: flex;
    gap: 0.75rem;
    margin: 0;
}

.nav-actions .social-links a {
    color: var(--text-light);
    font-size: 1.1rem;
    transition: all 0.2s ease-in;
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.nav-actions .social-links a:hover {
    background: var(--accent);
    transform: translateY(-1px);
}



/* Off-canvas Drawer */
.drawer {
    position: fixed;
    top: 0;
    left: -400px;
    width: 400px;
    height: 100vh;
    background: var(--bg-primary);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border);
    z-index: 1001;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.drawer.open {
    left: 0;
}

.drawer-content {
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.drawer-header {
    text-align: center;
    margin-bottom: 2rem;
}

.drawer-header .profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1.5rem;
    border: 3px solid var(--accent);
}

.drawer-header .profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drawer-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.drawer-header .tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.drawer-navigation {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.drawer-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    padding: 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in;
    border-left: 3px solid transparent;
}

.drawer-link:hover,
.drawer-link.active {
    background: var(--accent);
    border-left-color: var(--text-light);
}

.drawer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.drawer-social a {
    color: var(--text-light);
    font-size: 1.5rem;
    transition: all 0.2s ease-in;
    padding: 0.75rem;
    border-radius: 50%;
}

.drawer-social a:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    display: none;
    z-index: 1000;
    padding: 0.5rem 0;
    justify-content: space-around;
    align-items: center;
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease-in;
    border-radius: 0.5rem;
    min-width: 60px;
}

.bottom-nav-link i {
    font-size: 1.25rem;
}

.bottom-nav-link:hover,
.bottom-nav-link.active {
    color: var(--text-light);
    background: var(--accent);
    transform: translateY(-2px);
}

.bottom-nav-link span {
    font-size: 0.7rem;
    line-height: 1;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 80px;
}

/* Removed old sidebar styles - replaced with top nav and drawer */

/* Main Content */
.main-content {
    padding: 2rem;
    width: 100%;
    background: var(--bg-light);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    margin: 2rem;
    box-shadow: 0 20px 40px var(--shadow);
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

/* Section Styles */
.section {
    display: none;
    animation: fadeIn 0.6s ease-in-out;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-content {
    max-width: 100%;
    margin-bottom: 2.5rem;
}

/* About Section */
.intro-text {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-weight: 500;
}

.section p {
    margin-bottom: 1.7rem;
    font-size: 1.08rem;
    line-height: 1.8;
    color: var(--text-primary);
    max-width: 70ch;
}

.section p strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Experience Section */
.experience-item {
    position: relative;
    margin-bottom: 3rem;
    padding: 2rem 2rem 2rem 4rem;
    border-radius: 0.7rem;
    transition: box-shadow 0.2s ease-in, background 0.2s ease-in, border 0.2s ease-in, transform 0.2s ease-in;
    border: 1px solid var(--border);
    background: var(--bg-light);
    box-shadow: 0 2px 8px var(--shadow);
}

.timeline-dot {
    position: absolute;
    left: 1.5rem;
    top: 2.5rem;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid var(--bg-light);
    box-shadow: 0 0 0 3px var(--accent);
    z-index: 2;
}

.timeline-dot::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 100%;
    width: 2px;
    height: calc(100% + 2rem);
    background: var(--border);
    transform: translateX(-50%);
    z-index: 1;
}

.experience-item:last-child .timeline-dot::before {
    display: none;
}

.experience-content {
    position: relative;
}

.experience-item:hover {
    background-color: var(--bg-secondary);
    border-color: var(--accent);
    box-shadow: 0 8px 32px var(--shadow);
    transform: translateY(-4px) scale(1.015);
}

.experience-header {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.date {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-width: 120px;
    margin-top: 0.25rem;
}

.experience-details {
    flex: 1;
}

.experience-details h3 {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.company {
    color: var(--text-secondary);
}

.company a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease-in;
}

.company a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.experience-details h3 i {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.experience-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Read more functionality removed - showing full text */

/* Projects Section */
.project-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem;
    border-radius: 0.7rem;
    transition: box-shadow 0.2s ease-in, background 0.2s ease-in, border 0.2s ease-in, transform 0.2s ease-in;
    border: 1px solid var(--border);
    background: var(--bg-light);
    box-shadow: 0 2px 8px var(--shadow);
}

.project-item:hover {
    background-color: var(--bg-secondary);
    border-color: var(--accent);
    box-shadow: 0 8px 32px var(--shadow);
    transform: translateY(-4px) scale(1.015);
}

.project-image {
    min-width: 120px;
    height: 80px;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.5rem;
}

.project-details h3 {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.project-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease-in;
}

.project-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.project-details h3 i {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Project description truncation removed - showing full text */

.project-stats {
    margin-bottom: 1rem;
}

.stat {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.stat i {
    color: #fbbf24;
}

/* Education Section */
.education-item {
    position: relative;
    margin-bottom: 2.5rem;
    padding: 2rem 2rem 2rem 4rem;
    border-radius: 0.7rem;
    transition: box-shadow 0.2s ease-in, background 0.2s ease-in, border 0.2s ease-in, transform 0.2s ease-in;
    border: 1px solid var(--border);
    background: var(--bg-light);
    box-shadow: 0 2px 8px var(--shadow);
}

.education-content {
    position: relative;
}

.education-item:hover {
    background-color: var(--bg-secondary);
    border-color: var(--accent);
    box-shadow: 0 8px 32px var(--shadow);
    transform: translateY(-4px) scale(1.015);
}

.education-header {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.education-details {
    flex: 1;
}

.education-details h3 {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.education-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Tech Tags */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-tag {
    background-color: var(--bg-secondary);
    color: var(--text-light);
    padding: 0.4rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--accent);
    transition: background 0.2s ease-in, color 0.2s ease-in, border 0.2s ease-in;
    box-shadow: 0 1px 2px var(--shadow);
}

.tech-tag:hover {
    background-color: var(--accent);
    color: var(--text-light);
    border-color: var(--bg-primary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }
    
    .nav-actions .social-links {
        display: none;
    }
    
    .drawer {
        width: 100%;
        left: -100%;
    }
    
    .bottom-nav {
        display: flex;
    }
    
    .main-content {
        margin: 1rem;
        padding: 1.5rem;
        padding-bottom: 80px; /* Space for bottom nav */
    }
    
    .experience-item,
    .education-item {
        padding: 1.5rem 1.5rem 1.5rem 3rem;
    }
    
    .timeline-dot {
        left: 1rem;
        top: 2rem;
        width: 10px;
        height: 10px;
    }
    
    .experience-header,
    .education-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    .date {
        min-width: auto;
        margin-top: 0;
    }
    .project-item {
        flex-direction: column;
        gap: 1rem;
    }
    .project-image {
        min-width: auto;
        height: 60px;
        align-self: flex-start;
    }
}

@media (max-width: 640px) {
    .nav-container {
        padding: 1rem;
    }
    
    .brand-text h1 {
        font-size: 1.1rem;
    }
    
    .brand-text span {
        font-size: 0.8rem;
    }
    
    .main-content {
        padding: 1rem;
        margin: 0.5rem;
    }
    .experience-item,
    .project-item,
    .education-item {
        padding: 1rem;
    }
    .tech-tags {
        gap: 0.25rem;
    }
    .tech-tag {
        font-size: 0.65rem;
        padding: 0.18rem 0.4rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--border);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Selection Styling */
::selection {
    background-color: var(--accent);
    color: var(--text-light);
}

/* Focus Styles for Accessibility */
html.keyboard-navigation .nav-link:focus,
html.keyboard-navigation .social-links a:focus {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 0.25rem;
    box-shadow: 0 0 0 4px var(--shadow);
}
img[loading="lazy"] {
    filter: blur(2px);
    transition: filter 0.4s;
}
img[loading="lazy"][src] {
    filter: none;
}

/* Hire Me Button in Navigation */
.hire-me-btn {
    background: var(--accent);
    color: var(--text-light);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.2s ease-in;
    border: 2px solid var(--accent);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.hire-me-btn:hover {
    background: var(--text-light);
    color: var(--accent);
    transform: translateY(-1px);
}

.hire-me-btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Mobile responsive for hire me button */
@media (max-width: 768px) {
    .hire-me-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .navigation,
    .social-links,
    .hire-me-btn {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
    
    .experience-item,
    .project-item,
    .education-item {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        background: white !important;
    }
    
    .tech-tag {
        background: #f0f0f0 !important;
        color: black !important;
        border: 1px solid #ccc !important;
    }
}
