/* ============================================================
   Anca Irimia — site styles (new look, 2026)
   ============================================================ */

:root {
    --bg: #eef4ec;
    --bg-soft: #e2ece0;
    --card: #ffffff;
    --green-900: #0f3d2a;
    --green-800: #14503a;
    --green-700: #1d6248;
    --green-300: #b9d3bf;
    --green-200: #d3e4d5;
    --green-100: #e6efe5;
    --accent: #d9774a;
    --accent-soft: #e39a73;
    --text: #1d2a24;
    --muted: #4c5c55;
    --line: #d5e0d4;
    --radius: 0.9412rem;
    --shadow: 0 0.3529rem 1.4118rem rgba(20, 60, 40, 0.08);
    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: "Nunito Sans", "Segoe UI", Arial, sans-serif;
    --script: "Lora", Georgia, serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

/* Everything sized in rem scales from here: 106.25% = 1rem base (was 0.9412rem) */
/* Fluid base size: 17px up to laptop widths (~1440px), then grows with the screen:
   about 19px on a 1920px screen and 22px on a 2560px screen (max 24px).
   Almost every size in this file is in rem, so text, spacing and page width scale together. */
html { scroll-behavior: smooth; font-size: clamp(17px, 0.4464vw + 10.57px, 24px); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 1.0588rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--green-800); }

.container {
    width: 100%;
    max-width: 84rem;
    margin: 0 auto;
    padding: 0 1.8824rem;
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(238, 244, 236, 0.9);
    backdrop-filter: blur(0.4706rem);
    -webkit-backdrop-filter: blur(0.4706rem);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4118rem;
    height: 5.0588rem;
}

.logo {
    font-family: var(--script);
    font-style: italic;
    font-weight: 600;
    font-size: 1.85rem;
    color: var(--green-900);
    text-decoration: none;
    position: relative;
    line-height: 1;
    padding-bottom: 0.4706rem;
    white-space: nowrap;
}

.logo::after {
    content: "";
    position: absolute;
    left: 4px;
    right: 18%;
    bottom: 0;
    height: 3px;
    border-radius: 3px;
    background: var(--accent);
}

.nav { display: flex; align-items: center; gap: 2.3529rem; }

.nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.3529rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color .2s, color .2s;
}

.nav a:hover,
.nav a[aria-current="page"] {
    color: var(--green-800);
    border-color: var(--accent);
}

.header-actions { display: flex; align-items: center; gap: 0.7059rem; }

.menu-toggle {
    display: none;
    background: none;
    border: 0;
    width: 2.5882rem;
    height: 2.5882rem;
    padding: 0.5882rem;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 0.2941rem 0;
    background: var(--green-900);
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4706rem;
    padding: 0.9412rem 2.1176rem;
    border-radius: 0.5882rem;
    background: var(--green-900);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    border: 2px solid var(--green-900);
    transition: background .2s, transform .2s;
    cursor: pointer;
}

.btn:hover { background: var(--green-700); border-color: var(--green-700); transform: translateY(-1px); }

.btn svg { width: 1.15em; height: 1.15em; flex: 0 0 auto; }

.btn-sm { padding: 0.6471rem 1.4118rem; font-size: .98rem; }

.btn-outline { background: transparent; color: var(--green-900); }
.btn-outline:hover { background: var(--green-100); color: var(--green-900); }

.link {
    color: var(--green-900);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1.5px;
}

.link:hover { color: var(--accent); }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: 2.3529rem 0 0;
    background: var(--bg);
    isolation: isolate;
}

.hero::after {
    /* soft wave at the bottom */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 9.4118rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 160' preserveAspectRatio='none'%3E%3Cpath d='M0 40 C 240 120, 480 140, 760 90 S 1240 10, 1440 30 L1440 160 L0 160Z' fill='%23dfeadc'/%3E%3C/svg%3E") no-repeat bottom / 100% 100%;
    z-index: -1;
}

.hero .container {
    position: relative;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    align-items: center;
    gap: 1.4118rem;
}

.hero-text { padding-bottom: 4.2353rem; }

.eyebrow {
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: var(--text);
    margin: 0 0 1.1765rem;
}

.eyebrow::after {
    content: "";
    display: block;
    width: 3.2941rem;
    height: 4px;
    border-radius: 4px;
    background: var(--accent);
    margin-top: 1.0588rem;
}

