:root {
    --ink: #16324f;
    --title: #12263a;
    --text: #314155;
    --muted: #5c6b7a;
    --teal: #1f7a6b;
    --teal-dark: #16574c;
    --sand: #f3f1ec;
    --paper: #fffcf7;
    --line: #d8d3c8;
    --shadow: 0 12px 28px rgba(18, 38, 58, 0.08);
    --display: "Fraunces", Georgia, serif;
    --sans: "Source Sans 3", system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--sans);
    color: var(--text);
    background: var(--sand);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-tap-highlight-color: rgba(31, 122, 107, 0.18);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--teal-dark);
}

.site-nav {
    background: rgba(243, 241, 236, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    z-index: 1040;
    padding: 0.7rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--title) !important;
    min-width: 0;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 6px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--display);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.logo-text {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.navbar-toggler {
    border: 1px solid var(--ink);
    color: var(--ink);
    min-width: 44px;
    min-height: 44px;
    flex-shrink: 0;
    background: var(--paper);
    border-radius: 6px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(31, 122, 107, 0.25);
}

.navbar-toggler i {
    font-size: 1.1rem;
    color: var(--ink);
}

.navbar-nav .nav-link {
    color: var(--ink);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.65rem 0.9rem;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
    color: var(--teal);
}

.site-banner {
    padding: 7.75rem 0 3rem;
}

.hero-kicker {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 0.45rem;
}

.hero-title {
    font-family: var(--display);
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    font-weight: 600;
    color: var(--title);
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.55rem;
}

.hero-role {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 1.15rem;
}

#typed-role {
    color: var(--teal-dark);
    font-weight: 600;
    border-bottom: 2px solid rgba(31, 122, 107, 0.35);
}

.typed-cursor {
    color: var(--teal);
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 1.2rem 0 1.35rem;
}

.skill-chips span,
.tag-row span {
    display: inline-block;
    padding: 0.18rem 0.6rem;
    border-radius: 4px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 600;
}

.social {
    font-size: 1.25rem;
}

.social-link {
    color: var(--muted);
    margin-right: 0.35rem;
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 50%;
}

.social-link:hover {
    color: var(--paper);
    background: var(--ink);
    border-color: var(--ink);
}

.banner-photo {
    position: relative;
    max-width: 340px;
    margin: 0 auto;
}

.banner-photo::before {
    content: "";
    position: absolute;
    inset: 18px -18px -18px 18px;
    background: var(--teal);
    border-radius: 4px;
    z-index: 0;
}

.banner-photo img {
    position: relative;
    z-index: 1;
    width: 100%;
    border-radius: 4px;
    object-fit: cover;
    aspect-ratio: 4 / 5;
}

.section-block {
    padding: 1.5rem 0 2.5rem;
}

.section-title {
    font-family: var(--display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 600;
    color: var(--title);
    letter-spacing: -0.02em;
    margin-bottom: 1.75rem;
    text-align: left;
}

.section-title::after {
    content: "";
    display: block;
    width: 3rem;
    height: 3px;
    background: var(--teal);
    margin-top: 0.55rem;
}

.section-title-spaced {
    margin-top: 3rem;
}

.work-accordion {
    max-width: 880px;
}

.work-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-left: 3px solid var(--teal);
    border-radius: 4px;
    margin-bottom: 0.85rem;
    overflow: hidden;
}

.work-card-header {
    margin: 0;
    font-size: 1rem;
}

.work-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.95rem 1.15rem;
    font-family: inherit;
    font-weight: 600;
    color: var(--title);
    min-height: 52px;
}

.work-toggle::after {
    content: "+";
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--teal);
    line-height: 1;
    flex-shrink: 0;
}

.work-toggle:not(.collapsed)::after {
    content: "\2212";
}

.work-toggle i {
    color: var(--teal);
    margin-right: 0.45rem;
}

.work-body {
    padding: 0 1.2rem 1.2rem;
}

.work-meta {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 1fr;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.work-meta span:not(:first-child) {
    color: var(--muted);
    font-weight: 500;
}

.work-body ul {
    padding-left: 1.15rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.cert-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.75rem;
}

.cert-item {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0.9rem 1rem;
    font-weight: 600;
    font-size: 0.92rem;
}

.project-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 1.25rem;
    height: 100%;
}

.project-card h3 {
    font-family: var(--display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--title);
    margin-bottom: 0.45rem;
}

.project-card p {
    color: var(--muted);
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

.contact-list {
    list-style: none;
    padding: 0;
}

.contact-list li {
    margin-bottom: 0.65rem;
}

.contact-list i {
    color: var(--teal);
    width: 1.3rem;
}

.contact-form {
    display: grid;
    gap: 0.75rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0.75rem 0.9rem;
    font-family: inherit;
    font-size: 16px;
    background: var(--paper);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 0;
    border-color: var(--teal);
    box-shadow: 0 0 0 0.2rem rgba(31, 122, 107, 0.18);
}

.btn-send {
    justify-self: start;
    border: 0;
    border-radius: 4px;
    padding: 0.75rem 1.4rem;
    color: var(--paper);
    font-family: inherit;
    font-weight: 600;
    background: var(--ink);
    min-height: 44px;
    cursor: pointer;
}

.btn-send:hover {
    background: var(--teal-dark);
}

.form-status {
    margin: 0;
    font-size: 0.9rem;
    color: var(--teal-dark);
}

.site-footer {
    margin-top: 1rem;
    padding: 1.5rem 0 2rem;
    border-top: 1px solid var(--line);
    text-align: left;
    color: var(--muted);
}

.site-footer p {
    margin: 0;
    font-size: 0.9rem;
}

.scroll-top {
    position: fixed;
    right: 20px;
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 1030;
    display: none;
    border: 0;
    border-radius: 50%;
    background: var(--ink);
    color: var(--paper);
    width: 44px;
    height: 44px;
    cursor: pointer;
}

.scroll-top.is-visible {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--paper);
        border: 1px solid var(--line);
        border-radius: 6px;
        margin-top: 0.5rem;
        padding: 0.4rem 0.6rem 0.7rem;
    }

    .work-meta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .site-banner {
        padding-top: 6.2rem;
    }

    .logo-text {
        font-size: 1rem;
    }

    .hero-role {
        font-size: 1.05rem;
        min-height: 1.6em;
    }

    .banner-photo {
        max-width: 240px;
    }
}
