/* Reset and base styles */
:root {
    --primary: #6b46c1;
    --dark: #1a202c;
    --light: #f7fafc;
    --gray: #4a5568;
    --border: #e2e8f0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.5;
    color: var(--dark);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
}

.btn i {
    margin-left: 0.5rem;
}

.btn-primary {
    background: white;
    color: var(--dark);
}

.btn-primary:hover {
    background: #f1f1f1;
}

.btn-outline {
    border: 1px solid white;
    color: white;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-dark {
    background: var(--dark);
    color: white;
}

.btn-dark:hover {
    background: #2d3748;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: all 0.3s;
    padding: 1.5rem 0;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding: 0.75rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.scrolled .logo {
    color: var(--dark);
}

.desktop-nav {
    display: none;
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
        gap: 2rem;
    }

    .desktop-nav a {
        color: white;
        text-decoration: none;
        font-weight: 500;
        transition: color 0.3s;
    }

    .scrolled .desktop-nav a {
        color: var(--dark);
    }

    .desktop-nav a:hover {
        color: var(--primary);
    }

    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.scrolled .mobile-menu-btn {
    color: var(--dark);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.8));
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 48rem;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 4.5rem;
    }
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

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

/* About Section */
.about {
    padding: 5rem 0;
    background: white;
}

.about-grid {
    display: grid;
    gap: 3rem;
}

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr 2fr;
        align-items: center;
    }
}

.about-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-text {
    color: var(--gray);
    margin-bottom: 2rem;
}

.about-text p + p {
    margin-top: 1rem;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skills-tags span {
    background: #f1f1f1;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 500;
}

/* Portfolio Sections */
.portfolio {
    padding: 5rem 0;
}

.portfolio:nth-child(odd) {
    background: #f8fafc;
}

.section-header {
    text-align: center;
    max-width: 48rem;
    margin: 0 auto 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--gray);
    font-size: 1.25rem;
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.filter-btn {
    background: #f1f1f1;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background: var(--dark);
    color: white;
}

.portfolio-grid,
.video-grid,
.photo-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (min-width: 640px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.portfolio-item {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.4), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    color: white;
}

.portfolio-item:hover .portfolio-item-overlay {
    opacity: 1;
}

/* Video Grid */
.video-grid {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.video-item {
    cursor: pointer;
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.video-item:hover .video-thumbnail img {
    transform: scale(1.1);
}

.play-button {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
}

.play-button i {
    background: white;
    color: black;
    padding: 0.75rem;
    border-radius: 50%;
    transition: transform 0.3s;
}

.video-item:hover .play-button i {
    transform: scale(1.1);
}

/* Photo Grid */
.photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.photo-item {
    aspect-ratio: 1;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.photo-item:hover img {
    transform: scale(1.1);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.page-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn.active {
    background: var(--dark);
    color: white;
    border-color: var(--dark);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Resume Section */
.resume {
    padding: 5rem 0;
    background: white;
}

.resume-grid {
    display: grid;
    gap: 3rem;
    max-width: 64rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .resume-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
    border-left: 2px solid #e2e8f0;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 0;
    width: 1rem;
    height: 1rem;
    background: var(--primary);
    border-radius: 50%;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    position: relative;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.skill-bar {
    height: 0.5rem;
    background: #f1f1f1;
    border-radius: 9999px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--primary);
    border-radius: 9999px;
    transition: width 1s ease-out;
}

.resume-download {
    margin-top: 2rem;
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer h4 {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.footer-about p {
    color: #a0aec0;
    margin-bottom: 1.5rem;
}

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

.social-links a {
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary);
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 0.75rem;
}

.footer a {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: white;
}

.footer-contact ul li {
    display: flex;
    gap: 0.75rem;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: #a0aec0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0,0,0,0.9);
    padding: 1rem;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    max-width: 64rem;
    width: 100%;
}

.modal-close {
    position: absolute;
    top: -3rem;
    right: 0;
    background: white;
    color: var(--dark);
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.modal-close:hover {
    background: #f1f1f1;
}

.video-container {
    position: relative;
    padding-top: 56.25%;
    width: 100%;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0.5rem;
}

.photo-container img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 0.5rem;
}

.modal-info {
    color: white;
    text-align: center;
    margin-top: 1rem;
}

.modal-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-info p {
    color: rgba(255,255,255,0.8);
}