/* =========================================
   1) RESET & BASE STYLES
   ========================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f4f4f7;
    color: #222;
    line-height: 1.6;
}

/* Headings – serif display font */
h1,
h2,
h3,
.hero-title,
.section-title {
    font-family: "Playfair Display", "Times New Roman", serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #111;
}

h3 {
    font-family: "Playfair Display", serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: .5rem;
}

/* =========================================
   2) LAYOUT
   ========================================= */

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================================
   3) HEADER / NAVIGATION
   ========================================= */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.logo {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* Desktop navigation */
.navbar {
    display: flex;
    gap: 2rem;
}

.navbar a {
    position: relative;
    text-decoration: none;
    color: #333;
    font-size: 0.95rem;
    font-weight: 500;
    padding-bottom: 2px;
    transition: color 0.2s ease;
}

/* Animated underline on nav links */
.navbar a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: #6b5bff;
    transition: width 0.20s ease;
}

.navbar a:hover {
    color: #6b5bff;
}

.navbar a:hover::after {
    width: 100%;
}

/* Mobile navigation toggle button (hidden on desktop) */
.nav-toggle {
    display: none;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0.3rem;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.nav-toggle span + span {
    margin-top: 5px;
}

/* =========================================
   4) HERO SECTION
   ========================================= */

.hero {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 2rem;
    padding: 4rem 2rem;
    width: min(1200px, 90%);
    margin: 0 auto;
}

.hero-title {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-subtitle-main {
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: #6b5bff;
    margin-bottom: 1.5rem;
}

.hero-text {
    max-width: 650px;
    color: #444;
    margin-bottom: 2rem;
}

/* Hero buttons */
.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.25s ease;
}

/* Primary (filled) button */
.primary-btn {
    background: #6b5bff;
    color: white;
}

.primary-btn:hover {
    background: #5746ff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Secondary (outline) button */
.ghost-btn {
    background: transparent;
    color: #6b5bff;
    border: 2px solid #6b5bff;
}

.ghost-btn:hover {
    background: #6b5bff;
    color: white;
}

/* Photo / avatar */
.hero-photo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-avatar {
    width: 230px;
    height: 230px;
    border-radius: 50%;
    object-fit: cover;              /* ensure image fills the circle nicely */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* =========================================
   5) SECTIONS – GENERIC
   ========================================= */

.section-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.section-text {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
}

.skills-section,
.projects-section,
.contact-section,
.services-section,
.pricing-section {
    width: min(1200px, 90%);
    margin: 2rem auto 4rem auto;
}

/* =========================================
   6) SKILLS SECTION
   ========================================= */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.skill-block {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e4e4e4;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.skill-block h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.skill-block ul {
    list-style: none;
    color: #555;
}

.skill-block li {
    margin-bottom: 0.4rem;
}

/* =========================================
   7) PROJECTS SECTION
   ========================================= */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e4e4e4;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.project-card h3 {
    margin-bottom: 0.6rem;
    font-size: 1.2rem;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    background: #ffe08a;
    color: #6b5b00;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
    border: 1px solid #e9c46a;
}

/* =========================================
   8) CONTACT SECTION
   ========================================= */

.contact-section p {
    margin-bottom: 0.8rem;
}

.contact-box {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e4e4e4;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    max-width: 500px;
}

.contact-box a {
    color: #6b5bff;
    text-decoration: none;
}

.contact-box a:hover {
    text-decoration: underline;
}

/* =========================================
   9) FOOTER
   ========================================= */

.footer {
    margin-top: auto;
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    background: #ffffff;
    font-size: 0.9rem;
    color: #444;
}

/* =========================================
   10) RESPONSIVENESS
   ========================================= */

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2.5rem 1rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle-main {
        font-size: 1.1rem;
    }

    .hero-photo {
        margin-top: 1.5rem;
    }

    .hero-avatar {
        width: 180px;
        height: 180px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }

    .hero-buttons .btn {
        width: 80%;
        max-width: 280px;
        text-align: center;
    }

    .section-title {
        font-size: 1.7rem;
    }
}

@media (max-width: 768px) {

    /* Skills & projects grid */
    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-section,
    .projects-section,
    .services-section {
        width: 100%;
        padding: 0 1rem;
    }

    .project-card,
    .skill-block {
        max-width: 420px;
        margin: 0 auto;
    }

    /* Header & mobile navigation */
    .header {
        padding: 0.8rem 1rem;
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .nav-toggle {
        display: block;
    }

    .navbar {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: #ffffff;

        display: flex;
        flex-direction: column;      /* stack links vertically */
        align-items: center;         /* center links horizontally */
        justify-content: flex-start;
        flex-wrap: nowrap;

        padding: 0;
        margin: 0;
        border-bottom: 1px solid #e0e0e0;

        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }

    .navbar a {
        width: 100%;                 /* full-width clickable area */
        padding: 0.75rem 1.2rem;
        text-align: center;
        font-size: 0.95rem;
    }

    body.nav-open .navbar {
        max-height: 100vh;
    }

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

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

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