@import url("https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700;900&display=swap");

:root {
    --font-main: "Merriweather", Georgia, "Times New Roman", serif;
    --black: #050505;
    --ink: #151515;
    --muted: #6b6f76;
    --line: #dedede;
    --soft: #f5f5f2;
    --white: #ffffff;
    --green: #24d18f;
    --blue: #3fa7ff;
    --orange: #ff6b4a;
    --yellow: #f7c948;
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-family: var(--font-main);
    line-height: 1.5;
}

body.has-image-modal {
    overflow: hidden;
}

body.has-blog-modal {
    overflow: hidden;
}

button,
input,
textarea,
select {
    font-family: var(--font-main);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto minmax(190px, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding: 16px clamp(20px, 4vw, 56px);
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.brand {
    display: flex;
    align-items: center;
    min-width: 0;
}

.brand img {
    width: 52px;
    height: 58px;
    object-fit: contain;
}

.brand-badge {
    justify-self: end;
    max-width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: var(--black);
    background: transparent;
    box-shadow: none;
    font-size: clamp(0.98rem, 1.4vw, 1.08rem);
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
    text-transform: lowercase;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 6px;
    color: #343434;
    font-size: 0.94rem;
}

.main-nav a {
    padding: 9px 12px;
    border-radius: var(--radius);
}

.main-nav a:hover,
.main-nav .nav-admin {
    background: var(--black);
    color: var(--white);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
    min-height: clamp(620px, 82vh, 760px);
    background: var(--soft);
    border-bottom: 1px solid var(--line);
}

.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(44px, 6vw, 86px) clamp(24px, 6vw, 76px);
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

#top {
    scroll-margin-top: 96px;
}

h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(2.25rem, 4.6vw, 4.35rem);
    line-height: 1;
    letter-spacing: 0;
}

.hero-copy > p:not(.eyebrow) {
    max-width: 680px;
    margin: 28px 0 0;
    color: #3b3b3b;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border: 1px solid var(--black);
    border-radius: var(--radius);
    font-weight: 800;
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.button-dark {
    color: var(--white);
    background: var(--black);
}

.button-dark:hover,
.button-dark:focus-visible {
    background: #222222;
    border-color: #222222;
    box-shadow: 0 10px 24px rgba(5, 5, 5, 0.18);
    transform: translateY(-1px);
}

.button-light {
    color: var(--black);
    background: var(--white);
}

.button-danger {
    color: var(--white);
    background: #b42318;
}

.hero-mark {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 480px;
    overflow: hidden;
    isolation: isolate;
    background: var(--black);
}

.hero-mark::before,
.hero-mark::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-mark::before {
    z-index: 0;
    background:
        repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 72px),
        repeating-linear-gradient(0deg, rgba(255,255,255,0.07) 0 1px, transparent 1px 72px);
    mask-image: linear-gradient(90deg, transparent 0, #000 18%, #000 82%, transparent 100%);
}

.hero-mark::after {
    z-index: 1;
    inset: 11%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius);
    transform: skewY(-6deg);
    transform-origin: center;
}

.hero-mark img {
    position: relative;
    z-index: 3;
    width: min(46%, 280px);
    padding: clamp(18px, 3vw, 30px);
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: var(--radius);
    background: rgba(5, 5, 5, 0.86);
    box-shadow: 28px 28px 0 rgba(255, 255, 255, 0.08), -22px -22px 0 rgba(255, 255, 255, 0.05);
    filter: drop-shadow(0 28px 46px rgba(0, 0, 0, 0.45));
}

.signal {
    position: absolute;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 0;
    opacity: 0.95;
}

.signal-green {
    top: 18%;
    left: 15%;
    width: 32%;
    height: 10px;
    background: var(--green);
}

.signal-blue {
    right: 17%;
    bottom: 17%;
    width: 11px;
    height: 34%;
    background: var(--blue);
}

.signal-orange {
    right: 19%;
    top: 21%;
    width: 76px;
    height: 76px;
    background: var(--orange);
}

.section {
    scroll-margin-top: 72px;
    padding: clamp(56px, 9vw, 112px) clamp(24px, 6vw, 76px);
}

.split-section {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(280px, 1.2fr);
    gap: clamp(28px, 6vw, 80px);
    border-bottom: 1px solid var(--line);
}

