/* =========================================================
   RESET
========================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "DM Sans", sans-serif;
    line-height: 1.6;
    background: #F7F1E8;
    color: #252525;
}

.about-content p {
    text-align: justify;
}

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

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

button,
input,
textarea {
    font: inherit;
}


/* =========================================================
   VARIABLES
========================================================= */

:root {

    /* ==============================
       COLORS
    ============================== */

    --background: #F7F1E8;
    --background-light: #EFE8DD; 

    --text: #252525;
    --text-light: #66615B;

    --accent: #A6B59F;
    --accent-dark: #84947D;

    --white: #FFFFFF;
    --border: #DDD5C9;


    /* ==============================
       BORDER RADIUS
    ============================== */

    --radius-small: 10px;
    --radius-medium: 18px;
    --radius-large: 28px;


    /* ==============================
       LAYOUT
    ============================== */

    --max-width: 1200px;

}


/* =========================================================
   GENERAL
========================================================= */

.container {
    width: min(90%, var(--max-width));
    margin: 0 auto;
}

.section {
    padding: 120px 0;
}

.section-light {
    background: var(--background-light);
}

.section-heading {
    max-width: 700px;
    margin-bottom: 60px;
}

.section-heading h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
    margin-bottom: 20px;
}

.section-heading > p:last-child {
    color: var(--text-light);
}

.eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--accent-dark);
    margin-bottom: 15px;
}


/* =========================================================
   NAVIGATION
========================================================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: rgba(248, 247, 244, 0.95);
    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(10px);
}

.nav-container {
    min-height: 75px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;

    transition: color 0.2s ease;
}

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

.menu-button {
    display: none;

    border: none;
    background: none;

    font-size: 1.5rem;
    cursor: pointer;
}


/* =========================================================
   BUTTONS
========================================================= */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 13px 24px;

    border-radius: 999px;

    font-size: 0.9rem;
    font-weight: 600;

    border: 1px solid transparent;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

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

.button-primary {
    background: var(--text);
    color: var(--white);
}

.button-primary:hover {
    background: var(--accent-dark);
}

.button-secondary {
    background: transparent;
    border-color: var(--border);
}

.button-secondary:hover {
    background: var(--white);
}


/* =========================================================
   HERO
========================================================= */

.hero {
    min-height: 85vh;

    display: flex;
    align-items: center;

    padding: 100px 0;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;

    align-items: center;
}

.hero-content {
    max-width: 700px;
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 5.5rem);
    line-height: 0.95;

    margin-bottom: 20px;
}

.hero h2 {
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 500;

    line-height: 1.2;

    margin-bottom: 25px;
}

.hero h2 span {
    color: var(--accent-dark);
}

.hero-description {
    max-width: 620px;

    font-size: 1.1rem;
    color: var(--text-light);

    margin-bottom: 35px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;

    margin-bottom: 25px;
}

.availability {
    font-size: 0.85rem;
    color: var(--text-light);
}


/* =========================================================
   HERO AVATAR
========================================================= */

.hero-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-avatar img {
    width: min(350px, 100%);
    height: auto;
    display: block;
}


/* =========================================================
   CAPABILITIES
========================================================= */

.capabilities {
    padding: 100px 0;
    background: var(--text);
    color: var(--white);
}

.capabilities .eyebrow {
    color: var(--accent);
}

.capabilities .section-heading {
    max-width: 750px;
}

.capability-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 20px;
}

.capability-card {
    padding: 30px;

    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-medium);

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.capability-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 20px;
}

.capability-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.capability-card ul {
    list-style: none;

    color: #cfcfcf;

    font-size: 0.9rem;
}

.capability-card li {
    margin-bottom: 7px;
}


/* =========================================================
   ABOUT
========================================================= */

.about-container {
    display: grid;

    grid-template-columns: 0.7fr 1.3fr;

    gap: 80px;

    align-items: center;
}

.about-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;

    margin-bottom: 25px;
}

.about-content > p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.strengths {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 25px;

    margin-top: 40px;
}

.strength strong {
    display: block;
    margin-bottom: 5px;
}

.strength p {
    font-size: 0.9rem;
    color: var(--text-light);
}


/* =========================================================
   SERVICES
========================================================= */

.service-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 25px;
}

