/* Variables & Theme */
:root {
    /* Dark Theme (Default) */
    --bg-primary: #0a192f;
    --bg-secondary: #112240;
    --text-primary: #ccd6f6;
    --text-secondary: #8892b0;
    --accent: #64ffda;
    --accent-glow: rgba(100, 255, 218, 0.1);
    --white: #e6f1ff;
    --border-color: rgba(255, 255, 255, 0.1);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --transition: all 0.25s cubic-bezier(0.645, 0.045, 0.355, 1);
    --nav-height: 80px;
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f0f4f8;
    --text-primary: #1d1d1f;
    --text-secondary: #4a4a4a;
    --accent: #007aff;
    --accent-glow: rgba(0, 122, 255, 0.1);
    --white: #ffffff;
    --border-color: rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--white);
    font-weight: 700;
    line-height: 1.1;
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3 {
    color: var(--text-primary);
}

.highlight {
    color: var(--accent);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--accent);
    border-radius: 2px;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="light"] .header {
    background-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.nav-list {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

[data-theme="light"] .sun-icon {
    display: block;
}

[data-theme="light"] .moon-icon {
    display: none;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--nav-height);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.greeting {
    color: var(--accent);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    display: block;
}

.name {
    font-size: clamp(40px, 8vw, 80px);
    margin-bottom: 1rem;
}

.role {
    font-size: clamp(30px, 6vw, 60px);
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.bio {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin-bottom: 3rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    margin-right: 1rem;
}

.btn-primary:hover {
    background-color: var(--accent-glow);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--text-primary);
}

/* Hero Background Animation */
.hero-background {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: 20%;
    right: 10%;
    animation: float 10s infinite ease-in-out;
}

.orb-2 {
    width: 200px;
    height: 200px;
    background: #7928ca;
    bottom: 20%;
    right: 30%;
    animation: float 15s infinite ease-in-out reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-30px, 30px);
    }
}

/* Experience Timeline */
.timeline {
    position: relative;
    max-width: 800px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background-color: var(--bg-secondary);
}

[data-theme="light"] .timeline::before {
    background-color: #e0e0e0;
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    margin-bottom: 50px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--bg-primary);
    border: 2px solid var(--accent);
    transition: var(--transition);
}

.timeline-item:hover::before {
    background-color: var(--accent);
}

.timeline-date {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
}

.company {
    display: block;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 500;
}

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

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 30px -15px rgba(2, 12, 27, 0.7);
}

[data-theme="light"] .project-card {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .project-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-image {
    height: 200px;
    background-color: #233554;
    overflow: hidden;
}

.placeholder-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #112240, #233554);
    opacity: 0.5;
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--white);
}

[data-theme="light"] .project-info h3 {
    color: var(--text-primary);
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tech-stack span {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--accent);
}

.project-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.project-links a,
.view-details-btn {
    color: var(--text-primary);
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.95rem;
}

.project-links a:hover,
.view-details-btn:hover {
    color: var(--accent);
}