.section h2,
.contact-section h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1;
    letter-spacing: 0;
}

.section-text p,
.contact-copy p {
    margin: 0;
    color: #363636;
    font-size: 1.12rem;
}

.capability-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 30px;
}

.capability-grid span {
    padding: 14px 16px;
    border-left: 4px solid var(--black);
    background: var(--soft);
    font-weight: 800;
}

.founder-section {
    display: grid;
    grid-template-columns: minmax(160px, 0.42fr) minmax(280px, 1.58fr);
    align-items: center;
    gap: clamp(28px, 6vw, 76px);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--soft);
}

.founder-media {
    overflow: hidden;
    width: min(100%, 260px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    aspect-ratio: 4 / 5;
    background: var(--white);
}

.founder-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.founder-copy {
    max-width: 760px;
}

.founder-copy p:not(.eyebrow) {
    margin: 24px 0 0;
    color: #363636;
    font-size: 1.08rem;
}

.founder-copy a {
    display: inline-flex;
    margin-top: 28px;
    font-weight: 900;
    border-bottom: 2px solid var(--black);
}

.founder-blog {
    grid-column: 1 / -1;
    display: grid;
    gap: 22px;
    padding-top: 34px;
    border-top: 1px solid var(--line);
}

.founder-blog-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.founder-blog-heading .eyebrow {
    margin-bottom: 0;
}

.founder-blog-actions {
    display: flex;
    justify-content: flex-end;
}

.founder-blog-actions a,
.blog-card a,
.blog-back-link {
    font-weight: 900;
    border-bottom: 2px solid var(--black);
}

.blog-timeline {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 16px;
    overflow-x: auto;
    padding-top: 62px;
}

.blog-timeline::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--black);
}

.blog-timeline-card {
    position: relative;
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 14px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

.blog-timeline-card::before {
    content: "";
    position: absolute;
    z-index: 2;
    top: -59px;
    left: 24px;
    width: 12px;
    height: 12px;
    border: 3px solid var(--black);
    border-radius: 50%;
    background: var(--green);
}

.blog-timeline-date {
    position: absolute;
    top: -36px;
    left: 12px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 18px rgba(5, 5, 5, 0.08);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
}

.blog-timeline-thumb {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 1 / 1;
    background: var(--black);
}

.blog-timeline-thumb img,
.blog-card-thumb img,
.blog-post-media img,
.blog-post-media video,
.blog-post-media iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-video-badge {
    position: absolute;
    z-index: 2;
    left: 8px;
    top: 8px;
    padding: 4px 7px;
    border-radius: var(--radius);
    color: var(--black);
    background: var(--green);
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.blog-video-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(36, 209, 143, 0.92), rgba(63, 167, 255, 0.9)),
        var(--black);
}

.blog-video-placeholder span {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    clip-path: polygon(38% 28%, 38% 72%, 72% 50%);
}

.blog-timeline-copy {
    display: grid;
    align-content: center;
    gap: 7px;
}

.blog-full-copy time,
.blog-comment time,
.blog-card time {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.blog-timeline-copy strong {
    font-size: 1.05rem;
    line-height: 1.18;
}

.blog-modal[hidden] {
    display: none;
}

.blog-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: clamp(16px, 4vw, 44px);
}

.blog-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 5, 0.72);
    backdrop-filter: blur(8px);
}

.blog-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 980px);
    max-height: 88vh;
    overflow: auto;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

.blog-modal-close {
    position: sticky;
    z-index: 2;
    top: 12px;
    left: calc(100% - 52px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

.blog-modal-content {
    padding: 0 clamp(18px, 4vw, 42px) clamp(24px, 5vw, 46px);
}

.blog-page-hero {
    padding: clamp(54px, 8vw, 94px) clamp(24px, 6vw, 76px);
    border-bottom: 1px solid var(--line);
    background: var(--soft);
}

.blog-page-hero h1 {
    margin: 0;
}

.blog-page-hero p {
    max-width: 680px;
    margin: 22px 0 0;
    color: #363636;
    font-size: 1.1rem;
}

.blog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: clamp(28px, 5vw, 64px);
    padding: clamp(44px, 7vw, 78px) clamp(24px, 6vw, 76px);
}

.blog-list {
    display: grid;
    gap: 18px;
}

.blog-card {
    display: grid;
    grid-template-columns: minmax(180px, 0.42fr) minmax(0, 0.58fr);
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.blog-card-media,
.blog-post-media {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--black);
    aspect-ratio: 16 / 10;
}

.blog-card-thumb {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.blog-post-media iframe {
    border: 0;
}

.blog-card h2 {
    margin: 8px 0 10px;
    font-size: clamp(1.45rem, 2.6vw, 2.15rem);
    line-height: 1.08;
}

.blog-card p {
    margin: 0 0 16px;
    color: #454545;
}

.blog-full-post {
    display: grid;
    gap: 24px;
}

.blog-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: 8px 0 22px;
}

.blog-full-copy h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.8rem);
}

