@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #121416;
    background-image:
        radial-gradient(120% 85% at 50% 115%, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.2) 52%, rgba(0, 0, 0, 0.74) 100%),
        radial-gradient(70% 45% at 18% 0%, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 72%),
        radial-gradient(56% 36% at 84% 10%, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 74%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.014) 0px, rgba(255, 255, 255, 0.014) 1px, transparent 1px, transparent 3px);
    background-attachment: fixed;
    color: #ffffff;
    overflow-x: hidden;
}

body,
.navbar,
.nav-links a,
.theme-toggle,
.nav-toggle,
.btn,
.project-links a,
.projects-toggle,
.contact-form input,
.contact-form textarea {
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

section {
    background-color: #121416;
    background-image:
        radial-gradient(120% 85% at 50% 115%, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.2) 52%, rgba(0, 0, 0, 0.74) 100%),
        radial-gradient(70% 45% at 18% 0%, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 72%),
        radial-gradient(56% 36% at 84% 10%, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 74%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.014) 0px, rgba(255, 255, 255, 0.014) 1px, transparent 1px, transparent 3px);
    background-repeat: no-repeat, no-repeat, no-repeat, repeat;
}

section:nth-of-type(even) {
    background-image:
        radial-gradient(120% 85% at 50% 115%, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.2) 52%, rgba(0, 0, 0, 0.74) 100%),
        radial-gradient(62% 42% at 82% 2%, rgba(255, 255, 255, 0.065) 0%, rgba(255, 255, 255, 0) 74%),
        radial-gradient(52% 34% at 14% 10%, rgba(255, 255, 255, 0.038) 0%, rgba(255, 255, 255, 0) 72%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.014) 0px, rgba(255, 255, 255, 0.014) 1px, transparent 1px, transparent 3px);
}

section + section {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    margin-top: 0;
    padding-top: 0;
}

.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.55s ease, transform 0.55s ease;
    will-change: opacity, transform;
}

.reveal.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    width: min(94%, 940px);
    padding: 0.65rem 0.8rem 0.65rem 1rem;
    background: rgba(14, 14, 14, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    z-index: 1000;
}

