/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #60a5fa;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --border-color: #334155;
    --border-subtle: #475569;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --radius: 8px;
    --radius-lg: 12px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.2s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 24px;
}

.nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.nav-brand:hover {
    opacity: 0.85;
}

.nav-logo {
    display: block;
    height: 36px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    object-position: left center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.25rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 88px;
    background: var(--bg-primary);
    color: var(--text-primary);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 40%, rgba(59, 130, 246, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.hero .container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    animation: fadeInUp 0.8s ease;
}

.hero-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    font-family: 'Playfair Display', Georgia, serif;
}

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

.hero-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    line-height: 1.75;
    max-width: 520px;
}

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

.btn {
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: inline-block;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border-color: var(--border-subtle);
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
}

.hero-image {
    display: flex;
    justify-content: center;
    animation: fadeInRight 0.8s ease 0.2s both;
}

.hero-photo {
    width: 340px;
    height: 340px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    background: var(--bg-tertiary);
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    font-family: 'Playfair Display', Georgia, serif;
    letter-spacing: -0.03em;
}

.section-description {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 620px;
    margin: -2rem auto 3rem;
    padding: 0 20px;
}

/* About Section */
.about {
    background: var(--bg-secondary);
}

.about-content {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

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

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.stat {
    padding: 1.75rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.stat:hover {
    border-color: var(--border-subtle);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.35rem;
}

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

/* Skills Section */
.skills {
    background: var(--bg-primary);
}

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

.skill-card {
    background: var(--bg-card);
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

.skill-card:hover {
    border-color: var(--border-subtle);
    box-shadow: var(--shadow-md);
}

.skill-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.skill-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
}

.skill-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Projects Section */
.projects {
    background: var(--bg-secondary);
}

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

.project-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--border-subtle);
    box-shadow: var(--shadow-lg);
}

.project-image {
    height: 220px;
    background: var(--bg-tertiary);
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(59, 130, 246, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-link {
    color: white;
    text-decoration: none;
    padding: 0.65rem 1.35rem;
    background: var(--primary);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

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

.project-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.65;
    flex: 1;
    font-size: 0.95rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.project-tags span {
    padding: 0.35rem 0.75rem;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 500;
}

/* Key Projects / Screenshots Section */
.key-projects {
    background: var(--bg-primary);
}

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

.screenshot-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.screenshot-item:hover {
    border-color: var(--border-subtle);
    box-shadow: var(--shadow-lg);
}

.screenshot-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.screenshot-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.screenshot-item:hover .screenshot-image img {
    transform: scale(1.03);
}

.screenshot-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: 1.5rem 1rem 1rem;
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.screenshot-project {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
}

.screenshot-info {
    padding: 1.25rem;
    background: var(--bg-card);
}

.screenshot-title {
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.screenshot-label {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.9rem;
    margin-bottom: 0.35rem;
}

.screenshot-label:first-of-type {
    margin-top: 0;
}

.screenshot-content {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

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

.screenshot-website-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.screenshot-website-link i {
    font-size: 0.8rem;
    opacity: 0.9;
}

.screenshot-website-link:hover {
    color: var(--accent);
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(12px);
    animation: fadeIn 0.2s ease;
}

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

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.lightbox-caption {
    margin-top: 1.25rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

#lightbox-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
}

#lightbox-counter {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10000;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lightbox-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10000;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    user-select: none;
}

.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

.lightbox-prev:hover,
.lightbox-next:hover {
    color: white;
    background: rgba(59, 130, 246, 0.3);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Hide navigation buttons on mobile */
@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 30px;
    }

    #lightbox-image {
        max-height: 75vh;
    }
}

/* GitHub Section */
.github-section {
    background: var(--bg-secondary);
    text-align: center;
    padding: 5rem 0;
}

.github-section .section-description {
    margin-bottom: 2rem;
}

.btn-github {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.75rem;
    background: #24292e;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius);
    border: 1px solid #3d444d;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-github:hover {
    background: #32383e;
    border-color: #57606a;
    transform: translateY(-1px);
}

.btn-github i {
    font-size: 1.25rem;
}

/* Contact Section */
.contact {
    background: var(--bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

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

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    padding: 0.75rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
}

.contact-link:hover {
    color: var(--primary);
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--border-color);
}

.contact-link i {
    font-size: 1.1rem;
    opacity: 0.8;
    width: 1.25rem;
    text-align: center;
}

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

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.social-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.social-link i {
    font-size: 1rem;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: var(--bg-card);
    color: var(--text-primary);
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-group textarea {
    resize: vertical;
}

#form-status {
    padding: 1rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

#form-status.success {
    color: var(--accent);
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.12);
}

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

#submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    color: var(--text-muted);
    text-align: center;
    padding: 1.75rem 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

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

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 65px;
        flex-direction: column;
        background: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
        padding: 1.5rem 0;
        border-top: 1px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

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

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

    .hero-photo {
        width: 260px;
        height: 260px;
        margin: 0 auto;
    }

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

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

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

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

    .project-image {
        height: 200px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .hero-photo {
        width: 220px;
        height: 220px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

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

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