.hero h1 {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(2.5rem, 4.9vw, 4.3rem);
    line-height: 1.02;
    letter-spacing: -0.015em;
    color: var(--green-900);
    margin: 0 0 1.2941rem;
}

.hero h1 .dot { color: var(--accent); }

/* Desktop: always break after "solutions", as in the design. Phones wrap naturally. */
.br-lg { display: none; }
@media (min-width: 921px) { .br-lg { display: inline; } }

.hero .lead {
    font-size: 1.3rem;
    color: var(--muted);
    margin: 0 0 2rem;
    max-width: 34ch;
}

.hero-cta { display: flex; align-items: center; gap: 1.2941rem; flex-wrap: wrap; }

.hero-visual {
    position: relative;
    justify-self: center;
    align-self: end;
    width: min(100%, 33.5294rem);
    aspect-ratio: 1 / 1.02;
}

/* Soft sage network lines behind the portrait (no shape behind the photo) */
.hero-visual .network {
    position: absolute;
    inset: -6% -14% 0 -14%;
    width: 128%;
    height: 100%;
    z-index: 0;
    opacity: .45;
}

.hero-visual .photo-frame {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 82%;
    height: 100%;
    z-index: 2;
}

/* Professionally cut-out portrait (transparent PNG): show it whole, bottom edge on the white bar */
.hero-visual .photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: 50% 100%;
}

/* ---------- Highlights strip ---------- */

.highlights {
    position: relative;
    z-index: 3;
    margin-top: 0;
}

.highlights-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.7647rem 0.9412rem;
}

.highlight {
    display: flex;
    align-items: center;
    gap: 1.0588rem;
    padding: 4px 2.1176rem;
}

.highlight + .highlight { border-left: 1px solid var(--line); }

.highlight svg { flex: 0 0 auto; width: 3.1765rem; height: 3.1765rem; color: var(--green-900); }

.highlight strong { display: block; font-size: 1.12rem; font-weight: 600; color: var(--text); }
.highlight span { color: var(--muted); }

/* ---------- Sections ---------- */

.section { padding: 4.7059rem 0; }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.9412rem;
    margin-bottom: 1.6471rem;
}

.section-title {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(1.9rem, 3.2vw, 2.6rem);
    color: var(--green-900);
    letter-spacing: -0.01em;
    margin: 0;
    line-height: 1.15;
}

/* ---------- Project cards ---------- */

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.6471rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.9412rem 0.9412rem 1.7647rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 0.5882rem rgba(20, 60, 40, .04);
    transition: transform .2s, box-shadow .2s;
}

.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.card-art {
    background: var(--green-100);
    border-radius: 0.7059rem;
    height: 8.5294rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green-900);
    margin-bottom: 1.4118rem;
}

.card-art svg { height: 5.7647rem; width: auto; max-width: 90%; }

.card h3 {
    font-family: var(--serif);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--green-900);
    margin: 0 0.3529rem 0.4706rem;
    line-height: 1.2;
}

.card p { margin: 0 0.3529rem 1.0588rem; font-size: 1rem; color: var(--text); }

.tags { display: flex; flex-wrap: wrap; gap: 0.4706rem; margin: 0 0.3529rem 1.0588rem; padding: 0; list-style: none; }

.tags li {
    background: var(--green-100);
    color: var(--green-900);
    font-size: .85rem;
    padding: 4px 0.7647rem;
    border-radius: 58.7647rem;
}

.card .link { margin: auto 0.3529rem 0; align-self: flex-start; }

/* ---------- Visitor counter ---------- */

.views-band {
    background: var(--green-900);
    color: #e9f2ea;
    border-radius: var(--radius);
    padding: 2.7059rem 3.2941rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2.1176rem;
    overflow: hidden;
    position: relative;
}

.views-band::before {
    content: "";
    position: absolute;
    right: -3.5294rem;
    top: -3.5294rem;
    width: 12.9412rem;
    height: 12.9412rem;
    border-radius: 50%;
    background: rgba(217, 119, 74, .18);
}

.views-number {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(2.8rem, 6vw, 4.2rem);
    line-height: 1;
    color: #fff;
    font-variant-numeric: tabular-nums;
    min-width: 3ch;
}

.views-number small {
    display: block;
    font-family: var(--sans);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--accent-soft);
    margin-top: 0.5882rem;
}