.nav-logo {
    font-size: 1.05rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.4rem;
    font-family: 'Montserrat', sans-serif;
    justify-self: center;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-links a:hover {
    background: #ffffff;
    color: #0a0a0a;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    border-radius: 999px;
    width: 2.4rem;
    height: 2.4rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.24rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.theme-toggle:hover {
    background: #ffffff;
    color: #0a0a0a;
}

.theme-toggle svg {
    width: 1rem;
    height: 1rem;
}

.nav-toggle span {
    width: 1rem;
    height: 2px;
    background: #ffffff;
    border-radius: 999px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7rem 8% 6rem;
    position: relative;
    gap: 2.25rem;
}

.hero-content {
    max-width: 50%;
    flex-shrink: 0;
}

.hero-github {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    text-decoration: none;
    opacity: 0.85;
    margin-bottom: 1rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.hero-github:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.hero-github span {
    font-size: 0.95rem;
    font-weight: 500;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #ffffff;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 300;
    line-height: 1.6;
    color: #a0a0a0;
    max-width: 500px;
    margin-bottom: 1.5rem;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    border: 1px solid #ffffff;
    background: transparent;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #ffffff;
    color: #0a0a0a;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-secondary:hover {
    background: #ffffff;
    color: #0a0a0a;
    transform: translateY(-2px);
}

.scroll-indicator {
    position: absolute;
    left: 50%;
    bottom: 1.15rem;
    transform: translateX(-50%);
    background: transparent;
    border: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    display: block;
    color: #ffffff;
    fill: currentColor;
    stroke: currentColor;
    opacity: 0.7;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scroll-arrow:hover {
    opacity: 1;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 45%;
}

.hero-image img {
    width: 100%;
    max-width: 395px;
    aspect-ratio: 1 / 1;
    height: auto;
    border: 2px solid #ffffff;
    border-radius: 100px;
    object-fit: cover;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        top: 0.85rem;
        width: 92%;
        padding: 0.5rem 0.6rem 0.5rem 0.85rem;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 0.45rem);
        right: 0;
        width: min(260px, 78vw);
        background: rgba(14, 14, 14, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 16px;
        padding: 0.5rem;
        flex-direction: column;
        gap: 0.15rem;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity 0.25s ease, transform 0.25s ease;
        justify-self: auto;
    }

    .nav-links.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-links a {
        display: block;
        width: 100%;
    }

    .hero {
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        padding: 5rem 6% 4.25rem;
    }

    .hero-content {
        max-width: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

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

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

    .hero-image {
        max-width: 72%;
    }

    .scroll-indicator {
        bottom: 0.55rem;
    }
}

/* Projects Section */
.projects {
    min-height: 100vh;
    padding: 4rem 8%;
    background: transparent;
}

.projects-container {
    max-width: 1400px;
    margin: 0 auto;
}

.projects .section-title {
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 2.25rem;
    color: #ffffff;
}

.projects-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid #1d1d1d;
}

.project-row {
    padding: 1.1rem 0;
    border-bottom: 1px solid #1d1d1d;
}

.project-meta {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6f6f6f;
    margin-bottom: 0.45rem;
}

.project-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-bottom: 0.55rem;
}

.project-name {
    font-size: clamp(1.25rem, 2.2vw, 1.65rem);
    font-weight: 600;
    color: #f3f3f3;
    letter-spacing: -0.02em;
}

.project-status {
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid #3a3a3a;
    color: #bcbcbc;
    border-radius: 999px;
    padding: 0.22rem 0.55rem;
}

.project-summary {
    max-width: 980px;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #9c9c9c;
    margin-bottom: 0.65rem;
}

.project-links {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.project-links a {
    color: #d6d6d6;
    text-decoration: none;
    font-size: 0.78rem;
    border: 1px solid #2f2f2f;
    border-radius: 999px;
    padding: 0.28rem 0.62rem;
    transition: all 0.25s ease;
}

.project-links a:hover {
    color: #0a0a0a;
    background: #ffffff;
    border-color: #ffffff;
}

.project-hidden {
    display: none;
}

.projects-toggle {
    margin-top: 0.85rem;
    background: transparent;
    color: #d6d6d6;
    border: 1px solid #2f2f2f;
    border-radius: 999px;
    padding: 0.46rem 1rem;
    font-size: 0.84rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.projects-toggle:hover {
    color: #0a0a0a;
    background: #ffffff;
    border-color: #ffffff;
}

/* Responsive - Projects */
@media (max-width: 768px) {
    .projects {
        padding: 3rem 6%;
    }

    .project-row {
        padding: 0.95rem 0;
    }

    .project-name {
        font-size: 1.3rem;
    }

    .project-summary {
        font-size: 0.86rem;
    }
}

/* About Section */
.about {
    min-height: 100vh;
    padding: 4rem 8%;
    background: transparent;
}

.about-container {
    max-width: 900px;
    margin: 0 auto;
}

.about .section-title {
    margin-bottom: 1rem;
}

.about-content {
    max-width: 760px;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.about-content p {
    font-size: 1.02rem;
    font-weight: 300;
    line-height: 1.7;
    color: #b8b8b8;
}

.about-skills {
    margin-top: 1.1rem;
}

.about-skills-title {
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d7d7d7;
    margin-bottom: 0.6rem;
}

.skills-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skills-list li {
    border: 1px solid #2f2f2f;
    border-radius: 999px;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    color: #d3d3d3;
    background: rgba(255, 255, 255, 0.02);
}

.skills-list li.skill-sub {
    font-size: 0.76rem;
    color: #b7b7b7;
    border-color: #272727;
    background: rgba(255, 255, 255, 0.01);
}

.about-caption {
    margin-top: 0.85rem;
    font-size: 0.95rem;
    color: #ebdede;
}

.about-caption a {
    color: #ffffff;
    text-decoration: none;
    border-bottom: 1px solid #404040;
    transition: border-color 0.3s ease, opacity 0.3s ease;
}

.about-caption a:hover {
    border-bottom-color: #ffffff;
    opacity: 0.9;
}

/* Responsive - About */
@media (max-width: 768px) {
    .about {
        padding: 3rem 6%;
    }

    .about-content p {
        font-size: 0.98rem;
    }

    .skills-list li {
        font-size: 0.76rem;
    }
}

/* Contact Section */
.contact {
    min-height: 100vh;
    padding: 4rem 8%;
    background: transparent;
}

.contact-container {
    max-width: 900px;
    margin: 0 auto;
}

.contact .section-title {
    margin-bottom: 0.9rem;
}

.contact-subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    color: #a0a0a0;
    margin-bottom: 1rem;
}

.contact-content {
    max-width: 680px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    position: relative;
    padding-bottom: 2.8rem;
}

.contact-form label {
    font-size: 0.9rem;
    color: #d0d0d0;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    background: #141414;
    color: #ffffff;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 0.8rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #ffffff;
}

.contact-form .btn {
    width: fit-content;
    margin-top: 0.5rem;
}

.form-status-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid #2f2f2f;
    border-radius: 12px;
    padding: 0.55rem 0.8rem;
    font-size: 0.84rem;
    background: rgba(10, 10, 10, 0.92);
    color: #d2d2d2;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.form-status-overlay.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.form-status-overlay.success {
    border-color: rgba(123, 214, 150, 0.48);
    color: #c8f2d4;
}

.form-status-overlay.error {
    border-color: rgba(233, 123, 123, 0.5);
    color: #f0b5b5;
}

/* Responsive - Contact */
@media (max-width: 768px) {
    .contact {
        padding: 3rem 6%;
    }
}

/* Light Mode */
body.light-mode {
    background-color: #eceff3;
    color: #14181d;
}

body.light-mode section {
    background-color: #eceff3;
    background-image: none;
}

body.light-mode .hero {
    background-image:
        radial-gradient(120% 88% at 50% 118%, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.26) 52%, rgba(0, 0, 0, 0.08) 100%),
        radial-gradient(70% 46% at 18% 0%, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0) 74%),
        radial-gradient(56% 36% at 84% 10%, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0) 74%),
        repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.014) 0px, rgba(0, 0, 0, 0.014) 1px, transparent 1px, transparent 3px);
    background-repeat: no-repeat, no-repeat, no-repeat, repeat;
}