.blog-share-button {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--black);
    background: var(--white);
    cursor: pointer;
    transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.blog-share-button:hover,
.blog-share-button:focus-visible {
    border-color: var(--black);
    background: var(--soft);
    transform: translateY(-1px);
}

.blog-share-button img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    opacity: 0.9;
    mix-blend-mode: multiply;
}

.blog-share-status {
    width: fit-content;
    margin: -12px 0 18px;
    padding: 5px 8px;
    border-radius: var(--radius);
    color: #073c2a;
    background: #d8f7e7;
    font-size: 0.78rem;
    font-weight: 900;
}

.blog-share-status[hidden] {
    display: none;
}

.blog-full-copy p {
    margin: 0 0 18px;
    color: #333333;
    font-size: 1.08rem;
}

.blog-comments {
    display: grid;
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.blog-comments h2 {
    margin: 0;
    font-size: 1.35rem;
}

.blog-comment-list {
    display: grid;
    gap: 10px;
}

.blog-comment {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--soft);
}

.blog-comment strong,
.blog-comment-email,
.blog-comment time {
    display: block;
}

.blog-comment-email {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.78rem;
    font-style: italic;
    line-height: 1.25;
}

.blog-comment-email + time {
    margin-top: 4px;
}

.blog-comment-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.blog-comment-header form {
    margin: 0;
}

.blog-comment-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #d32626;
    border-radius: 50%;
    color: #d32626;
    background: #fff5f5;
    font-size: 1.1rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.blog-comment-delete:hover,
.blog-comment-delete:focus-visible {
    color: var(--white);
    background: #d32626;
}

.blog-comment p,
.blog-empty-comments {
    margin: 8px 0 0;
}

.blog-comment-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.blog-sidebar {
    align-self: start;
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--soft);
}

.blog-sidebar h2 {
    margin: 0 0 4px;
    font-size: 1.2rem;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 36px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.project-card {
    display: flex;
    flex-direction: column;
    min-height: 310px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    transition: border-color 180ms ease;
}

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

.project-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.project-topline i {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--accent);
}

.project-card h3 {
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.05;
}

.project-category {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.project-category span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 5px;
    color: var(--white);
    background: dimgrey;
    font-size: 0.67rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.project-card p {
    margin-top: 14px;
    color: #454545;
}

.project-card a,
.project-card-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto -22px -22px;
    padding: 10px 18px;
    color: var(--white);
    background: var(--accent);
    font-weight: 800;
    border-bottom: 0;
}

.project-card-footer {
    width: calc(100% + 44px);
    border: 0;
    font: inherit;
    cursor: pointer;
}

.project-media {
    position: relative;
    margin-top: 18px;
    margin-bottom: 18px;
    overflow: visible;
    border-radius: var(--radius);
    background: transparent;
    aspect-ratio: 4 / 3;
    box-shadow: 0 18px 36px rgba(5, 5, 5, 0.14), 0 2px 0 rgba(5, 5, 5, 0.06);
}

.project-media-track,
.project-media-slide {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--black);
}

.project-media-slide {
    margin: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 260ms ease;
}

.project-media-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.project-media-slide.is-portrait img {
    object-position: center top;
}

.project-media-slide img {
    width: 100%;
    object-fit: cover;
}

