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

:root {
    --bg-dark: #141414;
    --bg-light: #f5f5f0;
    --text-light: #ffffff;
    --text-dark: #141414;
    --text-muted: rgba(255, 255, 255, 0.6);
    --accent-green: #5dbd7a;
    --font-main: 'DM Sans', sans-serif;
    --nav-height: 4.5rem;

    /* Typography scale */
    --dfs-text-2xs: 0.75rem;
    --dfs-text-xs: 0.875rem;
    --dfs-text-sm: 0.9375rem;
    --dfs-text-base: 1rem;
    --dfs-text-md: 1.125rem;
    --dfs-text-lg: 1.25rem;
    --dfs-text-xl: 1.875rem;
    --dfs-text-2xl: 2rem;
    --dfs-text-3xl: 3.5rem;
    --dfs-text-stat: 5rem;

    /* Spacing scale */
    --dfs-space-1: 0.25rem;
    --dfs-space-2: 0.5rem;
    --dfs-space-3: 0.75rem;
    --dfs-space-4: 1rem;
    --dfs-space-5: 1.25rem;
    --dfs-space-6: 1.5rem;
    --dfs-space-8: 2rem;
    --dfs-space-10: 2.5rem;
    --dfs-space-12: 3rem;
    --dfs-space-14: 3.5rem;
    --dfs-space-16: 4rem;
    --dfs-space-20: 5rem;

    /* Surface colors */
    --surface-dark-04: rgba(255, 255, 255, 0.04);
    --surface-dark-06: rgba(255, 255, 255, 0.06);
    --surface-dark-08: rgba(255, 255, 255, 0.08);

    /* Motion */
    --dur-fast: 0.2s;
    --dur-slide: 0.4s;
    --ease: ease;

    /* Accent opacity variant */
    --accent-green-12: rgba(93, 189, 122, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

/* ─── Header / Navigation ───────────────────────────────────────────────────── */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-dark);
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2.5rem;
    height: var(--nav-height);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.logo img {
    width: 1.75rem;
    height: 1.75rem;
    object-fit: contain;
}

.logo-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-light);
    letter-spacing: 0.01em;
}

.dot {
    width: 0.5rem;
    height: 0.5rem;
    /* background-color: var(--accent-green); */
    background-color: var(--text-light);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Nav socials */
.nav-socials {
    display: flex;
    align-items: center;
    gap: 1.125rem;
}

.nav-socials a {
    color: var(--text-muted);
    font-size: 1rem;
    transition: color 0.2s ease;
}

.nav-socials a:hover {
    color: var(--text-light);
}

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2.25rem;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-light);
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.nav-links a:hover {
    opacity: 1;
}

/* Contact button */
.btn-contact {
    opacity: 1 !important;
    padding: 0.5rem 1.25rem;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-light) !important;
    transition: background-color 0.2s ease, border-color 0.2s ease !important;
}

.btn-contact:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--text-light);
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    padding-top: var(--nav-height);
    background-color: var(--bg-dark);
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2.5rem;
    min-height: calc(100vh - var(--nav-height));
}

.hero-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 5rem 0;
}

.hero-intro {
    color: #9a9a9a;
    font-size: 2rem;
    font-weight: 400;
}

.hero-headline {
    font-size: clamp(2.25rem, 4.5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-light);
    letter-spacing: -0.01em;
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 26.25rem;
    line-height: 1.7;
}

.hero-ctas {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.5rem;
}

.btn-hero {
    padding: 0.625rem 1.375rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    color: var(--text-light);
    transition: background-color 0.2s ease;
}

.btn-hero:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.hero-right {
    flex: 0 0 46%;
    align-self: stretch;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.hero-img {
    width: 100%;
    height: 100%;
    max-height: 42.5rem;
    object-fit: cover;
    object-position: top center;
}

@media (max-width: 48em) {
    .hero-container {
        flex-direction: column-reverse;
        padding: 0;
    }

    .hero-right {
        width: 100%;
        flex: unset;
    }

    .hero-img {
        width: 100%;
        height: auto;
    }

    .hero-left {
        padding: 2.5rem 1.5rem;
    }
}

/* ─── Section 3: Technology Stacks ─────────────────────────────────────────── */
.tech-stacks {
    background-color: var(--bg-light);
}

.tech-stacks-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2.5rem;
}

.section-heading {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 3.5rem;
}

.tech-stacks-body {
    display: flex;
    align-items: center;
    gap: 5rem;
}

.tech-stacks-left {
    flex: 1;
}

.tech-stacks-desc {
    font-size: 1.125rem;
    line-height: 1.75;
    color: rgba(20, 20, 20, 0.6);
    max-width: 28rem;
}

.tech-stacks-right {
    flex: 0 0 46%;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.75rem 1rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
}

.tech-icon {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
}

.tech-icon--fa {
    font-size: 2.5rem;
    line-height: 1;
    color: #FF9900;
}