.views-band h2 {
    font-family: var(--serif);
    font-size: 1.6rem;
    margin: 0 0 0.3529rem;
    color: #fff;
}

.views-band p { margin: 0; color: #cfe0d3; max-width: 60ch; }

.views-band .stack { display: flex; flex-wrap: wrap; gap: 0.4706rem; margin-top: 0.8235rem; padding: 0; list-style: none; }

.views-band .stack li {
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 58.7647rem;
    padding: 3px 0.7059rem;
    font-size: .82rem;
    color: #e9f2ea;
}

.views-band .btn { background: #fff; color: var(--green-900); border-color: #fff; position: relative; }
.views-band .btn:hover { background: var(--green-100); }

/* ---------- Inner pages ---------- */

.page-hero { padding: 4.2353rem 0 1.1765rem; }

.page-hero h1 {
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(2.3rem, 4.6vw, 3.4rem);
    color: var(--green-900);
    letter-spacing: -0.015em;
    margin: 0 0 0.7059rem;
    line-height: 1.1;
}

.page-hero h1 .dot { color: var(--accent); }

.page-hero p { font-size: 1.2rem; color: var(--muted); margin: 0; max-width: 60ch; }

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 3.0588rem 3.5294rem;
    box-shadow: 0 2px 0.5882rem rgba(20, 60, 40, .04);
}

.panel + .panel { margin-top: 1.6471rem; }

.prose h2 {
    font-family: var(--serif);
    font-size: 1.7rem;
    color: var(--green-900);
    margin: 0 0 0.8235rem;
    line-height: 1.2;
}

.prose h2:not(:first-child) { margin-top: 2.3529rem; }

.prose h3 {
    font-family: var(--serif);
    font-size: 1.25rem;
    color: var(--green-900);
    margin: 1.6471rem 0 4px;
    line-height: 1.3;
}

.prose .meta { color: var(--muted); font-size: .95rem; margin: 0 0 0.5882rem; }

.prose h4 {
    font-size: .82rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 1.0588rem 0 0.3529rem;
}

.prose p { margin: 0 0 0.9412rem; }

/* Keep lines at a comfortable reading length on wide screens */
.prose p,
.prose li { max-width: 92ch; }

.prose ul { margin: 0 0 1.0588rem; padding-left: 1.2941rem; }
.prose li { margin-bottom: 0.5294rem; }
.prose li::marker { color: var(--accent); }

.prose a:not(.btn) { color: var(--green-800); font-weight: 600; text-underline-offset: 3px; }
.prose a.btn-outline { color: var(--green-900); }

.chip-list { display: flex; flex-wrap: wrap; gap: 0.4706rem; list-style: none; padding: 0 !important; margin: 0.3529rem 0 0.9412rem; }
.chip-list li { background: var(--green-100); color: var(--green-900); padding: 4px 0.7647rem; border-radius: 58.7647rem; font-size: .9rem; margin: 0; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.3529rem; }

/* Project detail blocks */

.project {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 2.1176rem;
    align-items: start;
}

.project.no-diagram { grid-template-columns: 1fr; }

.project .diagram {
    background: var(--green-100);
    border-radius: 0.7059rem;
    padding: 0.8235rem;
}

.project .diagram img { border-radius: 0.4706rem; margin: 0 auto; background: #fff; }

.project .diagram figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 0.4706rem; }

.project-links { display: flex; gap: 1.2941rem; flex-wrap: wrap; margin-top: 0.4706rem; }

/* Contact & certificates */

.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2941rem; }

.contact-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2.1176rem;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 0.3529rem;
    transition: transform .2s, box-shadow .2s;
}

.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.contact-card svg { width: 2.2353rem; height: 2.2353rem; color: var(--green-900); margin-bottom: 0.5882rem; }
.contact-card strong { font-size: 1.15rem; color: var(--green-900); }
.contact-card span { color: var(--muted); word-break: break-word; }

/* Impact numbers */

.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.9412rem;
}

.stat {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5294rem 1.5294rem 1.4118rem;
    border-top: 4px solid var(--accent);
}

.stat strong {
    display: block;
    font-family: var(--serif);
    font-size: 2.3rem;
    font-weight: 700;
    line-height: 1;
    color: var(--green-900);
    margin-bottom: 0.4706rem;
}

.stat span { color: var(--muted); font-size: .95rem; line-height: 1.35; display: block; }