.project-zoom {
    position: absolute;
    z-index: 5;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 50%;
    background: rgba(5, 5, 5, 0.58);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: background-color 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.project-zoom:hover,
.project-zoom:focus-visible {
    border-color: rgba(255, 255, 255, 0.82);
    background: rgba(5, 5, 5, 0.82);
    transform: translateY(-1px);
}

.project-zoom span {
    position: relative;
    width: 13px;
    height: 13px;
    border: 2px solid var(--white);
    border-radius: 50%;
}

.project-zoom span::after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: -5px;
    width: 7px;
    height: 2px;
    border-radius: 999px;
    background: var(--white);
    transform: rotate(45deg);
    transform-origin: center;
}

.project-media-slide figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 12px;
    border: 0;
    border-radius: 0;
    color: var(--white);
    background: rgba(5, 5, 5, 0.46);
    backdrop-filter: blur(8px);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.35;
}

.project-media-controls {
    position: absolute;
    z-index: 4;
    left: 0;
    right: 0;
    bottom: -10px;
    display: flex;
    gap: 6px;
}

.project-media-controls button {
    flex: 1;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
}

.project-media-controls button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.project-media-controls button.is-active {
    background: var(--accent);
}

.project-media.has-carousel .project-media-slide figcaption {
    bottom: 0;
}

.image-modal[hidden] {
    display: none;
}

.image-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: clamp(18px, 4vw, 44px);
}

.image-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 5, 0.78);
    backdrop-filter: blur(8px);
}

.image-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 980px);
    max-height: min(86vh, 820px);
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius);
    background: var(--black);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.4);
}

.image-modal-dialog img {
    width: 100%;
    max-height: calc(86vh - 76px);
    object-fit: contain;
    background: var(--black);
}

.image-modal-dialog figcaption {
    min-height: 54px;
    padding: 14px 18px;
    color: var(--white);
    background: rgba(5, 5, 5, 0.94);
    font-weight: 800;
}

.image-modal-close {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.46);
    border-radius: 50%;
    color: var(--white);
    background: rgba(5, 5, 5, 0.72);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.image-modal-nav {
    position: absolute;
    z-index: 2;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 58px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: var(--radius);
    color: var(--white);
    background: rgba(5, 5, 5, 0.62);
    font-size: 2.3rem;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 180ms ease, border-color 180ms ease;
}

.image-modal-nav:hover,
.image-modal-nav:focus-visible {
    border-color: rgba(255, 255, 255, 0.78);
    background: rgba(5, 5, 5, 0.86);
}

.image-modal-prev {
    left: 12px;
}

.image-modal-next {
    right: 12px;
}

.image-modal-nav.is-hidden {
    display: none;
}

.contact-section {
    scroll-margin-top: 72px;
    display: grid;
    grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.15fr);
    gap: clamp(30px, 7vw, 92px);
    padding: clamp(56px, 9vw, 112px) clamp(24px, 6vw, 76px);
    color: var(--white);
    background: var(--black);
}

.contact-copy p {
    margin-top: 22px;
    color: #d9d9d9;
}

.contact-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.contact-points span {
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: var(--radius);
}

.contact-form,
.admin-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.contact-form .button {
    min-height: 54px;
    margin-top: 4px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: var(--black);
    background: linear-gradient(135deg, var(--green), var(--blue));
    box-shadow: 0 18px 36px rgba(36, 209, 143, 0.22);
}

.contact-form .button:hover,
.contact-form .button:focus-visible {
    border-color: rgba(255, 255, 255, 0.48);
    background: linear-gradient(135deg, #31e39f, #59b6ff);
    box-shadow: 0 22px 44px rgba(63, 167, 255, 0.24), 0 8px 18px rgba(36, 209, 143, 0.18);
    transform: translateY(-2px);
}

label {
    display: grid;
    gap: 7px;
    font-size: 0.86rem;
    font-weight: 800;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 13px;
    color: var(--ink);
    background: var(--white);
    font: inherit;
}

textarea {
    resize: vertical;
}

.full {
    grid-column: 1 / -1;
}

.notice {
    grid-column: 1 / -1;
    margin: 0 0 4px;
    padding: 12px 14px;
    border-radius: var(--radius);
    font-weight: 800;
}

.notice.success {
    color: #073c2a;
    background: #d8f7e7;
}

.notice.error {
    color: #5d160d;
    background: #ffe0d8;
}

[data-admin-notices] {
    position: fixed;
    z-index: 20;
    right: 18px;
    bottom: 18px;
    width: min(420px, calc(100vw - 36px));
}

[data-admin-notices]:empty {
    display: none;
}

[data-admin-notices] .notice {
    box-shadow: 0 14px 34px rgba(5, 5, 5, 0.12);
}

.admin-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.admin-collapse[hidden],
.admin-edit-row[hidden] {
    display: none;
}

.admin-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-table tr:last-child td {
    border-bottom: 0;
}

.admin-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-row-actions button {
    border: 0;
    padding: 0;
    color: var(--black);
    background: transparent;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.admin-row-actions .danger {
    color: #b42318;
}

.admin-edit-panel {
    margin: 2px 0 8px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f7f7f5;
}

.admin-status {
    display: inline-flex;
    width: fit-content;
    padding: 5px 8px;
    border-radius: var(--radius);
    color: #073c2a;
    background: #d8f7e7;
    font-size: 0.76rem;
    font-weight: 900;
}

.admin-status.is-muted {
    color: #5d160d;
    background: #ffe0d8;
}

.admin-confirm-dialog[hidden] {
    display: none;
}

.admin-confirm-dialog {
    position: fixed;
    z-index: 80;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
}

.admin-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 5, 0.42);
}