.tech-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-dark);
    letter-spacing: 0.01em;
    text-align: center;
}

@media (max-width: 48em) {
    .tech-stacks-container {
        padding: 3.5rem 1.5rem;
    }

    .section-heading {
        margin-bottom: 2.5rem;
    }

    .tech-stacks-body {
        flex-direction: column;
        gap: 2.5rem;
    }

    .tech-stacks-left {
        width: 100%;
    }

    .tech-stacks-desc {
        max-width: 100%;
        font-size: 1rem;
    }

    .tech-stacks-right {
        flex: unset;
        width: 100%;
    }

    .tech-grid {
        gap: 1.25rem 0.75rem;
    }
}

/* ─── Section 4: My Projects ───────────────────────────────────────────────── */
.projects {
    background-color: var(--bg-dark);
}

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

.projects-heading {
    color: var(--text-light);
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 5rem;
}

.project-card {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.project-card--reverse {
    flex-direction: row-reverse;
}

.project-img-wrap {
    flex: 0 0 48%;
}

.project-img-placeholder {
    width: 100%;
    aspect-ratio: 16 / 10;
    background-color: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.project-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-name {
    font-size: clamp(1.375rem, 2.5vw, 1.875rem);
    font-weight: 700;
    color: var(--text-light);
    line-height: 1.2;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.project-company {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 400;
}

.project-tag {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-green);
    background-color: rgba(93, 189, 122, 0.12);
    padding: 0.2rem 0.625rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.project-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.75;
    max-width: 30rem;
}

.project-ctas {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.btn-project {
    padding: 0.625rem 1.375rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    color: var(--text-light);
    transition: background-color 0.2s ease;
}

.btn-project:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

button.btn-project {
    background: none;
    font-family: var(--font-main);
    cursor: pointer;
}

@media (max-width: 48em) {
    .projects-container {
        padding: 3.5rem 1.5rem;
    }

    .projects-list {
        gap: 3.5rem;
    }

    .project-card,
    .project-card--reverse {
        flex-direction: column;
    }

    .project-img-wrap {
        flex: unset;
        width: 100%;
    }
}

/* ─── Section 5: Experience ─────────────────────────────────────────────────── */
.experience {
    background-color: var(--bg-dark);
}

.experience-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.experience-heading {
    color: var(--text-light);
}

.stats-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    margin-bottom: 3.5rem;
}

.stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    padding: 2rem 1rem;
}

.stat-value {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
}

.stat-number {
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 700;
    color: var(--text-light);
    line-height: 1;
}

.stat-suffix {
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--text-light);
}


