:root {
    --primary: #69AA7D;
    --primary-dark: #3F7653;
    --primary-light: #A8D5B5;
    --bg: #F7F6F0;
    --text: #17221B;
    --white: #FFFFFF;
    --muted: #5B6A60;
    --line: #E3E2D8;
    --radius: 20px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
}

body {
    font-family: 'Alexandria', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

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

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

.container {
    width: min(1120px, 100% - 40px);
    margin-inline: auto;
}

section {
    padding: 96px 0;
}

/* ---------- Section headings ---------- */
.eyebrow {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-dark);
    background: var(--primary-light);
    padding: 4px 14px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.section-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    line-height: 1.3;
}

.section-sub {
    color: var(--muted);
    margin-top: 8px;
    max-width: 560px;
}

.section-head {
    margin-bottom: 48px;
}

/* ---------- Navbar ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(247, 246, 240, .9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo {
    font-weight: 800;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary);
    color: var(--white);
    display: grid;
    place-items: center;
    font-size: 15px;
    font-weight: 800;
}

.nav-links {
    display: flex;
    gap: 6px;
    list-style: none;
}

.nav-links a {
    display: block;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    color: var(--muted);
    transition: .2s;
}

.nav-links a:hover {
    background: var(--primary-light);
    color: var(--text);
}

.nav-cta {
    background: var(--text);
    color: var(--white);
    padding: 10px 22px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    transition: .2s;
}

.nav-cta:hover {
    background: var(--primary-dark);
}

.menu-btn {
    display: none;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px;
}

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

/* ---------- Hero ---------- */
.hero {
    padding: 72px 0 96px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 64px;
    align-items: center;
}

.hello {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 6px;
}

.hero h1 {
    font-size: clamp(40px, 6vw, 68px);
    font-weight: 800;
    line-height: 1.2;
}

.hero h1 em {
    font-style: normal;
    color: var(--primary);
}

.role {
    margin-top: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
    direction: ltr;
    text-align: right;
    font-family: 'Alexandria', sans-serif;
}

.hero p.lead {
    margin-top: 20px;
    color: var(--muted);
    font-size: 18px;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 16px;
    font-family: inherit;
    border: 2px solid transparent;
    cursor: pointer;
    transition: .2s;
}

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

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

.btn-ghost {
    border-color: var(--text);
    color: var(--text);
}

.btn-ghost:hover {
    background: var(--text);
    color: var(--white);
}

.tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 36px;
}

.tag-chip {
    font-size: 14px;
    font-weight: 500;
    padding: 6px 14px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 999px;
    direction: ltr;
}

/* Photo frame — replace images/me.jpg with your photo */
.photo-wrap {
    position: relative;
    width: min(380px, 100%);
    margin-inline: auto;
}

.photo-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    transform: translate(-18px, 18px);
    background: var(--primary-light);
    border-radius: 36px;
    z-index: 0;
}

.photo-frame {
    position: relative;
    z-index: 1;
    aspect-ratio: 4 / 5;
    border-radius: 36px;
    overflow: hidden;
    background: var(--white);
    border: 2px solid var(--text);
    display: grid;
    place-items: center;
}

.photo-frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    text-align: center;
    color: var(--muted);
    padding: 24px;
}

.photo-placeholder svg {
    width: 72px;
    height: 72px;
    margin: 0 auto 12px;
    color: var(--primary);
}

.photo-placeholder b {
    display: block;
    color: var(--text);
    font-weight: 700;
}

.photo-placeholder small {
    font-size: 13px;
}

.photo-badge {
    position: absolute;
    z-index: 2;
    bottom: 24px;
    right: -16px;
    background: var(--text);
    color: var(--white);
    padding: 10px 18px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 14px;
    direction: ltr;
}

.photo-badge i {
    color: var(--primary);
    font-style: normal;
}

/* ---------- About ---------- */
#about {
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 64px;
    align-items: start;
}

.about-text p {
    color: var(--muted);
    font-size: 17px;
    margin-bottom: 16px;
}

.about-text p strong {
    color: var(--text);
}

.quote {
    margin-top: 24px;
    padding: 20px 24px;
    background: var(--bg);
    border-right: 4px solid var(--primary);
    border-radius: 12px;
    font-weight: 500;
}

.highlights {
    display: grid;
    gap: 16px;
}

