:root {
    --bg: #f4efe8;
    --surface: #fbf8f2;
    --surface-alt: #ede4d8;
    --text: #201b17;
    --muted: #6c6258;
    --line: rgba(32, 27, 23, 0.12);
    --accent: #8b6f4e;
    --accent-dark: #5f4830;
    --success: #29543d;
    --danger: #9e3c2b;
    --shadow: 0 24px 60px rgba(32, 27, 23, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--text);
    background: radial-gradient(circle at top, #fff7ea 0, var(--bg) 45%, #efe5d8 100%);
}

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

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

button,
input,
textarea,
select {
    font: inherit;
}

.container {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(244, 239, 232, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

.nav-shell,
.admin-topbar,
.footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.brand {
    font-size: 1.7rem;
    font-style: italic;
    letter-spacing: -0.04em;
}

.nav-shell {
    min-height: 78px;
}

.nav-links,
.admin-actions,
.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.nav-links a,
.admin-actions a,
.admin-tabs a,
.eyebrow,
.button,
.ghost-button {
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.72rem;
}

.page-shell {
    min-height: 60vh;
}

.hero {
    padding: 4rem 0 5rem;
}

.hero-grid,
.about-grid,
.project-list,
.footer-grid,
.admin-grid,
.stats-grid,
.form-grid {
    display: grid;
    gap: 2rem;
}

.hero-grid,
.about-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
}

.hero-copy h1,
.section-title,
.page-title,
.project-title,
.footer-grid h2 {
    font-weight: 400;
    line-height: 0.95;
}

.hero-copy h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    margin: 0 0 1.5rem;
}

.hero-copy h1 span,
.section-title em,
.service-card h2,
.brand {
    font-style: italic;
}

.lead,
.text-muted,
.service-card p,
.page-intro {
    color: var(--muted);
    line-height: 1.8;
}

.button,
.ghost-button,
.admin-tabs a,
.table-actions a,
.table-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid var(--text);
    padding: 0.95rem 1.25rem;
    transition: 0.2s ease;
    background: transparent;
    cursor: pointer;
}

.button {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}

.button:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.ghost-button:hover,
.admin-tabs a:hover,
.table-actions a:hover,
.table-actions button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.section {
    padding: 5rem 0;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-title,
.page-title,
.project-title {
    font-size: clamp(2.5rem, 6vw, 4.7rem);
    margin: 0;
}

.project-list {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.project-card,
.service-card,
.panel,
.stat-card,
.message-card {
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.project-card img,
.hero-image,
.about-grid img,
.project-hero img,
.gallery-grid img,
.thumb {
    width: 100%;
    object-fit: cover;
}

.project-card img {
    aspect-ratio: 4 / 5;
}

.hero-image {
    aspect-ratio: 3 / 4;
}

.project-card-copy,
.service-card,
.panel,
.message-card {
    padding: 1.4rem;
}

.service-stack {
    display: grid;
    gap: 1.25rem;
}

.service-card {
    border-left: 5px solid var(--accent);
}

.about-grid img {
    aspect-ratio: 4 / 5;
}

.site-footer {
    background: #201b17;
    color: #f6eee2;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.footer-copy {
    color: rgba(246, 238, 226, 0.72);
}

.footer-email {
    font-size: 1.6rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: flex-start;
}

.footer-meta {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(246, 238, 226, 0.12);
    color: rgba(246, 238, 226, 0.6);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.flash {
    padding: 0.9rem 0;
    font-family: Arial, Helvetica, sans-serif;
}

.flash-success {
    background: rgba(41, 84, 61, 0.12);
    color: var(--success);
}

.flash-error {
    background: rgba(158, 60, 43, 0.12);
    color: var(--danger);
}

.project-hero img {
    aspect-ratio: 16 / 9;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.gallery-grid img {
    aspect-ratio: 4 / 5;
}

.form-stack,
.admin-form {
    display: grid;
    gap: 1rem;
}

.field {
    display: grid;
    gap: 0.45rem;
}

.field label,
.fieldset-title,
.meta-label {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--muted);
}

.input,
.textarea,
.select {
    width: 100%;
    border: 1px solid var(--line);
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.72);
    color: var(--text);
}

.textarea {
    min-height: 140px;
    resize: vertical;
}

.admin-body {
    background: #f2ece2;
}

.admin-header {
    background: rgba(250, 246, 239, 0.94);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(14px);
}

.admin-topbar {
    min-height: 80px;
}

.admin-tabs {
    padding: 0 0 1rem;
}

.admin-tabs a {
    border-color: transparent;
    padding: 0.5rem 0;
}

.admin-tabs a.active {
    border-color: var(--accent);
    color: var(--accent-dark);
}

.admin-shell {
    padding: 2rem 0 3rem;
}

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

.stat-card h3,
.stat-card p {
    margin: 0;
}

.stat-card {
    padding: 1.2rem;
}

.stat-card p {
    margin-top: 0.35rem;
    font-size: 2rem;
}

.panel h2,
.panel h3,
.message-card h3 {
    margin-top: 0;
}

.table-wrap {
    overflow-x: auto;
}

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

th,
td {
    text-align: left;
    border-bottom: 1px solid var(--line);
    padding: 0.85rem 0.5rem;
    vertical-align: top;
}

th {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--muted);
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.table-actions a,
.table-actions button {
    padding: 0.55rem 0.75rem;
    font-size: 0.7rem;
}

.danger {
    border-color: var(--danger);
    color: var(--danger);
}

.badge {
    display: inline-block;
    border: 1px solid var(--line);
    padding: 0.25rem 0.5rem;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
}

.login-card {
    width: min(460px, 100%);
}

.message-card.unread {
    border-left: 5px solid var(--accent);
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-family: Arial, Helvetica, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    color: var(--muted);
}

.help {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

@media (max-width: 860px) {
    .hero-grid,
    .about-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .nav-shell,
    .admin-topbar,
    .footer-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        gap: 0.9rem;
    }
}