.stat-divider {
    width: 1px;
    height: 5rem;
    background-color: rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

.btn-github {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    color: var(--text-light);
    transition: background-color 0.2s ease;
}

.btn-github:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.btn-github .fa-github {
    font-size: 1rem;
}

@media (max-width: 48em) {
    .experience-container {
        padding: 3.5rem 1.5rem;
    }

    .stats-grid {
        flex-direction: column;
        gap: 0;
    }

    .stat-divider {
        width: 5rem;
        height: 1px;
    }

    .stat-item {
        padding: 1.5rem 1rem;
    }
}

/* ─── Section 6: Testimonials ───────────────────────────────────────────────── */
.testimonials {
    background-color: var(--bg-dark);
}

.testimonials-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.testimonials-heading {
    color: var(--text-light);
}

.t-radio {
    display: none;
}

.testimonials-slider-wrap {
    width: 100%;
    display: grid;
}

.testimonial-card {
    grid-column: 1;
    grid-row: 1;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#t1:checked ~ .testimonials-slider-wrap .testimonial-card:nth-child(1),
#t2:checked ~ .testimonials-slider-wrap .testimonial-card:nth-child(2),
#t3:checked ~ .testimonials-slider-wrap .testimonial-card:nth-child(3) {
    opacity: 1;
    pointer-events: auto;
}

.testimonial-avatar-wrap {
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-avatar-icon {
    font-size: 4rem;
    color: var(--text-muted);
    line-height: 1;
}

.testimonial-quote {
    font-size: 1rem;
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 28rem;
}

.testimonial-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
}

.testimonial-role {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.testimonials-dots {
    display: flex;
    gap: 0.625rem;
    margin-top: 2.5rem;
}

.dot-btn {
    display: block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: var(--text-light);
    opacity: 0.3;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

#t1:checked ~ .testimonials-dots label[for="t1"],
#t2:checked ~ .testimonials-dots label[for="t2"],
#t3:checked ~ .testimonials-dots label[for="t3"] {
    opacity: 1;
}

@media (max-width: 48em) {
    .testimonials-container {
        padding: 3.5rem 1.5rem;
    }

    .testimonial-card {
        flex: 0 0 85%;
        padding: 2rem 1.5rem;
    }
}

/* ─── Section 7: Contact Me ─────────────────────────────────────────────────── */
.contact {
    background-color: var(--bg-light);
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 5rem;
}

.contact-left {
    flex: 1;
}

.contact-left .section-heading {
    text-align: left;
    margin-bottom: 1.5rem;
}

.contact-subtitle {
    font-size: 1.125rem;
    line-height: 1.75;
    color: rgba(20, 20, 20, 0.6);
}

.contact-right {
    flex: 0 0 46%;
}

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

.form-field {
    width: 100%;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid rgba(20, 20, 20, 0.2);
    border-radius: 4px;
    background-color: transparent;
    font-family: var(--font-main);
    font-size: 0.9375rem;
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.2s ease;
}

.form-input::placeholder {
    color: rgba(20, 20, 20, 0.4);
}

.form-input:focus {
    border-color: var(--text-dark);
}

.form-input.error {
    border-color: #e05252;
}

.form-textarea {
    resize: vertical;
    min-height: 8rem;
}

.btn-send {
    width: 100%;
    padding: 0.875rem 1.375rem;
    background-color: var(--text-dark);
    color: var(--text-light);
    font-family: var(--font-main);
    font-size: 0.9375rem;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    margin-top: 0.5rem;
}

.btn-send:hover {
    opacity: 0.85;
}

.btn-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-success {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-dark);
    font-size: 1rem;
}

@media (max-width: 48em) {
    .contact-container {
        flex-direction: column;
        gap: 2.5rem;
        padding: 3.5rem 1.5rem;
    }

    .contact-left .section-heading {
        text-align: center;
    }

    .contact-subtitle {
        text-align: center;
    }

    .contact-right {
        flex: unset;
        width: 100%;
    }
}

/* ─── Footer ────────────────────────────────────────────────────────────────── */
.site-footer {
    background-color: var(--bg-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2.5rem;
    height: var(--nav-height);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 1.25rem;
    padding: 0.25rem;
    z-index: 200;
}

@media (max-width: 48em) {
    .hamburger {
        display: block;
    }

    header .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background-color: var(--bg-dark);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        padding: 1rem 2.5rem 1.5rem;
    }

    header .nav-links.open {
        display: flex;
    }

    header .nav-links a {
        padding: 0.625rem 0;
        font-size: 1rem;
        width: 100%;
    }
}

@media (max-width: 48em) {
    .footer-inner {
        flex-direction: column;
        justify-content: center;
        height: auto;
        padding: 2rem 1.5rem;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-inner .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.25rem 1.5rem;
    }
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    padding: 0.5rem 0 0.75rem;
}

.footer-socials a {
    color: var(--text-muted);
    font-size: 1.25rem;
    transition: color 0.2s ease;
}

.footer-socials a:hover {
    color: var(--text-light);
}

.footer-copy {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-bottom: 1rem;
}

/* ─── Case Study Modal ─────────────────────────────────────────────────────── */
@keyframes dfsFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    z-index: 400;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-backdrop[hidden] {
    display: none;
}

.modal-dialog {
    position: relative;
    width: 100%;
    max-width: 720px;
    margin: auto;
    background: var(--bg-dark);
    border: 1px solid var(--surface-dark-08);
    border-radius: 8px;
    padding: 2.5rem 2.5rem 2rem;
    animation: dfsFadeIn var(--dur-fast) var(--ease) both;
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--surface-dark-08);
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: color var(--dur-fast) var(--ease),
                background-color var(--dur-fast) var(--ease);
}

.modal-close:hover {
    color: var(--text-light);
    background-color: var(--surface-dark-08);
}

.modal-header-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.modal-eyebrow {
    font-size: var(--dfs-text-xs);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.modal-tag {
    display: inline-block;
    font-size: var(--dfs-text-2xs);
    font-weight: 500;
    color: var(--accent-green);
    background-color: var(--accent-green-12);
    padding: 0.2rem 0.625rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
    margin-bottom: 0;
}

.modal-title {
    font-size: var(--dfs-text-xl);
    font-weight: 700;
    color: var(--text-light);
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.modal-company {
    font-size: var(--dfs-text-xs);
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.modal-summary {
    font-size: var(--dfs-text-base);
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 1.75rem;
}

.modal-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.modal-tech-chip {
    font-size: var(--dfs-text-2xs);
    font-weight: 500;
    color: var(--accent-green);
    background-color: var(--accent-green-12);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.modal-section-title {
    font-size: var(--dfs-text-xs);
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.modal-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-bottom: 1.75rem;
}

.modal-list li {
    position: relative;
    padding-left: 1rem;
    font-size: var(--dfs-text-base);
    color: var(--text-muted);
    line-height: 1.7;
}

.modal-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 6px;
    height: 1px;
    background-color: var(--accent-green);
}

@media (max-width: 48em) {
    .modal-dialog {
        padding: 2rem 1.25rem 1.5rem;
    }

    .modal-title {
        font-size: var(--dfs-text-lg);
        padding-right: 2.5rem;
    }
}