body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(18, 22, 28, 0.14);
}

body.light-mode .nav-logo,
body.light-mode .nav-links a,
body.light-mode .theme-toggle,
body.light-mode .nav-toggle,
body.light-mode .hero-github,
body.light-mode .hero-title,
body.light-mode .section-title,
body.light-mode .project-name,
body.light-mode .about-caption a,
body.light-mode .scroll-arrow {
    color: #151a20;
}

body.light-mode .nav-toggle span {
    background: #151a20;
}

body.light-mode .nav-links a:hover,
body.light-mode .theme-toggle:hover,
body.light-mode .btn-secondary:hover,
body.light-mode .project-links a:hover,
body.light-mode .projects-toggle:hover {
    background: #151a20;
    color: #ffffff;
    border-color: #151a20;
}

body.light-mode .hero-subtitle,
body.light-mode .project-summary,
body.light-mode .about-content p,
body.light-mode .contact-subtitle {
    color: #46505a;
}

body.light-mode .about-skills-title {
    color: #3a4755;
}

body.light-mode .skills-list li {
    color: #334050;
    border-color: #c8d2de;
    background: rgba(255, 255, 255, 0.85);
}

body.light-mode .skills-list li.skill-sub {
    color: #4e5c6c;
    border-color: #d5dee8;
    background: rgba(255, 255, 255, 0.7);
}

body.light-mode .project-meta {
    color: #5b6671;
}

body.light-mode .projects-list,
body.light-mode .project-row {
    border-color: #d6dde6;
}

body.light-mode .project-status {
    border-color: #bcc8d6;
    color: #415063;
}

body.light-mode .project-links a,
body.light-mode .projects-toggle {
    color: #344150;
    border-color: #c8d2de;
}

body.light-mode .btn {
    border-color: #151a20;
    color: #151a20;
}

body.light-mode .btn-primary {
    background: #151a20;
    color: #ffffff;
}

body.light-mode .hero-image img {
    border-color: #1e252d;
}

body.light-mode .about-caption {
    color: #44515e;
}

body.light-mode .about-caption a {
    border-bottom-color: #9aa8b7;
}

body.light-mode .about-caption a:hover {
    border-bottom-color: #151a20;
}

body.light-mode .contact-form label {
    color: #36424f;
}

body.light-mode .contact-form input,
body.light-mode .contact-form textarea {
    background: #ffffff;
    color: #151a20;
    border-color: #c4cfdb;
}

body.light-mode .contact-form input:focus,
body.light-mode .contact-form textarea:focus {
    border-color: #151a20;
}

body.light-mode .form-status-overlay {
    background: rgba(255, 255, 255, 0.95);
    border-color: #c8d2de;
    color: #334050;
}

body.light-mode .form-status-overlay.success {
    border-color: rgba(74, 170, 110, 0.48);
    color: #276645;
}

body.light-mode .form-status-overlay.error {
    border-color: rgba(206, 103, 103, 0.52);
    color: #8a3333;
}

body.light-mode section + section {
    border-top-color: rgba(21, 26, 32, 0.16);
}

@media (max-width: 768px) {
    body.light-mode .nav-links {
        background: rgba(255, 255, 255, 0.96);
        border-color: rgba(18, 22, 28, 0.14);
    }
}