.badge {
    display: inline-block;
    margin-left: 0.3529rem;
    padding: 1px 0.5882rem;
    border-radius: 58.7647rem;
    background: rgba(217, 119, 74, .14);
    color: #a8522a;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .03em;
    vertical-align: 2px;
}

/* Experience timeline */

.timeline { position: relative; padding-left: 2rem; margin-top: 0.4706rem; }

.timeline::before {
    content: "";
    position: absolute;
    left: 0.4118rem;
    top: 0.5882rem;
    bottom: 0.5882rem;
    width: 2px;
    background: var(--green-200);
}

.job { position: relative; padding-bottom: 1.7647rem; }
.job:last-child { padding-bottom: 0; }

.job::before {
    content: "";
    position: absolute;
    left: -2rem;
    top: 0.3529rem;
    width: 0.9412rem;
    height: 0.9412rem;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--green-700);
}

.job:first-child::before { background: var(--accent); border-color: var(--accent); }

.prose .job h3 { margin-top: 0; }

.job-sub { color: var(--muted); margin: 2px 0 0.3529rem !important; font-size: .98rem; }
.job-sub strong { color: var(--green-800); }

/* About page */

.about-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2.3529rem;
    align-items: center;
}

.about-photo {
    width: 14.1176rem;
    height: 14.1176rem;
    border-radius: 50%;
    background: var(--green-300);
    overflow: hidden;
    border: 0.3529rem solid #fff;
    box-shadow: var(--shadow);
}

.about-photo img { width: 100%; height: auto; margin-top: 6%; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2941rem; }

.feature {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2.1176rem;
}

.feature svg { width: 2.3529rem; height: 2.3529rem; color: var(--green-900); margin-bottom: 0.8235rem; }

.feature h3 {
    font-family: var(--serif);
    font-size: 1.35rem;
    color: var(--green-900);
    margin: 0 0 0.3529rem;
}

.feature p { margin: 0; color: var(--muted); }

/* Closing call to action */

.cta-band {
    text-align: center;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 3.7647rem 1.8824rem;
    position: relative;
    overflow: hidden;
}

.cta-band::before,
.cta-band::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: var(--green-100);
    z-index: 0;
}

.cta-band::before { width: 12.9412rem; height: 12.9412rem; left: -4.7059rem; bottom: -6.4706rem; }
.cta-band::after { width: 9.4118rem; height: 9.4118rem; right: -2.9412rem; top: -4.1176rem; background: rgba(217, 119, 74, .12); }

.cta-band > * { position: relative; z-index: 1; }

.cta-band h2 {
    font-family: var(--serif);
    font-size: clamp(1.8rem, 3.4vw, 2.5rem);
    color: var(--green-900);
    margin: 0 0 0.5882rem;
    line-height: 1.15;
}

.cta-band h2 .dot { color: var(--accent); }
.cta-band .eyebrow::after { margin-left: auto; margin-right: auto; }
.cta-band p { color: var(--muted); font-size: 1.12rem; margin: 0 auto 1.5294rem; max-width: 52ch; }
.cta-band .project-links { justify-content: center; gap: 1.2941rem; }

/* ---------- Footer ---------- */

.site-footer { margin-top: 2.3529rem; padding-bottom: 5.2941rem; }

.site-footer .container {
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9412rem;
    padding-top: 1.5294rem;
    padding-bottom: 1.7647rem;
    flex-wrap: wrap;
}

.site-footer p { margin: 0; color: var(--text); font-size: .95rem; }

.footer-links { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }

.footer-links li + li { border-left: 1px solid var(--line); }

.footer-links a {
    display: flex;
    align-items: center;
    gap: 0.5882rem;
    padding: 2px 1.6471rem;
    color: var(--text);
    text-decoration: none;
    font-size: .95rem;
}

.footer-links li:last-child a { padding-right: 0; }
.footer-links a:hover { color: var(--accent); }
.footer-links svg { width: 1.2941rem; height: 1.2941rem; color: var(--green-900); }

.footer-views { color: var(--muted); font-size: .9rem; }
.footer-views a { color: var(--muted); }

/* ---------- Chatbot ---------- */

#chat-container {
    position: fixed;
    bottom: 1.2941rem;
    right: 1.2941rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.7059rem;
    font-family: var(--sans);
}