.admin-confirm-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 440px);
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 24px 70px rgba(5, 5, 5, 0.24);
}

.admin-confirm-panel h2 {
    margin: 4px 0 10px;
    font-size: 1.7rem;
}

.admin-confirm-panel p:last-of-type {
    margin-bottom: 0;
    color: var(--muted);
}

.admin-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 22px;
}

.site-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 24px clamp(24px, 6vw, 76px);
    text-align: center;
    color: var(--white);
    background: var(--black);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.site-footer img {
    width: 48px;
}

.site-footer p {
    margin: 0;
    color: #d6d6d6;
}

.admin-body {
    min-height: 100vh;
    background: #f7f7f5;
}

.login-body {
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-panel {
    width: min(100%, 420px);
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.migration-panel {
    width: min(100%, 760px);
}

.login-panel img {
    width: 72px;
    margin-bottom: 22px;
}

.login-panel h1,
.admin-page-header h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1;
}

.login-panel form {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.admin-body:not(.login-body) {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px;
    background: var(--black);
}

.admin-sidebar img {
    width: 72px;
    margin-bottom: 28px;
}

.admin-nav {
    display: grid;
    gap: 8px;
}

.admin-nav a {
    padding: 11px 12px;
    border-radius: var(--radius);
    color: #d7d7d7;
    font-weight: 800;
}

.admin-nav a:hover,
.admin-nav .is-active {
    color: var(--black);
    background: var(--white);
}

.admin-main {
    padding: clamp(24px, 5vw, 56px);
}

.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.metric-grid article,
.admin-panel,
.message-item {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.metric-grid span {
    display: block;
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
}

.metric-grid p {
    margin: 10px 0 0;
    color: var(--muted);
}

.admin-form fieldset {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.portfolio-image-fieldset {
    grid-column: 1 / -1;
}

.portfolio-upload-slot {
    display: grid;
    grid-template-columns: minmax(180px, 0.9fr) minmax(220px, 1.1fr);
    gap: 14px;
    grid-column: 1 / -1;
}

.portfolio-image-admin-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    grid-column: 1 / -1;
}

.portfolio-image-admin-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 4 / 3;
    background: var(--black);
}

.portfolio-image-admin-item.is-portrait {
    aspect-ratio: 9 / 16;
}

.portfolio-image-admin-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-image-admin-item span {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 7px 8px;
    border-radius: var(--radius);
    color: var(--white);
    background: rgba(5, 5, 5, 0.72);
    font-size: 0.76rem;
    font-weight: 800;
}

.portfolio-image-delete {
    position: absolute;
    z-index: 2;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 2px solid var(--white);
    border-radius: 50%;
    color: var(--white);
    background: #d32626;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(5, 5, 5, 0.28);
}

.portfolio-image-delete:hover,
.portfolio-image-delete:focus-visible {
    background: #a81414;
}

.portfolio-image-delete-form {
    display: none;
}

.admin-form legend {
    padding: 0 8px;
    font-weight: 900;
}

.admin-form.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-form.single {
    grid-template-columns: 1fr;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.admin-muted {
    margin-top: 0;
    color: var(--muted);
}

.device-panel {
    margin-top: 16px;
}

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

.device-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--soft);
}

.device-item.is-revoked {
    opacity: 0.62;
}

.device-item strong,
.device-item span,
.device-item small {
    display: block;
}

.device-item span {
    width: fit-content;
    margin-top: 6px;
    padding: 4px 7px;
    border-radius: var(--radius);
    color: #073c2a;
    background: #d8f7e7;
    font-size: 0.74rem;
    font-weight: 900;
}

.device-item.is-revoked span {
    color: #5d160d;
    background: #ffe0d8;
}

.device-item p {
    margin: 10px 0 4px;
    color: #343434;
    font-size: 0.88rem;
}

.device-item small {
    color: var(--muted);
}

.device-item button {
    border: 0;
    padding: 0;
    color: #b42318;
    background: transparent;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.checkbox {
    align-content: end;
}

.checkbox input {
    width: auto;
}

.admin-list,
.message-list {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.delete-form {
    margin-top: 12px;
}

.delete-form button,
.message-actions button,
.message-actions a {
    border: 0;
    padding: 0;
    color: #b42318;
    background: transparent;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.message-actions a {
    color: var(--black);
}

.message-item {
    border-left: 5px solid var(--orange);
}

.message-item.is-read {
    border-left-color: var(--line);
}

.message-item header,
.message-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.message-item header span,
.message-item time {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.message-item .reply-badge {
    display: inline-flex;
    width: fit-content;
    margin-top: 8px;
    padding: 5px 8px;
    border-radius: var(--radius);
    color: #073c2a;
    background: #d8f7e7;
    font-size: 0.78rem;
    font-weight: 900;
}

.message-item h2 {
    margin: 18px 0 8px;
}

.empty-state {
    padding: 22px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.migration-list {
    display: grid;
    gap: 10px;
    margin: 24px 0;
}

.migration-list article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.migration-pending {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: var(--radius);
    color: #5d160d;
    background: #ffe0d8;
    font-size: 0.78rem;
    font-weight: 900;
}

.template-help {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.email-preview-panel {
    margin-top: 18px;
    overflow: hidden;
}

.email-preview {
    max-height: 680px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--soft);
}

.email-preview table {
    font-family: Merriweather, Georgia, "Times New Roman", serif;
}

.reply-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
    gap: 18px;
}

.reply-layout h2,
.email-preview-panel h2,
.admin-panel h2 {
    margin: 0 0 16px;
    font-size: 1.35rem;
}

@media (max-width: 1040px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-form.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .section,
    #top,
    .contact-section {
        scroll-margin-top: 170px;
    }

    #top {
        scroll-margin-top: 220px;
    }

    .site-header,
    .site-footer,
    .admin-page-header,
    .message-item header,
    .message-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-header {
        grid-template-columns: 1fr;
        justify-items: center;
        align-items: center;
    }

    .site-footer {
        align-items: center;
    }

    .main-nav {
        width: 100%;
        justify-self: center;
        justify-content: center;
        overflow-x: auto;
    }

    .brand-badge {
        justify-self: center;
    }

    .hero,
    .split-section,
    .founder-section,
    .founder-blog-heading,
    .contact-section,
    .admin-body:not(.login-body) {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
    }

    .hero-mark {
        min-height: 360px;
        order: -1;
    }

    .portfolio-grid,
    .blog-timeline,
    .blog-layout,
    .blog-card,
    .capability-grid,
    .account-grid,
    .contact-form,
    .blog-comment-form,
    .admin-form,
    .admin-form fieldset,
    .admin-form.compact,
    .metric-grid,
    .reply-layout,
    .portfolio-upload-slot,
    .portfolio-image-admin-list {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
        height: auto;
    }

    .founder-blog-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .blog-timeline-card {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .blog-timeline {
        gap: 14px;
        overflow: visible;
        padding-top: 0;
    }

    .blog-timeline::before {
        display: none;
    }

    .blog-timeline-card {
        padding-top: 16px;
    }

    .blog-timeline-card::before {
        top: 20px;
        left: 14px;
        width: 10px;
        height: 10px;
    }

    .blog-timeline-date {
        position: static;
        grid-column: 1 / -1;
        width: fit-content;
        margin-left: 30px;
        margin-bottom: 2px;
    }

    .founder-blog-actions {
        justify-content: flex-start;
    }
}
