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

body {
    background: #0a0a0a;
    font-family: 'Inter', sans-serif;
    color: #eaeef2;
    line-height: 1.5;
    scroll-behavior: smooth;
}

/* Variables */
:root {
    --orange: #f97316;
    --orange-dark: #ea580c;
    --orange-glow: rgba(249, 115, 22, 0.2);
    --card-bg: #111111;
    --card-border: #222222;
    --text-dim: #9ca3af;
}

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

/* Hero Section */
.hero {
    padding: 60px 0 40px;
    text-align: center;
    border-bottom: 1px solid #1e1e1e;
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f97316, #b91c1c);
    width: 96px;
    height: 96px;
    border-radius: 32px;
    margin-bottom: 20px;
    box-shadow: 0 15px 35px rgba(249, 115, 22, 0.25);
    transition: transform 0.3s ease;
}

.avatar i {
    font-size: 48px;
    color: white;
}

.avatar:hover {
    transform: scale(1.02);
}

h1 {
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #ffffff, #f97316);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 12px;
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto 24px;
}

/* Tech Stack */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 24px 0 20px;
}

.tech-badge {
    background: #1a1a1a;
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #2c2c2c;
    color: #f97316;
    transition: all 0.2s;
}

.tech-badge:hover {
    border-color: #f97316;
    background: #1e1a15;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin: 32px 0 0;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #0f0f0f;
    padding: 10px 20px;
    border-radius: 60px;
    text-decoration: none;
    color: #e2e8f0;
    font-weight: 500;
    border: 1px solid #262626;
    transition: all 0.25s;
}

.social-link i {
    font-size: 1.3rem;
    color: #f97316;
}

.social-link:hover {
    border-color: #f97316;
    background: #1a120c;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.2);
}

/* Projects Section */
.projects-section {
    padding: 60px 0 80px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 48px;
    text-align: center;
    letter-spacing: -0.3px;
}

.section-title span {
    color: #f97316;
    border-bottom: 3px solid #f97316;
    padding-bottom: 6px;
}

/* Projects Grid */
.projects-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
}

.project-card {
    flex: 0 0 auto;
    width: 320px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: 22px 20px 24px;
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    cursor: pointer;
    backdrop-filter: blur(2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: #f97316;
    box-shadow: 0 20px 30px -12px rgba(249, 115, 22, 0.25);
    background: #141414;
}

.repo-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.repo-icon {
    font-size: 2rem;
    color: #f97316;
}

.repo-name {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.3px;
    word-break: break-word;
}

.repo-desc {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
}

.repo-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: #b9b9b9;
    border-top: 1px solid #232323;
    padding-top: 16px;
    margin-top: 8px;
}

.repo-meta i {
    color: #f97316;
    width: 18px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: #0c0c0c;
    max-width: 750px;
    width: 90%;
    max-height: 85vh;
    border-radius: 32px;
    border: 1px solid #2c2c2c;
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.96);
    transition: transform 0.2s ease;
}

.active .modal-container {
    transform: scale(1);
}

.modal-header {
    padding: 20px 28px;
    border-bottom: 1px solid #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0a0a0a;
}

.modal-header h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #f97316;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    transition: 0.2s;
}

.close-modal:hover {
    color: #f97316;
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px 28px;
    overflow-y: auto;
    flex: 1;
    color: #cfcfcf;
    font-size: 0.9rem;
    line-height: 1.55;
}

.modal-body pre,
.modal-body code {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 0.85rem;
}

.modal-body a {
    color: #f97316;
    text-decoration: none;
}

.modal-footer {
    padding: 16px 28px;
    border-top: 1px solid #222;
    display: flex;
    gap: 20px;
    background: #080808;
}

.btn-github {
    background: #1f1f1f;
    padding: 10px 20px;
    border-radius: 60px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
    border: 1px solid #333;
}

.btn-github i {
    color: #f97316;
}

.btn-github:hover {
    background: #2a241f;
    border-color: #f97316;
}

.loader {
    text-align: center;
    padding: 40px;
    color: #f97316;
}

.error-readme {
    color: #ff8c42;
    background: #261e15;
    padding: 20px;
    border-radius: 20px;
}

/* Footer */
footer {
    border-top: 1px solid #1a1a1a;
    padding: 28px 0;
    text-align: center;
    color: #6b7280;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 700px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .project-card {
        width: 100%;
        max-width: 360px;
    }

    .social-link span {
        display: none;
    }

    .social-link {
        padding: 12px 16px;
    }

    .social-link i {
        margin: 0;
        font-size: 1.5rem;
    }

    .modal-body h1,
    .modal-body h2,
    .modal-body h3 {
        margin-top: 20px;
        margin-bottom: 10px;
    }

    .modal-body ul {
        padding-left: 20px;
        margin-bottom: 12px;
    }

    .modal-body table {
        border-collapse: collapse;
        margin: 15px 0;
        width: 100%;
    }

    .modal-body td,
    .modal-body th {
        border: 1px solid #333;
        padding: 6px;
    }

    .modal-body img {
        max-width: 100%;
    }
}