#chat-box {
    display: none;
    flex-direction: column;
    width: min(21.1765rem, calc(100vw - 1.8824rem));
    background: #fff;
    border-radius: 0.9412rem;
    overflow: hidden;
    box-shadow: 0 0.7059rem 2.3529rem rgba(15, 61, 42, .22);
    border: 1px solid var(--line);
}

#chat-box.open { display: flex; }

#chat-header {
    background: var(--green-900);
    color: #fff;
    padding: 0.8235rem 0.9412rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chat-header button { background: none; border: 0; color: #fff; font-size: 1.3rem; cursor: pointer; line-height: 1; }

#chat-messages {
    display: flex;
    flex-direction: column;
    gap: 0.4706rem;
    max-height: 18.8235rem;
    min-height: 3.5294rem;
    overflow-y: auto;
    padding: 0.8235rem;
    font-size: .92rem;
}

.msg-user,
.msg-bot {
    padding: 0.5294rem 0.7059rem;
    border-radius: 0.7059rem;
    max-width: 85%;
    word-wrap: break-word;
    white-space: normal;
}

.msg-user { background: var(--green-100); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg-bot { background: var(--green-900); color: #fff; align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-bot a { color: #fff !important; text-decoration: underline; }

.chat-btn-link {
    display: inline-block;
    margin-top: 0.4706rem;
    padding: 0.4706rem 0.7059rem;
    background: var(--accent);
    color: #fff !important;
    border-radius: 0.4706rem;
    font-weight: 700;
    font-size: .85rem;
    text-decoration: none !important;
}

.quick-buttons { display: flex; flex-wrap: wrap; gap: 0.3529rem; padding: 0 0.8235rem 0.5882rem; }

.quick-buttons button {
    background: var(--green-100);
    color: var(--green-900);
    border: 0;
    border-radius: 58.7647rem;
    padding: 0.2941rem 0.7059rem;
    font-size: .82rem;
    cursor: pointer;
    font-family: inherit;
}

.quick-buttons button:hover { background: var(--green-200); }

#chat-input { display: flex; gap: 0.3529rem; padding: 0.5882rem 0.8235rem 0.8235rem; align-items: flex-end; border-top: 1px solid var(--line); }

#chat-input textarea {
    flex: 1;
    height: 2.3529rem;
    min-height: 2.3529rem;
    max-height: 11.7647rem;
    padding: 0.5294rem 0.7059rem;
    font: inherit;
    font-size: .92rem;
    border: 1px solid var(--line);
    border-radius: 0.5882rem;
    resize: none;
}

#chat-input textarea:focus { outline: none; border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(29, 98, 72, .12); }

#chat-input button {
    flex: 0 0 auto;
    height: 2.3529rem;
    min-width: 2.5882rem;
    padding: 0 0.7059rem;
    background: var(--green-900);
    color: #fff;
    border: 0;
    border-radius: 0.5882rem;
    cursor: pointer;
    font-weight: 700;
    font-family: inherit;
}

#chat-input button:hover { background: var(--green-700); }
#mic-btn.listening { background: var(--accent) !important; }

#chat-toggle {
    display: flex;
    align-items: center;
    gap: 0.7059rem;
    padding: 0.4118rem 1.1765rem 0.4118rem 0.4118rem;
    background: var(--green-900);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 58.7647rem;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 0.5882rem 1.6471rem rgba(15, 61, 42, .28), 0 2px 0.3529rem rgba(15, 61, 42, .18);
    transition: background .2s, transform .2s, box-shadow .2s, padding .2s;
}

#chat-toggle:hover {
    background: var(--green-800);
    transform: translateY(-2px);
    box-shadow: 0 0.8235rem 1.8824rem rgba(15, 61, 42, .32), 0 2px 0.3529rem rgba(15, 61, 42, .18);
}

#chat-toggle:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 3px; }

.chat-toggle-icon {
    position: relative;
    flex: 0 0 auto;
    width: 2.5882rem;
    height: 2.5882rem;
    border-radius: 50%;
    background: #fff;
    color: var(--green-900);
    display: grid;
    place-items: center;
}

.chat-toggle-icon svg { width: 1.2941rem; height: 1.2941rem; grid-area: 1 / 1; transition: opacity .2s, transform .2s; }
.chat-toggle-icon .icon-close { opacity: 0; transform: rotate(-90deg) scale(.6); }