.highlight {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
}

.highlight .ic {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary);
    color: var(--white);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 14px;
    direction: ltr;
}

.highlight h3 {
    font-size: 17px;
    font-weight: 700;
}

.highlight p {
    color: var(--muted);
    font-size: 15px;
}

/* ---------- Skills ---------- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 48px;
}

.skill-top {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin-bottom: 8px;
}

.skill-top span:first-child {
    direction: ltr;
}

.skill-top span:last-child {
    color: var(--primary-dark);
    font-size: 14px;
}

.bar {
    height: 10px;
    background: var(--line);
    border-radius: 999px;
    overflow: hidden;
}

.bar i {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(270deg, var(--primary), var(--primary-dark));
    border-radius: 999px;
    transition: width 1.1s cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Services ---------- */
#services {
    background: var(--white);
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    padding: 28px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--line);
    transition: .25s;
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 12px 30px -16px rgba(63, 118, 83, .5);
}

.card .num {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary-dark);
    background: var(--primary-light);
    display: inline-block;
    padding: 2px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
    direction: ltr;
}

.card h3 {
    font-size: 19px;
    font-weight: 700;
    direction: ltr;
    text-align: right;
}

.card p {
    color: var(--muted);
    font-size: 15px;
    margin-top: 8px;
}

/* ---------- Projects ---------- */
.projects {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.project {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    transition: .25s;
}

.project:hover {
    border-color: var(--text);
}

.project .mock {
    height: 160px;
    border-radius: 16px;
    margin-bottom: 24px;
    background: var(--text);
    color: var(--primary-light);
    display: grid;
    place-items: center;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 15px;
    direction: ltr;
}

.project .mock.alt {
    background: var(--primary-dark);
    color: var(--white);
}

.project h3 {
    font-size: 22px;
    font-weight: 800;
    direction: ltr;
    text-align: right;
}

.project p {
    color: var(--muted);
    margin-top: 8px;
    flex: 1;
}

.project .tags {
    margin-top: 20px;
}

.project .link {
    margin-top: 24px;
    font-weight: 700;
    color: var(--primary-dark);
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.project .link:hover {
    color: var(--text);
}

/* ---------- Contact ---------- */
#contact {
    background: var(--text);
    color: var(--white);
}

#contact .eyebrow {
    background: var(--primary);
    color: var(--white);
}

#contact .section-sub {
    color: #B8C4BC;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: stretch;
}

.contact-main {
    background: var(--primary);
    color: var(--text);
    border-radius: 28px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
}

.contact-main h3 {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.4;
}

.contact-main p {
    margin-top: 8px;
    font-weight: 500;
}

.btn-dark {
    background: var(--text);
    color: var(--white);
    align-self: flex-start;
}

.btn-dark:hover {
    background: var(--white);
    color: var(--text);
}

.contact-list {
    display: grid;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .14);
    transition: .2s;
}

.contact-item:hover {
    background: rgba(255, 255, 255, .07);
    border-color: var(--primary);
}

.contact-item .ic {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(105, 170, 125, .2);
    color: var(--primary-light);
    display: grid;
    place-items: center;
}

.contact-item .ic svg {
    width: 22px;
    height: 22px;
}

.contact-item b {
    display: block;
    font-weight: 700;
}

.contact-item small {
    color: #B8C4BC;
    direction: ltr;
    display: block;
    text-align: right;
    word-break: break-all;
}

/* ---------- Footer ---------- */
footer {
    background: var(--text);
    color: #B8C4BC;
    padding: 24px 0 32px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: 14px;
}

.foot {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

/* ---------- Reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: .7s ease;
}

.reveal.in {
    opacity: 1;
    transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    section {
        padding: 72px 0;
    }

    .hero-grid,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .photo-wrap {
        order: -1;
        width: min(280px, 80%);
    }

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

    .projects,
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        position: absolute;
        top: 68px;
        right: 0;
        left: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 12px 20px 20px;
        border-bottom: 1px solid var(--line);
        display: none;
    }

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

    .menu-btn {
        display: block;
    }

    .nav-cta {
        display: none;
    }
}

@media (max-width: 560px) {
    .cards {
        grid-template-columns: 1fr;
    }

    .contact-main {
        padding: 28px;
    }

    .photo-badge {
        right: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}