:root {
    --background: #0a0a0a;
    --foreground: #fafafa;
    --card: #1a1a1a;
    --card-hover: #262626;
    --primary: #3b82f6;
    --primary-dark: #8b5cf6;
    --muted: #404040;
    --muted-foreground: #a3a3a3;
    --border: #404040;
    --shadow: rgba(59, 130, 246, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-link {
    color: var(--muted-foreground);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    text-transform: capitalize;
}

.nav-link:hover {
    color: var(--foreground);
}

.nav-social {
    display: flex;
    gap: 1rem;
}

.nav-social a {
    color: var(--muted-foreground);
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.nav-social a:hover {
    color: var(--foreground);
}

.nav-icon-img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: block;
    filter: grayscale(100%);
    opacity: 0.8;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.nav-social a:hover .nav-icon-img {
    opacity: 1;
    filter: grayscale(0%);
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    margin-bottom: 2rem;
    max-width: 28rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: var(--card);
    border-color: var(--primary);
}

.hero-image {
    display: flex;
    justify-content: center;
}

.image-wrapper {
    position: relative;
}

.image-wrapper img {
    width: 20rem;
    height: 20rem;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.image-glow {
    position: absolute;
    inset: -1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    filter: blur(3rem);
    opacity: 0.3;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.2;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(1.05);
    }
}

/* About */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-text p {
    font-size: 1.125rem;
    color: var(--muted-foreground);
}

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

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px var(--shadow);
}

.stat-card svg {
    color: var(--primary);
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

/* Awards */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.award-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.award-card:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px var(--shadow);
}

.award-card svg {
    margin-bottom: 1rem;
}

.award-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.award-card p {
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
}

.award-context {
    display: block;
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 500;
}

/* Projects */
.project-section {
    margin-bottom: 4rem;
}

.project-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    animation: fade-in-up 0.6s ease forwards;
    opacity: 0;
}

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

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

.project-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
}

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

.project-badge {
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.project-description {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

.tech-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.tech-tag {
    padding: 0.5rem 1rem;
    background: var(--muted);
    color: var(--foreground);
    border-radius: 2rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary);
}

.project-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric {
    background: var(--muted);
    padding: 1rem;
    text-align: center;
    border-radius: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}

.project-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.project-images img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.project-video {
    margin-bottom: 1.5rem;
}

.project-video iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

/* Click-to-load video thumbnail */
.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    cursor: pointer;
    overflow: hidden;
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover {
    transform: scale(1.02);
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    display: block;
}

.video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
}

.video-thumbnail:hover .video-play-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.video-play-overlay svg {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
    transition: transform 0.3s ease;
}

.video-thumbnail:hover .video-play-overlay svg {
    transform: scale(1.15);
}

.video-play-overlay span {
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-thumbnail:hover .video-play-overlay span {
    opacity: 1;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--primary-dark);
}

.github-inline-img {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: block;
}

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

.skill-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
}

.skill-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.skill-tags span {
    padding: 0.5rem 1rem;
    background: var(--muted);
    border-radius: 2rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.skill-tags span:hover {
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary);
}

/* Experience */
.experience-timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--primary-dark));
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2rem;
}

.timeline-dot {
    position: absolute;
    left: -0.5rem;
    top: 0;
    width: 1rem;
    height: 1rem;
    background: var(--primary);
    border-radius: 50%;
}

.timeline-content {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.timeline-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

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

.timeline-date {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.timeline-list {
    list-style: none;
}

.timeline-list li {
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.timeline-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* Certifications */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.cert-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.cert-card:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px var(--shadow);
}

.cert-institution {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.cert-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cert-issuer {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px var(--shadow);
    border-color: var(--primary);
}

.contact-card svg {
    color: var(--primary);
    flex-shrink: 0;
}

.contact-label {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.contact-value {
    font-weight: 600;
}

/* Footer */
.footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    color: var(--muted-foreground);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-description {
        max-width: 100%;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

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

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .project-metrics {
        grid-template-columns: 1fr;
    }

    .project-images {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .timeline-header {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section {
        padding: 3rem 0;
    }

    .awards-grid,
    .skills-grid,
    .certifications-grid {
        grid-template-columns: 1fr;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1000px;
    border-radius: 0.5rem;
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.3);
    animation: zoom 0.3s;
}

@keyframes zoom {
    from {
        transform: scale(0.7);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--primary);
    transform: scale(1.1);
}

@media only screen and (max-width: 700px) {
    .modal-content {
        width: 100%;
    }
}

.project-images img {
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.project-images img:hover {
    transform: scale(1.02);
    border-color: var(--primary) !important;
}