@font-face {
  font-family: "Noto Sans Local";
  src: url("../fonts/NotoSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Local";
  src: url("../fonts/NotoSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Local";
  src: url("../fonts/NotoSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif Local";
  src: url("../fonts/NotoSerif-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif Local";
  src: url("../fonts/NotoSerif-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f2ece2;
  --bg-strong: #e5dac8;
  --card: rgba(255, 255, 255, 0.78);
  --card-strong: #fffaf3;
  --text: #18222a;
  --muted: #5f6b75;
  --line: rgba(24, 34, 42, 0.11);
  --brand: #0f4c52;
  --brand-deep: #0a3539;
  --accent: #c2673e;
  --danger: #8b3b34;
  --shadow: 0 20px 60px rgba(16, 38, 41, 0.12);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(194, 103, 62, 0.13), transparent 28%),
    radial-gradient(circle at top right, rgba(15, 76, 82, 0.12), transparent 30%),
    linear-gradient(180deg, #f7f2ea 0%, var(--bg) 42%, #efe6d8 100%);
  font-family: "Noto Sans Local", "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

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

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

.page-shell,
.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.topbar,
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.8);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 0.94rem;
}

.topnav a:hover,
.text-link:hover,
.site-footer a:hover,
.contact-mail:hover {
  color: var(--brand);
}

.main-layout,
.admin-main,
.admin-gate {
  display: grid;
  gap: 22px;
}

.hero-card,
.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(255,255,255,0.36), transparent 40%);
  pointer-events: none;
}

.hero-card {
  display: grid;
  grid-template-columns: 1.65fr 0.95fr;
  gap: 24px;
  padding: 34px;
}

.hero-copy h1,
.section-heading h2,
.section-heading h1 {
  margin: 0;
  font-family: "Noto Serif Local", serif;
  line-height: 1.14;
}

.hero-copy h1 {
  max-width: 10ch;
  font-size: clamp(2.5rem, 6vw, 4.8rem);
}

.eyebrow,
.card-kicker,
.timeline-meta {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lead {
  margin: 18px 0 10px;
  font-size: 1.2rem;
  font-weight: 600;
  max-width: 36rem;
}

.hero-text,
.body-copy,
.panel p,
.message-card p {
  color: var(--muted);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
}

.button-secondary {
  color: var(--brand);
  background: rgba(15, 76, 82, 0.08);
  border-color: rgba(15, 76, 82, 0.18);
}

.button-danger {
  color: #fff;
  background: linear-gradient(135deg, var(--danger), #5e2621);
}

.small-button {
  min-height: 40px;
  padding-inline: 14px;
}

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

.hero-facts div {
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(15, 76, 82, 0.1);
}

.hero-facts dt {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-facts dd {
  margin: 8px 0 0;
  font-size: 1rem;
  font-weight: 600;
}

.hero-profile {
  display: grid;
  align-content: space-between;
  gap: 20px;
}

.profile-frame {
  display: grid;
  place-items: center;
  min-height: 320px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 20% 20%, rgba(194, 103, 62, 0.24), transparent 26%),
    linear-gradient(160deg, #18484d, #0f2229 60%, #0b1c22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

.small-frame {
  min-height: 180px;
}

.profile-image {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  border-radius: inherit;
}

.profile-placeholder {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, rgba(255,255,255,0.24), rgba(194,103,62,0.62));
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.profile-panel {
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 250, 243, 0.62);
  border: 1px solid rgba(24, 34, 42, 0.08);
}

.profile-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.profile-role,
.profile-note,
.card-subtitle,
.small-copy {
  color: var(--muted);
}

.flash-stack {
  display: grid;
  gap: 10px;
}

.flash {
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.flash-success {
  background: rgba(15, 76, 82, 0.1);
  color: var(--brand);
}

.flash-error {
  background: rgba(139, 59, 52, 0.1);
  color: var(--danger);
}

.content-grid,
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.9fr);
  gap: 22px;
}

.admin-grid {
  align-items: start;
}

.panel {
  padding: 28px;
}

.panel-focus,
.panel-contact {
  align-self: stretch;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading.compact {
  margin-top: 26px;
}

.section-heading h2,
.section-heading h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.section-heading h3,
.project-card h3,
.timeline-item h3,
.link-card h3,
.message-card h3,
.auth-panel h1 {
  margin: 0;
  font-family: "Noto Serif Local", serif;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-group.small {
  margin-top: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(15, 76, 82, 0.08);
  border: 1px solid rgba(15, 76, 82, 0.1);
  color: var(--brand);
  font-size: 0.92rem;
}

.detail-list {
  padding-left: 20px;
  color: var(--muted);
}

.card-stack,
.link-grid,
.message-stack {
  display: grid;
  gap: 16px;
}

.project-card,
.link-card,
.timeline-item,
.message-card,
.edit-card,
.table-card,
.stat-box {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(24, 34, 42, 0.08);
}

.project-header,
.message-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(194, 103, 62, 0.12);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
}

.muted-badge {
  background: rgba(15, 76, 82, 0.08);
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-meta span {
  color: var(--accent);
}

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

.text-link,
.contact-mail,
.site-footer a {
  color: var(--brand);
  font-weight: 600;
}

.contact-mail {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 1.08rem;
}

.contact-form,
.auth-form,
.upload-form,
.admin-form-grid {
  display: grid;
  gap: 14px;
}

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

.form-row,
.checkbox-row,
.stat-box {
  display: grid;
  gap: 8px;
}

.span-two {
  grid-column: span 2;
}

.form-row label,
.checkbox-row label,
.stat-box span {
  font-size: 0.9rem;
  font-weight: 600;
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(24, 34, 42, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
}

.form-row textarea {
  resize: vertical;
}

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.site-footer {
  padding: 20px 4px 0;
  color: var(--muted);
  text-align: center;
}

.site-footer span {
  padding: 0 8px;
}

.admin-body {
  background:
    radial-gradient(circle at top right, rgba(15, 76, 82, 0.13), transparent 28%),
    radial-gradient(circle at top left, rgba(194, 103, 62, 0.13), transparent 30%),
    linear-gradient(180deg, #efe4d4 0%, #ede5da 36%, #ebe0d0 100%);
}

.admin-gate {
  width: min(760px, 100%);
  margin: 24px auto 0;
}

.auth-panel {
  padding: 32px;
}

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

.stat-card h2 {
  margin: 8px 0 4px;
  font-size: 2rem;
}

.editable-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.edit-card summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-weight: 700;
}

.edit-card summary span {
  color: var(--muted);
  font-weight: 500;
}

.edit-card form {
  margin-top: 16px;
}

.avatar-admin {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.upload-form {
  align-content: start;
}

.message-card,
.table-card {
  display: grid;
  gap: 10px;
}

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

.table-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(24, 34, 42, 0.08);
}

.table-row:last-child {
  border-bottom: none;
}

.table-row.stacked {
  display: grid;
  justify-content: start;
}

.account-form {
  margin-top: 18px;
}

.muted {
  color: var(--muted);
}

@media (max-width: 1024px) {
  .hero-card,
  .content-grid,
  .admin-grid,
  .stats-grid,
  .analytics-columns,
  .avatar-admin {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: 14ch;
  }

  .link-grid {
    grid-template-columns: 1fr;
  }

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

  .span-two {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .page-shell,
  .admin-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 14px;
  }

  .topbar,
  .admin-topbar {
    border-radius: 26px;
    padding: 16px;
  }

  .hero-card,
  .panel,
  .auth-panel {
    padding: 22px;
  }

  .topnav {
    display: none;
  }

  .hero-facts {
    grid-template-columns: 1fr;
  }
}
