
:root {
    --green: #4d683a;
    --olive: #3e5530;
    --cream: #f5f2ea;
    --beige: #e8dfc9;
    --white: #ffffff;
    --text: #1f1f1f;
    --muted: #666666;
    --shadow: 0 20px 45px rgba(62, 85, 48, 0.12);
    --border: rgba(62, 85, 48, 0.12);
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    color: var(--text);
    font-family: "Segoe UI", "Helvetica Neue", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(77, 104, 58, 0.14), transparent 30%),
        radial-gradient(circle at top right, rgba(232, 223, 201, 0.8), transparent 25%),
        linear-gradient(180deg, #f7f4ed 0%, #f5f2ea 100%);
    min-height: 100vh;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    width: 30rem;
    height: 30rem;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
    pointer-events: none;
    z-index: -1;
}

body::before {
    top: -10rem;
    left: -8rem;
    background: rgba(77, 104, 58, 0.25);
}

body::after {
    bottom: -12rem;
    right: -10rem;
    background: rgba(232, 223, 201, 0.85);
}

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

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

.skip-link {
    position: absolute;
    left: 1rem;
    top: -3rem;
    z-index: 1001;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: var(--olive);
    color: var(--white);
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 1rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(16px);
    background: rgba(245, 242, 234, 0.88);
    border-bottom: 1px solid rgba(62, 85, 48, 0.1);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem clamp(1rem, 3vw, 2rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.brand strong {
    display: block;
    color: var(--text);
    font-size: 0.98rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand small {
    display: block;
    margin-top: 0.15rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--green), var(--olive));
    box-shadow: 0 12px 24px rgba(62, 85, 48, 0.2);
    flex: 0 0 auto;
}

.brand-logo {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(31,31,31,0.08);
    margin-right: 0.6rem;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    font-size: 1.35rem;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    color: var(--olive);
}

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

/* Mobile menu collapsed */
@media (max-width: 820px) {
    .menu-toggle {
        display: inline-block;
    }

    .nav-list {
        position: absolute;
        top: 72px;
        right: 1rem;
        background: rgba(255,255,255,0.98);
        box-shadow: 0 12px 30px rgba(31,31,31,0.08);
        border-radius: 12px;
        padding: 0.6rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        display: none;
        min-width: 180px;
    }

    .site-header.open .nav-list {
        display: flex;
    }

    .nav-list a {
        width: 100%;
    }
}

.nav-list a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.94rem;
    font-weight: 600;
    transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.nav-list a:hover,
.nav-list a:focus-visible,
.nav-list a.is-active {
    background: rgba(77, 104, 58, 0.1);
    color: var(--olive);
    transform: translateY(-1px);
}

.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem) clamp(2rem, 5vw, 4rem);
    display: grid;
    gap: clamp(1rem, 2vw, 1.4rem);
}

/* Ensure project cards are equal height and buttons sit at bottom */
.project-grid,
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card .button,
.experience-actions .button,
.achievement-actions .button,
.cert-actions .button {
    margin-top: 1rem;
}

.panel {
    position: relative;
    overflow: hidden;
    padding: clamp(1.25rem, 2.5vw, 2rem);
    border-radius: 28px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
}

.panel::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(77, 104, 58, 0.35), transparent);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: clamp(1.25rem, 3vw, 2.5rem);
    align-items: center;
}

.photo-card {
    width: min(100%, 320px);
    padding: 0.75rem;
    border-radius: 26px;
    border: 1px solid rgba(77, 104, 58, 0.12);
    background: linear-gradient(180deg, rgba(77, 104, 58, 0.06), rgba(232, 223, 201, 0.3));
    box-shadow: 0 18px 35px rgba(31, 31, 31, 0.08);
}

.hero-photo {
    width: 100%;
    aspect-ratio: 1 / 1.18;
    border-radius: 20px;
    object-fit: cover;
    object-position: center;
}

.hero-copy h1,
.section-title,
.detail-card h3,
.project-card h3,
.timeline-card h3,
.skill-card h3,
.certificate-card h3,
.contact-card a,
.experience-card h3,
.achievement-card h3 {
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: -0.02em;
}

.hero-copy h1 {
    margin: 0 0 0.4rem;
    font-size: clamp(2.5rem, 4.2vw, 3rem);
    line-height: 1.05;
    color: var(--text);
}

.kicker {
    margin: 0 0 0.9rem;
    color: var(--green);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-role {
    margin: 0 0 0.35rem;
    color: var(--green);
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    font-weight: 700;
}

.hero-subtitle,
.hero-intro,
.panel p,
.panel li,
.card-caption,
.info-row span,
.contact-card span,
.timeline-card p,
.project-card p,
.certificate-card p,
.achievement-card p {
    font-size: 1rem;
    line-height: 1.7;
}

.hero-subtitle {
    margin: 0 0 1rem;
    color: var(--muted);
}

.hero-intro {
    margin: 0;
    max-width: 60ch;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin: 1.25rem 0 1rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.92rem 1.2rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease;
    cursor: pointer;
}

.button.primary {
    color: var(--white);
    background: var(--green);
    box-shadow: 0 12px 24px rgba(77, 104, 58, 0.2);
}

.button.secondary {
    color: var(--olive);
    border-color: rgba(62, 85, 48, 0.16);
    background: rgba(255, 255, 255, 0.78);
}

.button-inline {
    margin-top: 1rem;
}

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

/* Light-green pill specifically for the resume link (distinct from .button.primary) */
#resumeLink {
    background: linear-gradient(180deg, rgba(77,104,58,0.08), rgba(77,104,58,0.04));
    color: var(--olive);
    border: 1px solid rgba(77,104,58,0.16);
    box-shadow: none;
    padding: 0.86rem 1.1rem;
    font-weight: 700;
}