.service-card {
    padding: 35px;

    background: var(--background);

    border: 1px solid var(--border);
    border-radius: var(--radius-medium);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.service-card:hover {
    transform: translateY(-5px);

    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.06);
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.service-card > p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.service-card ul {
    list-style: none;
}

.service-card li {
    position: relative;

    padding-left: 20px;

    margin-bottom: 8px;

    font-size: 0.9rem;
}

.service-card li::before {
    content: "✓";

    position: absolute;
    left: 0;

    color: var(--accent-dark);
    font-weight: 700;
}


/* =========================================================
   PORTFOLIO
========================================================= */

.portfolio-preview h2 {
    font-size: clamp(2.8rem, 5vw, 4rem);
    line-height: 1.1;
}

.project {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 45px;
    align-items: center;
    padding: 80px 0;
    border-top: 1px solid var(--border);
}

.project-reverse {
    grid-template-columns: 1.2fr 0.8fr;
}

.project-reverse .project-info {
    order: 2;
}

.project-reverse .project-visual {
    order: 1;
}

.project-number {
    display: block;

    font-size: 0.8rem;
    font-weight: 700;

    color: var(--accent-dark);

    margin-bottom: 10px;
}

.project-category {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    font-weight: 700;

    color: var(--text-light);

    margin-bottom: 12px;
}

.portfolio-sub-section {
    grid-column: 1 / -1;
    background-color: #A6B59F;
    padding: 5px 32px;
    border-radius: 16px;
    margin: -40px 0 30px;
}

.portfolio-sub-section h2 {
    margin: 0;
    font-size: 25px;
    font-weight: 700;
    color: #252525;
}

/* Portfolio page heading only */
.portfolio .section-heading {
    text-align: center;
    max-width: 800px;
    margin: 50px auto 60px;
}

.portfolio .section-title{
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
}

.project-info h3 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.15;

    margin-bottom: 20px;
}

.project-info > p:not(.project-category) {
    color: var(--text-light);
    margin-bottom: 25px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tags span {
    padding: 6px 12px;

    background: var(--background-light);

    border-radius: 999px;

    font-size: 0.75rem;
}


/* =========================================================
   PROJECT VISUALS
========================================================= */

.project {
    display: block;
    padding: 100px 0;
    border-top: 1px solid var(--border);
}

.project-reverse {
    display: block;
}

.project-info {
    max-width: 720px;
    margin-bottom: 50px;
}

.project-info h3 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    margin-bottom: 20px;
}

.project-visual {
    width: 100%;
}

