/* Global site styles */
:root {
    --bg: #f6f8fb;
    --surface: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --primary: #2563eb;
    --border: #e5e7eb;
    --shadow: 0 18px 60px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}

body {
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
}

header {
    background: #0f172a;
    color: white;
    box-shadow: #0f172a 0px 1px 3px 0px, #0f172a 0px 1px 2px 0px;
}

.site-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 20px;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-top: 14px;
}

nav a {
    color: white;
    font-weight: 600;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 64px 0 48px;
    text-align: center;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(2.2rem, 3vw, 3.5rem);
    line-height: 1.05;
}

.page-hero p {
    margin: 18px auto 0;
    max-width: 640px;
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.8;
}

.carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.carousel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    z-index: 1;
}

.carousel img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    animation: fade 27s infinite;
    z-index: 0;
}

.carousel img:nth-child(1) {
    animation-delay: 0s;
}

.carousel img:nth-child(2) {
    animation-delay: 3s;
}

.carousel img:nth-child(3) {
    animation-delay: 6s;
}

.carousel img:nth-child(4) {
    animation-delay: 9s;
}

.carousel img:nth-child(5) {
    animation-delay: 12s;
}

.carousel img:nth-child(6) {
    animation-delay: 15s;
}

.carousel img:nth-child(7) {
    animation-delay: 18s;
}

.carousel img:nth-child(8) {
    animation-delay: 21s;
}

.carousel img:nth-child(9) {
    animation-delay: 24s;
}

@keyframes fade {
    0% {
        opacity: 0;
    }

    3.7% {
        opacity: 1;
    }

    11.11% {
        opacity: 1;
    }

    14.81% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

.main-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 36px;
    margin: 0 auto 48px;
    max-width: 960px;
}

.section-title {
    margin-top: 0;
    font-size: 1.75rem;
}

.integration-intro {
    margin-bottom: 24px;
    color: #475569;
    line-height: 1.75;
}

.flow-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 6px;
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
    counter-reset: flow;
}

