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

:root {
    --primary-color: #0366d6;
    --secondary-color: #24292e;
    --background-dark: #0d1117;
    --background-light: #161b22;
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --accent-color: #58a6ff;
    --border-color: #30363d;
    --success-color: #3fb950;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    background-color: var(--background-dark);
    color: var(--text-primary);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

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

nav .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    z-index: 1001;
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
    transition: transform 0.3s ease;
}

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

.hamburger:hover span {
    background-color: var(--accent-color);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), var(--success-color));
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

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

/* Active state for current section */
.nav-links a.active {
    color: var(--accent-color);
}

.nav-links a.active::after {
    width: 100%;
}

/* Social Icons - Base Styles */
.social-icons a,
.contact-social-icons a,
.footer-social-icons a,
.nav-social-icons a {
    display: flex;
    align-items: center;
    color: var(--text-primary);
    transition: color 0.3s, transform 0.2s;
}

.social-icons a:hover,
.contact-social-icons a:hover,
.footer-social-icons a:hover,
.nav-social-icons a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* Social Icons in Navigation */
.nav-social-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Sections */
section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    scroll-margin-top: 80px;
}

section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--accent-color);
}

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
}

#hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-color), var(--success-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#hero .subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

#hero .bio {
    max-width: 700px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

#hero .bio strong {
    color: var(--accent-color);
    font-weight: 600;
}

#hero .bio strong a {
    color: var(--accent-color);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

#hero .bio strong a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), var(--success-color));
    transition: width 0.3s ease;
}

#hero .bio strong a:hover {
    color: var(--success-color);
}

#hero .bio strong a:hover::after {
    width: 100%;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: #3e77b9;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: #1f6feb;
    transform: translateY(-2px);
}

/* Repositories Section */
#repositories {
    background-color: var(--background-light);
}

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

.repo-card {
    background-color: var(--background-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    transition: transform 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
}

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

.repo-card-content {
    flex: 1;
}

.repo-card-content h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.repo-card-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.repo-card-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.repo-card-footer .repo-link {
    color: var(--accent-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.repo-card-footer .repo-link:hover {
    text-decoration: underline;
}

.repo-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    align-items: center;
}

.repo-stars {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-secondary);
}

.repo-stars[data-loading] .star-count {
    opacity: 0.5;
}

.repo-stars svg {
    color: #f1c40f;
}

/* Contact Section */
#contact {
    background-color: var(--background-dark);
}

.contact-intro {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-social-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* .contact-social-icons a:hover {
    transform: translateY(-3px);
} */

.contact-form {
    max-width: 680px;
    margin: 2rem auto;
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.contact-form iframe {
    border-radius: 8px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
}

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

/* Footer */
footer {
    background-color: var(--background-light);
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

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

    /* Hide navigation menu by default on mobile */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 280px;
        background-color: var(--background-dark);
        border-left: 1px solid var(--border-color);
        flex-direction: column;
        justify-content: flex-start;
        padding: 5rem 2rem 2rem;
        gap: 3rem;
        transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    }

    /* Show menu when active */
    .nav-menu.active {
        right: 0;
    }

    /* Stack navigation links vertically */
    .nav-links {
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 1rem;
        font-size: 1.2rem;
        border-radius: 8px;
        background: linear-gradient(90deg, transparent, transparent);
        transition: all 0.3s ease;
    }

    .nav-links a:hover,
    .nav-links a.active {
        background: linear-gradient(90deg, var(--accent-color) 0%, transparent 100%);
        padding-left: 1.5rem;
        box-shadow: 0 0 20px rgba(88, 166, 255, 0.2);
    }

    .nav-links a::after {
        display: none;
    }

    /* Position social icons at bottom of mobile menu */
    .nav-social-icons {
        gap: 1.5rem;
        margin-top: auto;
        padding-top: 2rem;
        border-top: 1px solid var(--border-color);
        justify-content: center;
    }

    .nav-social-icons svg {
        width: 28px;
        height: 28px;
    }

    section {
        padding: 4rem 1.5rem;
        scroll-margin-top: 100px;
    }

    #hero {
        padding-top: 120px;
    }

    #hero h1 {
        font-size: 2.5rem;
    }

    #hero .subtitle {
        font-size: 1.2rem;
    }

    section h2 {
        font-size: 2rem;
    }

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

    .contact-social-icons {
        gap: 1.5rem;
    }

    .contact-form {
        padding: 1rem;
        margin: 1rem;
    }

    .contact-form iframe {
        width: 100%;
        height: 600px;
    }

    .footer-social-icons {
        gap: 1rem;
    }
}