#resumeLink:hover,
#resumeLink:focus-visible {
    background: rgba(77,104,58,0.12);
    color: var(--white);
    box-shadow: 0 10px 22px rgba(77,104,58,0.12);
    transform: translateY(-2px);
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.meta-chip,
.detail-card,
.timeline-card,
.skill-card,
.project-card,
.experience-card,
.achievement-card,
.certificate-card,
.contact-card {
    border-radius: 22px;
    border: 1px solid rgba(62, 85, 48, 0.09);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 12px 25px rgba(31, 31, 31, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.meta-chip {
    padding: 0.85rem 1rem;
    background: rgba(245, 242, 234, 0.88);
}

.meta-chip span,
.card-caption,
.info-row span,
.contact-card span {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.meta-chip strong,
.info-row strong,
.card-strong {
    display: block;
    color: var(--text);
    font-weight: 700;
}

.section-title {
    margin: 0 0 1rem;
    color: var(--olive);
    font-size: clamp(1.75rem, 2.2vw, 2rem);
    line-height: 1.15;
}

.two-col,
.skill-grid,
.project-grid,
.achievement-grid,
.certificate-grid,
.contact-grid,
.timeline-grid {
    display: grid;
    gap: 1rem;
}

.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.skill-grid,
.project-grid,
.certificate-grid,
.contact-grid,
.achievement-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.timeline-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.detail-card,
.timeline-card,
.skill-card,
.project-card,
.experience-card,
.achievement-card,
.certificate-card,
.contact-card {
    padding: 1.25rem;
}

.detail-card h3,
.skill-card h3,
.project-card h3,
.timeline-card h3,
.certificate-card h3,
.experience-card h3,
.achievement-card h3 {
    margin: 0 0 0.55rem;
    color: var(--text);
    font-size: clamp(1.15rem, 1.4vw, 1.3rem);
    line-height: 1.3;
}

.detail-card p,
.project-card p,
.certificate-card p,
.achievement-card p,
.experience-card p,
.timeline-card p {
    margin: 0;
    color: var(--muted);
}

.detail-card p + p,
.timeline-card p + p,
.experience-card p + p {
    margin-top: 0.75rem;
}

.info-card {
    display: grid;
    gap: 0.95rem;
}

.info-row {
    padding-bottom: 0.95rem;
    border-bottom: 1px solid rgba(62, 85, 48, 0.08);
}

.info-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.timeline-card,
.project-card,
.achievement-card,
.certificate-card,
.contact-card,
.experience-card {
    position: relative;
}

.card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.year-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    background: rgba(77, 104, 58, 0.1);
    color: var(--olive);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(77, 104, 58, 0.08);
    color: var(--olive);
    font-size: 0.82rem;
    font-weight: 700;
}

.bullet-list {
    margin: 0.9rem 0 0;
    padding-left: 1.1rem;
    color: var(--muted);
}

.bullet-list li + li {
    margin-top: 0.4rem;
}

.project-card,
.skill-card,
.timeline-card,
.certificate-card,
.contact-card,
.achievement-card,
.experience-card {
    display: flex;
    flex-direction: column;
}

.project-card:hover,
.skill-card:hover,
.timeline-card:hover,
.certificate-card:hover,
.contact-card:hover,
.achievement-card:hover,
.experience-card:hover,
.detail-card:hover,
.meta-chip:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 32px rgba(31, 31, 31, 0.09);
}

.project-card,
.certificate-card,
.contact-card,
.achievement-card,
.experience-card {
    justify-content: space-between;
}

.contact-card a {
    display: inline-flex;
    width: fit-content;
    color: var(--olive);
    font-size: 1.1rem;
}

.site-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
    color: var(--muted);
    text-align: center;
}

.thank-you-note {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 0.9rem;
    padding: 0.8rem 1.15rem;
    border-radius: 999px;
    border: 1px solid rgba(77, 104, 58, 0.22);
    background: rgba(77, 104, 58, 0.08);
    color: var(--olive);
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(77, 104, 58, 0.08);
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@media (max-width: 900px) {
    .nav-inner,
    .hero-grid,
    .two-col {
        grid-template-columns: 1fr;
    }

    .nav-inner {
        display: grid;
    }

    .nav-list {
        justify-content: flex-start;
    }

    .hero-grid {
        display: grid;
    }
}

@media (max-width: 640px) {
    html {
        scroll-padding-top: 140px;
    }

    .nav-inner {
        gap: 0.85rem;
    }

    .nav-list a {
        font-size: 0.82rem;
        padding: 0.58rem 0.8rem;
    }

    .panel {
        border-radius: 22px;
    }

    .photo-card {
        padding: 0.75rem;
    }
}

/* Certificate card interactions */
.certificate-card {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* Focus states for accessibility */
.button:focus,
.nav-list a:focus,
.certificate-card:focus,
.view-post:focus {
    outline: 3px solid rgba(77,104,58,0.18);
    outline-offset: 3px;
}

.experience-actions,
.achievement-actions,
.cert-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 1rem;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