.flow-strip li {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.flow-strip li::before {
    counter-increment: flow;
    content: counter(flow, decimal-leading-zero);
    color: #0f766e;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
}

.flow-strip li:not(:last-child)::after {
    content: '\2192';
    margin-left: 4px;
    color: #94a3b8;
    font-weight: 400;
}

.category-flow {
    margin: 8px 0 0 !important;
    color: #0f766e !important;
    font-size: 0.85rem !important;
    font-weight: 600;
}

.integration-grid {
    display: block;
    margin: 24px 0 0;
    padding: 0;
    background: #fff;
    color: #0f172a;
    overflow: visible;
}

.integration-categories {
    display: grid;
    gap: 24px;
    width: 100%;
}

.integration-category {
    border-top: 1px solid #cbd5e1;
    padding-top: 22px;
}

.category-heading {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.category-kicker {
    color: #0f766e;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding-top: 4px;
}

.category-heading h3 {
    margin: 0 0 4px;
    font-size: 1.15rem;
}

.category-heading p {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.6;
}

.integration-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.integration-item {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 13px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #0f172a;
}

.integration-item img {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    object-fit: contain;
}

.integration-item span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.integration-item strong,
.integration-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.integration-item strong {
    font-size: 0.94rem;
}

.integration-item small {
    color: #64748b;
    font-size: 0.78rem;
}

@media (max-width: 620px) {
    .integration-list {
        grid-template-columns: 1fr;
    }
}

.integration-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px 20px;
    text-align: center;
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.integration-card img {
    max-height: 62px;
    max-width: 100%;
    object-fit: contain;
    margin: 0 auto;
}

.integration-card p {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
}

/* Clickable stack card in the acquisition stage.
   Class selectors here deliberately outrank the global `button` rule below. */
.integration-item-button {
    width: 100%;
    align-self: stretch;
    font: inherit;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
    border-color: #cbd5e1;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.integration-item-button:hover {
    background: #eff6ff;
    border-color: var(--primary);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.14);
    transform: none;
}

/* Two classes, so this outranks the `.integration-item span` grid rule above. */
.integration-item .more-details {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    margin-left: auto;
    padding-left: 10px;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.more-details-arrow {
    font-size: 1.15rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.integration-item-button:hover .more-details {
    text-decoration: underline;
}

.integration-item-button:hover .more-details-arrow {
    transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
    .more-details-arrow {
        transition: none;
    }
}

.integration-item-button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.stack-modal {
    width: min(900px, calc(100vw - 32px));
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
}

/* Three across inside the modal. These selectors outrank the plain .integration-list
   breakpoints below, so the narrow-screen fallbacks have to be repeated at this weight. */
.stack-modal .integration-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 860px) {
    .stack-modal .integration-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .stack-modal .integration-list {
        grid-template-columns: 1fr;
    }
}

.stack-modal::backdrop {
    background: rgba(15, 23, 42, 0.6);
}

.stack-modal-inner {
    padding: 28px;
}

.stack-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.stack-modal-head h3 {
    margin: 0;
    font-size: 1.25rem;
}

.stack-modal-close {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 1.6rem;
    line-height: 1;
}

.stack-modal-close:hover {
    background: #f1f5f9;
    color: var(--text);
    transform: none;
}

.stack-modal-intro {
    margin: 10px 0 18px;
    color: #475569;
    line-height: 1.7;
}

.stack-group {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.stack-group-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.stack-group-head img {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    object-fit: contain;
}

.stack-group-head h4 {
    margin: 0;
    font-size: 1rem;
}

.resume-panel {
    padding: 32px;
}

.resume-top {
    display: grid;
    gap: 32px;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
}

.resume-summary {
    margin-top: 0;
    color: #475569;
    line-height: 1.75;
    max-width: 700px;
}

.resume-sidebar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
}

.resume-sidebar h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #0f172a;
}

.resume-sidebar p {
    margin: 0 0 12px;
    line-height: 1.75;
}

.resume-skill-list {
    list-style: disc inside;
    margin: 0;
    padding: 0;
    color: #334155;
}

.resume-skill-list li {
    margin-bottom: 10px;
}

.resume-entry {
    border-top: 1px solid #e2e8f0;
    padding: 28px 0;
}

.resume-entry:first-child {
    border-top: 0;
    padding-top: 0;
}

.resume-entry-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.resume-entry-header h4 {
    margin: 0;
    font-size: 1.05rem;
}

.resume-entry-header span {
    color: #475569;
}

.resume-entry-body p {
    margin: 14px 0;
    line-height: 1.75;
    color: #334155;
}

@media (max-width: 900px) {
    .resume-top {
        grid-template-columns: 1fr;
    }
}

.contact-intro {
    margin: 0 0 28px;
    color: #475569;
    line-height: 1.75;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    align-items: start;
}

.contact-details {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
}

.contact-details h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.contact-details p {
    margin: 0 0 18px;
    line-height: 1.7;
}

.contact-details strong {
    display: block;
    margin-bottom: 2px;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact-details a {
    word-break: break-word;
}

.contact-note {
    margin-bottom: 0;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    color: #64748b;
    font-size: 0.9rem;
}

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

.placeholder {
    min-height: 240px;
    display: grid;
    place-items: center;
    border: 2px dashed var(--border);
    border-radius: 18px;
    color: var(--muted);
    background: #f8fafc;
    text-align: center;
    padding: 40px 24px;
}

footer {
    text-align: center;
    padding: 28px 20px;
    color: var(--muted);
    font-size: 0.95rem;
}

form {
    display: grid;
    gap: 20px;
    width: 100%;
    max-width: 760px;
}

form div {
    display: grid;
    gap: 10px;
}

label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
}

input,
textarea {
    width: 100%;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    outline: none;
}

button {
    align-self: start;
    padding: 14px 24px;
    border: none;
    border-radius: 14px;
    background: var(--primary);
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

@media (max-width: 650px) {
    nav {
        justify-content: center;
    }
}