.chat-toggle-text { display: flex; flex-direction: column; line-height: 1.2; }
.chat-toggle-text strong { font-size: .98rem; font-weight: 700; letter-spacing: .01em; }

.chat-toggle-text small {
    display: flex;
    align-items: center;
    gap: 0.3529rem;
    margin-top: 3px;
    font-size: .78rem;
    color: #b9d3bf;
}

.status-dot {
    width: 0.4118rem;
    height: 0.4118rem;
    border-radius: 50%;
    background: #6fdc9a;
    box-shadow: 0 0 0 3px rgba(111, 220, 154, .2);
}

/* When the chat is open the button becomes a round close button */
#chat-container.is-open #chat-toggle { padding: 0.4118rem; }
#chat-container.is-open .chat-toggle-text { display: none; }
#chat-container.is-open .icon-chat { opacity: 0; transform: rotate(90deg) scale(.6); }
#chat-container.is-open .icon-close { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
    .nav { gap: 1.5294rem; }
    .highlight { padding: 4px 1.1765rem; }
}

@media (max-width: 920px) {
    .menu-toggle { display: block; }
    .header-actions .btn { display: none; }

    .nav {
        position: absolute;
        top: 5.0588rem;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        padding: 0.4706rem 1.4118rem 1.1765rem;
        display: none;
    }

    .nav.open { display: flex; }
    .nav a { padding: 0.7059rem 0; border-bottom: 1px solid var(--line); }
    .nav a[aria-current="page"] { border-color: var(--line); color: var(--accent); }

    .menu-open .menu-toggle span:nth-child(1) { transform: translateY(0.4118rem) rotate(45deg); }
    .menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
    .menu-open .menu-toggle span:nth-child(3) { transform: translateY(-0.4118rem) rotate(-45deg); }

    .hero { padding: 0.9412rem 0 4.7059rem; }
    .hero .container { grid-template-columns: 1fr; }
    .hero-visual { width: min(80%, 23.5294rem); order: -1; }

    .highlights-card { grid-template-columns: 1fr; padding: 0.4706rem 4px; }
    .highlight { padding: 0.9412rem 1.1765rem; }
    .highlight + .highlight { border-left: 0; border-top: 1px solid var(--line); }

    .cards { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .project { grid-template-columns: 1fr; }
    .two-col { grid-template-columns: 1fr; }

    .views-band { grid-template-columns: 1fr; gap: 1.0588rem; padding: 1.7647rem 1.5294rem; }

    .feature-grid { grid-template-columns: 1fr; }
    .about-hero { grid-template-columns: 1fr; gap: 1.4118rem; }
    .about-photo { width: 9.4118rem; height: 9.4118rem; order: -1; }
}

@media (min-width: 621px) and (max-width: 920px) {
    .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
    body { font-size: 1rem; }
    .container { padding: 0 1.0588rem; }
    .site-header .container { height: 4.2353rem; }
    .nav { top: 4.2353rem; }
    .btn { padding: 0.8824rem 1.6471rem; }
    .card-art { height: 7.6471rem; }
    .logo { font-size: 1.55rem; }
    .eyebrow { font-size: .78rem; letter-spacing: .2em; }
    .hero .lead { font-size: 1.12rem; }
    .panel { padding: 1.7647rem 1.2941rem; }
    .section { padding: 3.2941rem 0; }
    .feature, .contact-card { padding: 1.6471rem; }
    .section-head { flex-direction: column; gap: 0.3529rem; }
    .site-footer .container { flex-direction: column; align-items: flex-start; }
    .footer-links a { padding: 2px 0.8235rem; }
    .footer-links li:first-child a { padding-left: 0; }
    #chat-toggle { padding: 0.3529rem 0.9412rem 0.3529rem 0.3529rem; gap: 0.5882rem; }
    .chat-toggle-text small { display: none; }
    .chat-toggle-text strong { font-size: .92rem; }
    #chat-container { right: 0.9412rem; bottom: 0.9412rem; }
    .impact-grid { grid-template-columns: 1fr 1fr; gap: 0.7059rem; }
    .stat { padding: 1.0588rem 0.9412rem 0.9412rem; }
    .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .stat strong { font-size: 1.9rem; }
    .timeline { padding-left: 1.5294rem; }
    .job::before { left: -1.5294rem; width: 0.8235rem; height: 0.8235rem; }
    .timeline::before { left: 0.3529rem; }
}