/* Skills & Education Sections */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category h3 {
    margin-bottom: 1rem;
    color: var(--accent);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tags span {
    background: var(--bg-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-tags span:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

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

.education-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 16px;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.education-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

[data-theme="light"] .education-card {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.edu-icon {
    font-size: 2rem;
    min-width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border-radius: 50%;
    border: 1px solid var(--accent);
}

.edu-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

[data-theme="light"] .edu-content h3 {
    color: var(--text-primary);
}

.institution {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.year {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Loading & Error States */
.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
    color: var(--text-secondary);
    animation: pulse 1.5s infinite;
}

.error-msg {
    grid-column: 1 / -1;
    text-align: center;
    color: #ff6b6b;
    padding: 20px;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: var(--bg-secondary);
    margin: 5% auto;
    padding: 30px;
    border: 1px solid var(--border-color);
    width: 80%;
    max-width: 800px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s;
}

[data-theme="light"] .modal-content {
    background-color: #ffffff;
    border-color: #e0e0e0;
}

.close-modal {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover,
.close-modal:focus {
    color: var(--accent);
    text-decoration: none;
}

#modal-body h2 {
    color: var(--accent);
    margin-bottom: 1rem;
}

#modal-body p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

#modal-body pre {
    background: #1a1a1a;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.stat-card h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

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

/* Competencies Grid */
.competencies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.competency-card {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.competency-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.competency-card h3 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.competency-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* Content Block */
.content-block {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-top: 2rem;
}

.content-block p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.content-block p:last-child {
    margin-bottom: 0;
}

.content-block strong {
    color: var(--accent);
    font-weight: 600;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 1rem;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        display: none;
    }

    .hero-section {
        padding-top: 120px;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-item {
        padding-left: 30px;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .stats-grid,
    .competencies-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .content-block {
        padding: 1.5rem;
    }
}

/* Contact Section */
.contact-section {
    padding: 100px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    position: sticky;
    top: 120px;
}

.contact-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .contact-form-wrapper {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.1);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.1);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

#submit-btn {
    margin-top: 1rem;
}

.btn-loading {
    display: none;
}

#form-status {
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

#form-status.success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

#form-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Footer */
.footer {
    padding: 20px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-info {
        position: static;
    }

}

.skill-item {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

[data-theme="light"] .skill-item {
    background: var(--white);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.skill-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
}

[data-theme="light"] .skill-item:hover {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-weight: 500;
    font-family: var(--font-heading);
}

.skill-name {
    color: var(--text-primary);
}

.skill-percentage {
    color: var(--accent);
    font-weight: 700;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

[data-theme="light"] .progress-bar {
    background: rgba(0, 0, 0, 0.05);
}

.progress {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 1.5s cubic-bezier(0.1, 0.75, 0.25, 1);
}

.skill-item.visible .progress {
    transform: scaleX(1);
}

/* Timeline Animations */
.timeline-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:hover::before {
    background-color: var(--accent);
    box-shadow: 0 0 15px var(--accent);
    transform: scale(1.3);
}

/* Search Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding-top: 100px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-modal.active {
    display: flex;
    opacity: 1;
}

[data-theme="light"] .search-modal {
    background: rgba(255, 255, 255, 0.95);
}

.search-content {
    width: 90%;
    max-width: 600px;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.search-modal.active .search-content {
    transform: translateY(0);
}

[data-theme="light"] .search-content {
    background: var(--white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.search-header {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

#search-input {
    width: 100%;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: var(--font-body);
}

[data-theme="light"] #search-input {
    background: #f5f5f7;
}

#search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

#close-search {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
}

#close-search:hover {
    color: var(--accent);
}

.search-results {
    max-height: 60vh;
    overflow-y: auto;
}

.search-result-item {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
    display: block;
}

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

.search-result-item:hover {
    background: rgba(100, 255, 218, 0.05);
}

[data-theme="light"] .search-result-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.search-result-item h4 {
    color: var(--accent);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.search-result-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Animated Statistics */
.stat-number {
    font-size: 5rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.stat-number::after {
    content: "+";
    font-size: 3rem;
    vertical-align: super;
    opacity: 0.8;
}

.skill-name {
    color: var(--text-primary);
}

.skill-percentage {
    color: var(--accent);
    font-weight: 700;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

[data-theme="light"] .progress-bar {
    background: rgba(0, 0, 0, 0.05);
}

.progress {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 1.5s cubic-bezier(0.1, 0.75, 0.25, 1);
}

.skill-item.visible .progress {
    transform: scaleX(1);
}

/* Timeline Animations */
.timeline-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:hover::before {
    background-color: var(--accent);
    box-shadow: 0 0 15px var(--accent);
    transform: scale(1.3);
}

/* Search Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding-top: 100px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-modal.active {
    display: flex;
    opacity: 1;
}

[data-theme="light"] .search-modal {
    background: rgba(255, 255, 255, 0.95);
}

.search-content {
    width: 90%;
    max-width: 600px;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.search-modal.active .search-content {
    transform: translateY(0);
}

[data-theme="light"] .search-content {
    background: var(--white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.search-header {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

#search-input {
    width: 100%;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: var(--font-body);
}

[data-theme="light"] #search-input {
    background: #f5f5f7;
}

#search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

#close-search {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
}

#close-search:hover {
    color: var(--accent);
}

.search-results {
    max-height: 60vh;
    overflow-y: auto;
}

.search-result-item {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
    display: block;
}

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

.search-result-item:hover {
    background: rgba(100, 255, 218, 0.05);
}

[data-theme="light"] .search-result-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

.search-result-item h4 {
    color: var(--accent);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.search-result-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Animated Statistics */
.stat-number {
    font-size: 5rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.stat-number::after {
    content: "+";
    font-size: 3rem;
    vertical-align: super;
    opacity: 0.8;
}

.stat-label {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent);
    color: var(--bg-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-5px);
    background: var(--accent-glow);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

#back-to-top svg {
    width: 24px;
    height: 24px;
}

/* Page Scroll Progress Bar */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 9999;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-glow));
    width: 0%;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px var(--accent-glow);
}


/* Page Transition Animation */
body {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

body.loaded {
    opacity: 1;
}

/* Skeleton Loading Animation */
.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--border-color) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Micro-interactions */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.project-card:hover .placeholder-img {
    transform: scale(1.1);
    transition: transform 0.5s ease;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: var(--bg-secondary);
    margin: 5% auto;
    padding: 2rem;
    border: 1px solid var(--border-color);
    width: 80%;
    max-width: 800px;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: slideIn 0.3s;
}

[data-theme="light"] .modal-content {
    background-color: var(--white);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
}

.close-modal {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}