.showcase-caption {
    margin: 14px 0 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.showcase-caption strong {
    color: var(--text);
    font-weight: 600;
}

/* =========================================
   FULL-WIDTH SHOWCASE
========================================= */

.showcase-item {
    position: relative;
    width: 100%;
    margin-bottom: 40px;
}

.showcase-item:last-child {
    margin-bottom: 0;
}

/* Images */
.showcase-item img {
    width: 100%;
    height: auto;
    display: block;

    border-radius: var(--radius-medium);
    border: 1px solid var(--border);

    background: var(--white);
}

/* Videos */
.showcase-item video {
    width: 100%;
    height: auto;
    display: block;

    border-radius: var(--radius-medium);
    border: 1px solid var(--border);

    background: #000;

    /* No cropping */
    object-fit: contain;
}

/* =========================================
   SHOWCASE LABEL
========================================= */

.showcase-label {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 2;

    padding: 7px 13px;

    background: var(--text);
    color: var(--white);

    border-radius: 999px;

    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* =========================================
   BETWEEN BEFORE / AFTER
========================================= */

.showcase-divider {
    display: flex;
    align-items: center;
    gap: 15px;

    margin: 35px 0;
}

.showcase-divider::before,
.showcase-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.showcase-divider span {
    color: var(--accent-dark);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* =========================================
   NON BEFORE/AFTER IMAGE SHOWCASE
========================================= */

.image-showcase {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.image-showcase .showcase-item {
    margin-bottom: 0;
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 650px) {

    .project {
        padding: 70px 0;
    }

    .project-info {
        margin-bottom: 35px;
    }

    .project-info h3 {
        font-size: 2rem;
    }

    .showcase-item {
        margin-bottom: 25px;
    }

    .showcase-label {
        top: 12px;
        left: 12px;
        padding: 6px 10px;
        font-size: 0.65rem;
    }

    .showcase-divider {
        margin: 25px 0;
    }

}

/* =========================================================
   WORKFLOW
========================================================= */

.workflow-grid {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.workflow-step {
    flex: 1;
    text-align: center;
}

.workflow-step span {
    display: inline-flex;
    width: 45px;
    height: 45px;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border-radius: 50%;
    background: var(--text);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 700;
}

.workflow-step h3 {
    margin-bottom: 8px;
}

.workflow-step p {
    font-size: 0.85rem;
    color: var(--text-light);
}

.workflow-line {
    width: 30px;
    height: 1px;
    background: var(--border);
    margin-top: 22px;
}


/* =========================================================
   TOOLS
========================================================= */

.tools-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 20px;
}

.tool-card {
    padding: 30px;

    border: 1px solid var(--border);
    border-radius: var(--radius-medium);

    background: var(--white);
}

.tool-icon {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.tool-card h3 {
    margin-bottom: 8px;
}

.tool-card p {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* =========================================================
   WEB DEVELOPMENT TOOLS
========================================================= */

.tools-subheading {
    margin-top: 70px;
    margin-bottom: 35px;
}

.tools-subheading h3 {
    margin: 8px 0 10px;
}

.tools-subheading p:last-child {
    margin: 0;
}

/* =========================================================
   RESUME
========================================================= */

.resume-container {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 80px;

    align-items: center;
}

.resume-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);

    line-height: 1.15;

    margin-bottom: 20px;
}

.resume-content > p:not(.eyebrow) {
    color: var(--text-light);

    margin-bottom: 30px;
}

.resume-paper {
    min-height: 500px;

    padding: 20px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background: var(--white);

    border: 1px solid var(--border);

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.08);
}

.resume-paper p {
    font-weight: 700;
    margin-bottom: 10px;
}

.resume-paper span {
    color: var(--text-light);
    font-size: 0.85rem;
    text-align: center;
}


/* =========================================================
   CONTACT
========================================================= */

.contact-container {
    display: grid;

    grid-template-columns: 0.8fr 1.2fr;

    gap: 80px;
}

.contact-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);

    line-height: 1.15;

    margin-bottom: 20px;
}

.contact-content > p:not(.eyebrow) {
    color: var(--text-light);

    margin-bottom: 35px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-details span {
    display: block;

    font-size: 0.75rem;
    text-transform: uppercase;

    letter-spacing: 0.1em;

    color: var(--text-light);

    margin-bottom: 3px;
}

.contact-details a {
    font-weight: 600;
}

.contact-details a:hover {
    color: var(--accent-dark);
}

.contact-details p {
    margin: 0;
}


/* =========================================================
   FORM
========================================================= */

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;

    padding: 14px 16px;

    border: 1px solid var(--border);
    border-radius: var(--radius-small);

    background: var(--white);

    color: var(--text);

    outline: none;

    resize: vertical;

    transition: border 0.2s ease;
}

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

.contact-form .button {
    align-self: flex-start;
    cursor: pointer;
}


/* =========================================================
   FOOTER
========================================================= */

.footer {
    padding: 50px 0;

    background: var(--text);
    color: var(--white);
}

.footer-container {
    display: grid;

    grid-template-columns:
        1fr auto 1fr;

    gap: 30px;

    align-items: center;
}

.footer p {
    color: #aaa;
    font-size: 0.8rem;
}

.footer .logo {
    display: block;
    margin-bottom: 5px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    font-size: 0.8rem;
    color: #ccc;
}

.footer-links a:hover {
    color: var(--white);
}

.copyright {
    text-align: right;
}


/* =========================================================
   RESPONSIVE — TABLET
========================================================= */

@media (max-width: 900px) {

    .nav-links {
        gap: 15px;
    }

    .hero-container,
    .about-container,
    .resume-container,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .hero-image {
        max-width: 500px;
    }

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

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

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

    .project,
    .project-reverse {
        grid-template-columns: 1fr;
    }

    .project-reverse .project-info {
        order: initial;
    }

    .project-reverse .project-visual {
        order: initial;
    }

    .workflow-grid {
        flex-direction: column;
    }

    .workflow-line {
        width: 1px;
        height: 30px;
    }

    .workflow-step {
        max-width: 500px;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }

    .copyright {
        text-align: left;
    }

}


/* =========================================================
   RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 650px) {

    .section {
        padding: 80px 0;
    }

    .nav-links {
        display: none;
    }

    .menu-button {
        display: block;
    }

    .hero {
        padding: 80px 0;
    }

    .hero h1 {
        font-size: 3.2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .button {
        width: 100%;
    }

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

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

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

    .before-after {
        grid-template-columns: 1fr;
    }

    .project-arrow {
        text-align: center;
        transform: rotate(90deg);
    }

    .project-image {
        min-height: 250px;
    }

    .large-image {
        min-height: 300px;
    }

    .service-card,
    .tool-card {
        padding: 25px;
    }

}

/* =========================================================
   FINAL LAYOUT FIXES
   These rules override older/duplicate rules above.
========================================================= */

/* -------------------------
   GLOBAL PAGE STRUCTURE
------------------------- */

body {
    overflow-x: hidden;
}

main {
    width: 100%;
}

/* -------------------------
   HEADER / NAVIGATION
   Matches the portfolio HTML:
   .header + .menu-toggle
------------------------- */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: rgba(247, 241, 232, 0.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header .nav-container {
    width: min(90%, var(--max-width));
    min-height: 75px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 8px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
    border-radius: 2px;
}

/* Keep the old navbar class compatible if it appears anywhere. */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* -------------------------
   PORTFOLIO PAGE INTRO
------------------------- */

/*
   The portfolio HTML has the first .section-heading directly
   inside <main>, rather than inside a .container.
   This gives it the same 90% width and alignment as the rest
   of the website.
*/

main > .section-heading {
    width: min(90%, var(--max-width));
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 72px 0 35px;
}

main > .section-heading h1 {
    font-size: clamp(2.6rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 18px;
}

main > .section-heading > p:not(.eyebrow) {
    max-width: 680px;
    color: var(--text-light);
}

/* -------------------------
   PORTFOLIO SECTION
------------------------- */

.portfolio.section {
    padding-top: 35px;
    padding-bottom: 100px;
}

.portfolio > .container > .section-heading {
    margin-bottom: 45px;
}

.portfolio > .container > .section-heading h2 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
}

/* -------------------------
   PROJECT LAYOUT
------------------------- */


.project,
.project-reverse {
    display: block;
    width: 100%;
    padding: 75px 0;
    border-top: 1px solid var(--border);
}

.project-info,
.project-reverse .project-info {
    width: min(100%, 720px);
    max-width: 720px;
    margin: 0 0 45px;
}

.project-reverse .project-info,
.project-reverse .project-visual {
    order: initial;
}

.project-info h3 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    margin-bottom: 20px;
}

.project-visual {
    width: 100%;
}

.showcase-item {
    width: 100%;
    margin-bottom: 40px;
}

.showcase-item img,
.showcase-item video {
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* -------------------------
   HOMEPAGE PORTFOLIO PREVIEW
------------------------- */

.portfolio-preview {
    text-align: center;
}

.portfolio-preview .section-heading {
    max-width: 700px;
    margin: 0 auto;
}

.portfolio-preview .section-heading > p:not(.eyebrow) {
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.portfolio-preview .button {
    margin-top: 25px;
}

.portfolio-preview .eyebrow {
    margin-bottom: 15px;
}

/* -------------------------
   BUTTON CONSISTENCY
------------------------- */

.button {
    cursor: pointer;
}

.portfolio-preview .button-primary {
    display: inline-flex;
}

/* -------------------------
   MOBILE NAVIGATION
------------------------- */

@media (max-width: 650px) {

    .header .nav-container {
        min-height: 68px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        width: 100%;
        padding: 18px 5%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background: var(--background);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    }

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

    .nav-links a {
        width: 100%;
        padding: 11px 0;
    }

    main > .section-heading {
        width: min(90%, var(--max-width));
        padding: 55px 0 25px;
    }

    main > .section-heading h1 {
        font-size: 2.5rem;
    }

    .portfolio.section {
        padding-top: 25px;
        padding-bottom: 70px;
    }

    .portfolio > .container > .section-heading {
        margin-bottom: 35px;
    }

    .project,
    .project-reverse {
        padding: 60px 0;
    }

    .project-info,
    .project-reverse .project-info {
        margin-bottom: 30px;
    }

    .portfolio-preview .button {
        width: auto;
    }
}