@font-face {
  font-family: Nichrome;
  src: url(../src/fonts/MDNICHROMETEST-BOLD.OTF);
}

@font-face {
  font-family: Montserrat;
  src: url(../src/fonts/MONTSERRAT-VARIABLEFONT_WGHT.TTF);
}

:root {
  /* Core palette */
  font-size: 16px;
  --prime-highlight-color: #f7d347;
  --prime-color1: #f3b529;
  --prime-color2: #cc7c26;
  --prime-color3: #7e5a07;
  --second-highlight-color: #29a9f3;
  --second-color1: #20587c;
  --second-color2: #101524;
  --third-color1: #181415;
  --transparent-nocolor: #0000;

  /* Text colours */
  --text-primary: #ffffff;
  --text-soft: #ffffffde;
  --text-muted: #ffffffd6;
  --text-subtle: #ffffffb8;
  --text-faint: #ffffffa6;

  /* Surfaces and overlays */
  --surface-base: var(--third-color1);
  --surface-header: var(--second-color2);
  --surface-card: linear-gradient(135deg, #101524d9 0%, #181415e6 100%);
  --surface-panel: linear-gradient(135deg, #101524e8 0%, #181415d9 100%);
  --surface-filter: linear-gradient(135deg, #101524cc 0%, #181415d9 100%);
  --surface-glass: linear-gradient(45deg, #10152459 30%, #24305259);
  --surface-glass-alt: linear-gradient(230deg, #10152459 30%, #24305259);
  --overlay-weak: #0000001e;
  --overlay-soft: #00000038;
  --overlay-mid: #0000005c;
  --overlay-strong: #00000066;
  --overlay-heavy: #00000080;

  /* Borders, shadows, and status colours */
  --border-accent-soft: #29a9f352;
  --border-accent-mid: #29a9f326;
  --border-accent-strong: #29a9f398;
  --focus-ring: #29a9f326;
  --shadow-soft: 0 8px 32px 0 #16194618;
  --shadow-card: 0 8px 32px 0 #16194642;
  --shadow-panel: 0 8px 32px 0 #16194652;
  --shadow-strong: 0 8px 32px 0 #161946a2;
  --shadow-button: var(--third-color1) 0.125rem 0.0625rem 0 0.1875rem;
  --danger-color: #b94a48;
  --danger-hover: #d65b58;
  --danger-border: #ff6b6b88;
  --danger-bg: #ff6b6b18;
  --success-border: #42d39288;
  --success-bg: #42d3921f;
  --success-text: #dfffee;

  /* Typography */
  --font-display: Nichrome, system-ui, sans-serif;
  --font-body: Montserrat, system-ui, sans-serif;
  --font-system: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --text-xxs: 0.72rem;
  --text-xs: 0.75rem;
  --text-sm: 0.78rem;
  --text-md: 0.85rem;
  --text-base: 0.9rem;
  --text-body: 0.95rem;
  --text-lg: 1rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.6rem;
  --line-tight: 1.05;
  --line-normal: 1.5;
  --line-readable: 1.6;
  --line-rich: 1.8;

  /* Spacing */
  --space-3xs: 0.12rem;
  --space-2xs: 0.2rem;
  --space-xs: 0.25rem;
  --space-sm: 0.35rem;
  --space-md: 0.45rem;
  --space-lg: 0.6rem;
  --space-xl: 0.75rem;
  --space-2xl: 0.85rem;
  --space-3xl: 1rem;
  --space-4xl: 1.25rem;
  --space-5xl: 1.5rem;
  --space-6xl: 1.75rem;
  --space-page: clamp(1rem, 3vw, 2.5rem);
  --space-card: clamp(1rem, 2vw, 1.4rem);
  --space-header: clamp(1rem, 2.5vw, 1.75rem);

  /* Sizing */
  --container-max: 88rem;
  --content-max: 48rem;
  --copy-max: 54rem;
  --card-min: 18rem;
  --sidebar-sm: 22rem;
  --sidebar-md: 24rem;
  --sidebar-lg: 26rem;
  --logo-width: 17rem;
  --logo-height: 3rem;
  --icon-xs: 1.1rem;
  --icon-sm: 1.2rem;
  --icon-md: 1.25rem;
  --icon-lg: 1.35rem;
  --icon-xl: 1.5em;
  --icon-2xl: 2em;

  /* Radius */
  --radius-2xs: 0.25rem;
  --radius-xs: 0.3rem;
  --radius-sm: 0.35rem;
  --radius-md: 0.45rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.6rem;
  --radius-pill: 999px;

  /* Animation */
  --transition-fast: 0.18s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --animation-duration: 0.6s;
  --stagger-delay: 90ms;
  --slide-distance: 60px;

  /* SVG filters */
  --svg-white: invert(99%) sepia(4%) saturate(181%) hue-rotate(170deg) brightness(110%) contrast(100%);
  --svg-coffee: invert(65%) sepia(63%) saturate(541%) hue-rotate(360deg) brightness(103%) contrast(91%);
  --svg-black: invert(0%) sepia(8%) saturate(7500%) hue-rotate(355deg) brightness(90%) contrast(110%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  background: linear-gradient(var(--third-color1) 70%, var(--second-color1) 95%);
  background-attachment: fixed;
  color: var(--prime-color1);
  font-family: var(--font-display);
  user-select: none;
}

main {
  flex: 1 0 auto;
  display: flex;
}

main > * {
  width: 100%;
}

ul {
  list-style: none;
}

li {
  display: flex;
  justify-content: center;
}

li:hover {
  background-color: var(--second-color1);
}

button {
  margin: var(--space-2xs);
  padding: 0.5rem 0;
  border: none;
  border-radius: var(--radius-lg) 0;
  background-color: var(--prime-color1);
  color: var(--second-color1);
  box-shadow: var(--shadow-button);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
}

button:hover {
  background-color: var(--prime-color2);
  color: var(--third-color1);
}

h1,
h2 {
  text-align: center;
  color: var(--prime-color1);
  background: linear-gradient(var(--prime-color1), var(--prime-color2));
  background-clip: border-box;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-display);
}

h1 {
  font-size: 5em;
}

h2 {
  font-size: 2em;
}

h3 {
  color: var(--text-primary);
}

h4,
h5 {
  font-family: var(--font-system);
  font-size: medium;
}

h4 {
  text-align: center;
}

/* Shared page and panel components */
.portfolio-page,
.blog-page,
.blog-post-page,
.manage-projects-page,
.manage-blog-page,
.contact-page,
.manage-contact-page {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-page);
}

.portfolio-header,
.blog-header,
.blog-post-header,
.contact-header,
.manage-projects-header {
  margin-bottom: var(--space-4xl);
  padding: var(--space-header);
  border: 0.1em solid var(--border-accent-soft);
  border-radius: var(--radius-xl);
  background: var(--surface-panel);
  box-shadow: var(--shadow-panel);
}

.admin-kicker,
.not-found-kicker {
  margin-bottom: var(--space-sm);
  color: var(--second-highlight-color);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-page-title,
.portfolio-page-title,
.blog-page-title,
.blog-post-title,
.contact-page-title {
  text-align: left;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.95;
}

.admin-page-subtitle,
.portfolio-page-subtitle,
.blog-page-subtitle,
.contact-page-subtitle {
  max-width: var(--content-max);
  margin-top: var(--space-xl);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--line-readable);
}

.project-admin-sidebar,
.admin-card,
.blog-card,
.blog-empty-state,
.blog-post-content,
.blog-media,
.blog-post-footer,
.contact-info-card,
.contact-form-card,
.not-found-card,
.portfolio-empty-state {
  border: 0.1em solid var(--border-accent-soft);
  border-radius: var(--radius-xl);
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
}

.admin-card,
.contact-info-card,
.contact-form-card,
.contact-message-card {
  padding: var(--space-card);
}

.admin-card-header {
  margin-bottom: var(--space-3xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 0.1em solid var(--border-accent-mid);
}

.admin-panel-heading {
  padding: var(--space-3xl);
  border-bottom: 0.1em solid var(--border-accent-mid);
}

.admin-panel-heading h2,
.admin-card-header h2,
.contact-info-card h2 {
  text-align: left;
  font-size: var(--text-2xl);
}

.admin-panel-heading p,
.blog-admin-empty {
  margin-top: var(--space-sm);
  color: var(--text-subtle);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: var(--line-normal);
}

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

.admin-field {
  display: grid;
  gap: var(--space-sm);
}

.admin-field-wide {
  grid-column: 1 / -1;
}

.admin-field span,
.portfolio-filter-group label,
.portfolio-filter-group span {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 800;
}

.admin-field .textbox,
.admin-field textarea {
  width: 100%;
}

.admin-field textarea {
  min-height: 9rem;
  padding: 0.7rem;
  line-height: var(--line-normal);
}

.admin-actions {
  margin-top: var(--space-3xl);
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.admin-actions button {
  padding: 0.65rem var(--space-3xl);
  font-size: var(--text-body);
  cursor: pointer;
}

/* Header and footer */
.header-links {
  display: inline-block;
  position: relative;
  padding: 5px 0;
  color: var(--prime-color1);
  text-decoration: none;
  background-image: linear-gradient(to right, var(--text-primary), var(--text-primary) 50%, var(--prime-color1) 50%);
  background-size: 200% 100%;
  background-position: -100%;
  transition: all var(--transition-normal);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-links:visited {
  color: var(--prime-color1);
}

.header-links::before {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  display: block;
  width: 0;
  height: 3px;
  background: var(--text-primary);
  transition: all var(--transition-normal);
}

.header-links:hover {
  background-position: 0;
}

.header-links:hover::before {
  width: 100%;
}

.top-float-name {
  display: block;
  width: min(100%, var(--logo-width));
  height: var(--logo-height);
  background-image: url(icons/SanderyDev.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex: 0 0 auto;
}

.banner {
  padding: var(--space-3xl) var(--space-4xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  background: var(--surface-header);
  text-align: center;
  border-bottom: 1px solid rgba(243, 181, 41, 0.16);
  backdrop-filter: blur(18px);
}

.top-float {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-md) 0.5em;
  font-weight: 700;
}

.top-float a,
.top-float span,
.greeting {
  font-size: var(--text-base);
}

.top-float a,
.top-float span {
  white-space: nowrap;
}

.greeting {
  width: 100%;
  text-align: center;
}

.footer {
  position: static;
  width: 100%;
  padding: var(--space-3xl) 2rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background: var(--third-color1);
  text-align: right;
}

.footer p {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-xs);
}

.coffee {
  height: 1.4em;
  width: 1.4em;
  margin-left: 0;
  padding-left: 0.1em;
  display: inline-block;
  position: static;
  top: auto;
  filter: var(--svg-coffee);
}

/* General layout helpers */
.container {
  margin: var(--space-3xl);
}

.container2 {
  margin-bottom: 3rem;
  padding-inline: 2rem;
  display: grid;
  justify-content: center;
}

.main-content {
  min-height: 50vh;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.void-space {
  width: 100%;
  height: 3rem;
}

.blurb {
  padding-inline: 3rem;
}

.bg {
  z-index: -1;
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200vh;
  background: transparent url(img/noise.png) repeat 0 0;
  animation: bg-animation 0.2s infinite;
  opacity: 0.9;
  visibility: visible;
}

/* Forms */
.user-text {
  display: grid;
  justify-content: center;
}

.login-details {
  display: grid;
  justify-content: space-around;
  align-content: space-between;
}

.login-details label {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.login-error,
.contact-flash {
  margin-bottom: var(--space-3xl);
  padding: 0.85rem var(--space-3xl);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--line-normal);
}

.login-error,
.contact-flash-error {
  border: 0.1em solid var(--danger-border);
  background: var(--danger-bg);
}

.contact-flash-success {
  border: 0.1em solid var(--success-border);
  background: var(--success-bg);
  color: var(--success-text);
}

.textbox,
textarea {
  border-color: var(--transparent-nocolor);
  border-inline: none;
  background-color: var(--overlay-mid);
  outline: none;
  box-shadow: none;
  -webkit-box-shadow: none;
  font-family: var(--font-display);
}

.textbox {
  width: inherit;
  margin-bottom: var(--space-2xs);
  color: var(--text-primary);
}

textarea {
  width: 100%;
  height: 10em;
  resize: none;
  color: var(--prime-color1);
}

textarea:focus {
  outline: none;
}

.human-check-input {
  width: min(100%, 18rem);
  min-height: 3.2rem;
  padding: 0.65rem 0.85rem;
  border: 0.1em solid var(--border-accent-soft);
  border-radius: var(--radius-md);
  background: var(--overlay-mid);
  color: var(--text-primary);
  font-size: 1.35rem;
  text-align: center;
}

.human-check-input:focus,
.portfolio-filter-select:focus,
.rich-editor:focus {
  border-color: var(--border-accent-strong);
  box-shadow: 0 0 0 0.15rem var(--focus-ring);
}

/* Project and portfolio cards */
div#projectList {
  margin-block: 2em;
}

.project-list {
  width: 100%;
  height: auto;
  margin-top: 2em;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--card-min), 1fr));
  align-items: stretch;
  gap: var(--space-3xl);
  overflow: visible;
}

.project-box,
.blog-card {
  opacity: 0;
  transform: translateY(var(--slide-distance));
  animation: slide-and-fade-in var(--animation-duration) ease-out forwards;
  animation-delay: calc(var(--i, 0) * var(--stagger-delay));
  will-change: transform, opacity;
}

.project-box {
  position: relative;
  width: 100%;
  height: 100%;
  padding: var(--space-3xl);
  display: flex;
  flex-direction: column;
  border: 0.1em solid var(--border-accent-soft);
  border-radius: var(--radius-xs);
  background: var(--surface-base);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(4px);
}

.project-box:hover {
  border-color: var(--border-accent-strong);
  box-shadow: var(--shadow-strong);
}

.project-box2 {
  width: 25em;
  height: fit-content;
  margin: 0.5em;
  padding: var(--space-3xl);
  border: 0.1em solid var(--border-accent-soft);
  border-radius: var(--radius-xs);
  background: var(--surface-glass);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(4px);
}

.project-details,
.project-name {
  width: 80%;
}

.project-date {
  width: 9em;
  padding-bottom: var(--space-3xl);
  color: var(--text-primary);
  font-size: small;
}

.project-overview {
  padding-bottom: var(--space-3xl);
  flex: 1 1 auto;
  color: var(--text-primary);
  font-family: var(--font-system);
  white-space: pre-line;
}

.project-links,
.editlinks {
  width: 10em;
  position: absolute;
  top: var(--space-3xl);
  right: var(--space-3xl);
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.editlinks {
  flex-direction: column;
}

.site-link,
.project-repo,
.repo-preview-icon {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: var(--svg-white);
}

.site-link,
.project-repo {
  height: var(--icon-xl);
  width: var(--icon-xl);
  margin-left: var(--space-2xs);
}

.site-link {
  background-image: url(icons/World.svg);
}

.repo-provider-github {
  background-image: url(icons/Github.svg);
}

.repo-provider-gitlab {
  background-image: url(icons/GitLab.svg);
}

.repo-provider-bitbucket {
  background-image: url(icons/Bitbucket.svg);
}

.repo-provider-azure,
.repo-provider-codeberg,
.repo-provider-gitea,
.repo-provider-sourcehut,
.repo-provider-git {
  background-image: url(icons/Git.svg);
}

.repo-provider-unknown {
  background-image: url(icons/unknown.svg);
}

.repo-provider-preview {
  min-height: 1.5em;
  margin-top: var(--space-sm);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: var(--space-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-xxs);
  line-height: 1.3;
  opacity: 0.9;
}

.repo-preview-icon {
  display: inline-block;
  height: 1.25em;
  width: 1.25em;
}

.repo-preview-muted {
  color: var(--text-faint);
}

.stack {
  padding: 0.5em;
  border-radius: 4px;
  background: var(--surface-glass-alt);
}

.project-techstack,
.tech-icon-selector {
  display: flex;
  flex-wrap: wrap;
}

.project-techstack {
  justify-content: center;
}

.tech-icon-selector {
  gap: var(--space-md);
  padding: var(--space-lg);
  border: 0.1em solid var(--border-accent-mid);
  border-radius: var(--radius-md);
  background: var(--overlay-soft);
}

.techimg,
.tech-icon-selector img {
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.techimg {
  height: var(--icon-2xl);
  width: var(--icon-2xl);
  margin: var(--space-2xs);
}

.tech-icon-selector img {
  width: 40px;
  height: 40px;
  margin: 5px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s, transform 0.2s;
}

.tech-icon-selector img.active {
  opacity: 1;
  transform: scale(1.1);
  border: 2px solid var(--prime-highlight-color);
  border-radius: 5px;
}

/* Admin project/blog/contact layouts */
.manage-projects-layout,
.manage-blog-layout,
.manage-contact-layout,
.contact-layout {
  display: grid;
  gap: var(--space-4xl);
  align-items: start;
}

.manage-projects-layout {
  grid-template-columns: minmax(16rem, var(--sidebar-sm)) minmax(0, 1fr);
}

.manage-blog-layout,
.contact-layout {
  grid-template-columns: minmax(16rem, var(--sidebar-md)) minmax(0, 1fr);
}

.manage-contact-layout {
  grid-template-columns: minmax(18rem, var(--sidebar-lg)) minmax(0, 1fr);
}

.project-admin-sidebar,
.blog-admin-sidebar,
.contact-admin-sidebar {
  position: sticky;
  top: var(--space-3xl);
}

.project-admin-sidebar {
  max-height: calc(100vh - 2rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-admin-list {
  padding: var(--space-xl);
  overflow-y: auto;
}

.project-admin-list ul {
  display: grid;
  gap: var(--space-md);
}

.project-admin-list li {
  display: block;
}

.project-admin-list li:hover {
  background: transparent;
}

.project-admin-workspace {
  display: grid;
  gap: var(--space-4xl);
}

.project-select-button {
  width: 100%;
  margin: 0;
  padding: 0.65rem var(--space-xl);
  border: 0.1em solid var(--border-accent-mid);
  border-radius: var(--radius-md);
  background: var(--overlay-soft);
  color: var(--prime-color1);
  box-shadow: none;
  text-align: left;
  font-size: 0.82rem;
  line-height: 1.2;
  cursor: pointer;
}

.project-select-button:hover,
.blog-admin-post-link:hover,
.blog-admin-post-link.active,
.contact-admin-message-link:hover,
.contact-admin-message-link.active {
  border-color: var(--border-accent-strong);
  background: #29a9f31c;
  color: var(--text-primary);
}

.danger-button,
.blog-delete-button,
.ip-blacklist-button {
  background-color: var(--danger-color);
  color: var(--text-primary);
}

.danger-button:hover,
.blog-delete-button:hover,
.ip-blacklist-button:hover {
  background-color: var(--danger-hover);
  color: var(--text-primary);
}

/* Filters */
.portfolio-filter-panel,
.blog-filter-panel {
  margin-bottom: var(--space-4xl);
  padding: var(--space-3xl);
  display: grid;
  align-items: end;
  gap: 0.85rem;
  border: 0.1em solid var(--border-accent-soft);
  border-radius: var(--radius-xl);
  background: var(--surface-filter);
  box-shadow: var(--shadow-card);
}

.portfolio-filter-panel {
  grid-template-columns: minmax(10rem, 14rem) minmax(10rem, 18rem) auto minmax(12rem, 1fr);
}

.blog-filter-panel {
  grid-template-columns: minmax(9rem, 12rem) minmax(10rem, 14rem) minmax(10rem, 16rem) auto auto minmax(10rem, 1fr);
}

.portfolio-filter-group {
  display: grid;
  gap: var(--space-sm);
}

.portfolio-filter-select {
  width: 100%;
  padding: 0.65rem var(--space-xl);
  border: 0.1em solid var(--border-accent-soft);
  border-radius: var(--radius-md);
  background: var(--overlay-mid);
  color: var(--prime-color1);
  font-family: var(--font-display);
  font-size: var(--text-base);
  outline: none;
}

.portfolio-reset-button {
  margin: 0;
  padding: 0.65rem var(--space-3xl);
  border-radius: var(--radius-md);
  box-shadow: none;
  font-size: var(--text-base);
  cursor: pointer;
}

.portfolio-filter-summary {
  justify-self: end;
  margin: 0;
  color: var(--text-subtle);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.4;
  text-align: right;
}

.blog-filter-reset {
  min-height: 2.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--prime-color1);
  font-family: var(--font-display);
  text-decoration: none;
}

.blog-filter-reset:hover {
  color: var(--text-primary);
}

/* 404 and empty states */
.not-found-page {
  width: 100%;
  min-height: calc(100vh - 12rem);
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 5vw, 4rem);
}

.not-found-card {
  width: min(100%, 46rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  text-align: center;
  box-shadow: var(--shadow-strong);
}

.not-found-code {
  margin-bottom: var(--space-xs);
  line-height: 0.9;
  font-size: clamp(5rem, 18vw, 10rem);
}

.not-found-copy,
.not-found-route,
.portfolio-empty-state p,
.blog-empty-state p {
  color: var(--text-muted);
  font-family: var(--font-body);
  line-height: var(--line-readable);
}

.not-found-copy,
.portfolio-empty-state p,
.blog-empty-state p {
  max-width: 36rem;
  margin: var(--space-3xl) auto 0;
  font-size: var(--text-body);
}

.not-found-route {
  max-width: 100%;
  margin: var(--space-4xl) auto 0;
  font-size: var(--text-base);
  opacity: 0.85;
}

.not-found-route code,
.blog-current-upload code {
  color: var(--prime-highlight-color);
  overflow-wrap: anywhere;
}

.not-found-route code {
  display: inline-block;
  max-width: 100%;
  margin-left: var(--space-sm);
  padding: var(--space-2xs) var(--space-md);
  border-radius: var(--radius-2xs);
  background: var(--overlay-mid);
}

.not-found-actions {
  margin-top: var(--space-6xl);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-3xl);
  flex-wrap: wrap;
}

.not-found-button,
.not-found-link {
  font-family: var(--font-display);
  text-decoration: none;
}

.not-found-button {
  padding: var(--space-xl) var(--space-3xl);
  border-radius: var(--radius-sm);
  background: var(--prime-color1);
  color: var(--second-color2);
  box-shadow: 0 6px 20px var(--overlay-md, #00000045);
}

.not-found-button:hover {
  background: var(--prime-color2);
  color: var(--third-color1);
}

.not-found-link {
  color: var(--prime-color1);
}

.not-found-link:hover {
  color: var(--text-primary);
}

.portfolio-empty-state,
.blog-empty-state {
  grid-column: 1 / -1;
  padding: clamp(1.25rem, 3vw, 2rem);
  text-align: center;
}

.portfolio-empty-state h2 {
  font-size: clamp(1.8rem, 5vw, 3rem);
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3xl);
}

.blog-card {
  position: relative;
  width: 100%;
  padding: clamp(1rem, 2vw, 1.35rem);
  display: grid;
  gap: 0.85rem;
}

.blog-card-meta,
.blog-post-meta,
.blog-tech-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.blog-card-meta,
.blog-post-meta {
  gap: 0.55rem;
  color: var(--text-subtle);
  font-family: var(--font-body);
  font-size: var(--text-sm);
}

.blog-card-meta > span,
.blog-post-meta > span,
.blog-mood-badge,
.blog-tech-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--overlay-soft);
  border: 0.1em solid var(--border-accent-mid);
  color: var(--text-muted);
  line-height: 1;
  white-space: nowrap;
}

.blog-card-meta > span,
.blog-post-meta > span,
.blog-mood-badge {
  min-height: 2rem;
  gap: var(--space-md);
  padding: var(--space-sm) 0.65rem;
}

.blog-mood-badge img,
.blog-mood-emoji {
  width: var(--icon-sm);
  height: var(--icon-sm);
}

.blog-mood-badge img {
  object-fit: contain;
  flex: 0 0 auto;
}

.blog-mood-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.blog-card h2 {
  text-align: left;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: var(--line-tight);
}

.blog-card h2 a {
  color: inherit;
  text-decoration: none;
}

.blog-card h2 a:hover,
.blog-read-more:hover,
.rich-editor a:hover,
.blog-post-content a:hover {
  color: var(--text-primary);
}

.blog-card p,
.blog-empty-state p {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--line-readable);
}

.blog-card p {
  max-width: var(--copy-max);
}

.blog-read-more {
  width: fit-content;
  margin-top: var(--space-xs);
  color: var(--prime-color1);
  font-family: var(--font-display);
  text-decoration: none;
}

.blog-post-meta {
  margin-top: var(--space-3xl);
}

.blog-media {
  margin-bottom: var(--space-4xl);
  overflow: hidden;
}

.blog-media-image img {
  display: block;
  width: 100%;
  max-height: 34rem;
  object-fit: cover;
}

.blog-media-youtube {
  position: relative;
  aspect-ratio: 16 / 9;
}

.blog-media-youtube iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.blog-post-content {
  padding: clamp(1.25rem, 3vw, 2rem);
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: var(--text-lg);
  line-height: var(--line-rich);
  white-space: normal;
  user-select: text;
}

.blog-post-footer {
  margin-top: var(--space-4xl);
  padding: var(--space-3xl);
}

.blog-admin-post-link,
.contact-admin-message-link {
  display: grid;
  gap: var(--space-xs);
  padding: 0.7rem;
  border: 0.1em solid var(--border-accent-mid);
  border-radius: var(--radius-md);
  background: var(--overlay-soft);
  color: var(--prime-color1);
  text-decoration: none;
}

.blog-admin-post-link strong,
.contact-admin-message-link strong {
  font-size: var(--text-base);
  line-height: 1.2;
}

.blog-admin-post-link span,
.contact-admin-message-link span,
.contact-admin-message-link small,
.contact-admin-message-link p {
  color: var(--text-subtle);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  line-height: 1.4;
}

.blog-delete-form {
  margin-top: var(--space-sm);
}

.blog-delete-button {
  width: 100%;
  margin: 0;
  padding: var(--space-sm) 0.5rem;
  border-radius: var(--radius-sm);
  box-shadow: none;
  font-size: var(--text-xxs);
}

.blog-editor-card textarea {
  min-height: 14rem;
}

.blog-checkbox-row {
  min-height: 2.3rem;
  padding: var(--space-md) 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 0.1em solid var(--border-accent-mid);
  border-radius: var(--radius-md);
  background: var(--overlay-soft);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-md);
}

.blog-file-input {
  padding: 0.55rem;
}

.blog-current-upload {
  margin: 0;
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  background: var(--overlay-soft);
  color: var(--text-subtle);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: var(--line-normal);
}

.blog-tech-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: var(--space-md);
  padding: var(--space-lg);
  border: 0.1em solid var(--border-accent-mid);
  border-radius: var(--radius-md);
  background: var(--overlay-soft);
}

.blog-tech-option {
  cursor: pointer;
}

.blog-tech-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.blog-tech-option span {
  min-height: 2.4rem;
  padding: var(--space-md) 0.55rem;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  border: 0.1em solid var(--border-accent-mid);
  border-radius: 0.4rem;
  background: var(--overlay-soft);
  color: var(--text-subtle);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
}

.blog-tech-option img {
  width: var(--icon-lg);
  height: var(--icon-lg);
  object-fit: contain;
}

.blog-tech-option input:checked + span {
  border-color: var(--border-accent-strong);
  background: #29a9f31c;
  color: var(--text-primary);
  box-shadow: 0 0 0 0.12rem var(--focus-ring);
}

.blog-tech-tags {
  gap: var(--space-md);
  margin-top: 0;
}

.blog-tech-tag {
  min-height: 1.8rem;
  gap: var(--space-sm);
  padding: 0.28rem 0.5rem;
  font-family: var(--font-body);
  font-size: var(--text-xxs);
}

.blog-tech-tag img {
  width: var(--icon-xs);
  height: var(--icon-xs);
  object-fit: contain;
  flex: 0 0 auto;
}

/* Rich text editor */
.rich-editor-toolbar {
  padding: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  border: 0.1em solid var(--border-accent-mid);
  border-bottom: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--overlay-mid);
}

.rich-editor-toolbar button {
  margin: 0;
  padding: var(--space-md) var(--space-lg);
  border: 0.1em solid var(--border-accent-mid);
  border-radius: var(--radius-sm);
  background: var(--second-color2);
  color: var(--prime-color1);
  box-shadow: none;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  cursor: pointer;
}

.rich-editor-toolbar button:hover {
  border-color: var(--border-accent-strong);
  background: #29a9f31c;
  color: var(--text-primary);
}

.rich-editor-divider {
  width: 0.1rem;
  min-height: 1.8rem;
  margin-inline: var(--space-2xs);
  background: var(--border-accent-mid);
}

.rich-editor {
  min-height: 18rem;
  padding: var(--space-3xl);
  border: 0.1em solid var(--border-accent-mid);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: var(--overlay-soft);
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: var(--text-lg);
  line-height: 1.75;
  outline: none;
  user-select: text;
}

.rich-editor h2,
.blog-post-content h2 {
  margin: 1.2rem 0 var(--space-lg);
  text-align: inherit;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: var(--line-tight);
}

.rich-editor h3,
.blog-post-content h3 {
  margin: var(--space-3xl) 0 0.5rem;
  color: var(--prime-color1);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.1;
}

.rich-editor h4,
.blog-post-content h4 {
  margin: 0.85rem 0 var(--space-md);
  color: var(--second-highlight-color);
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 800;
  text-align: inherit;
}

.rich-editor p,
.blog-post-content p {
  margin-bottom: var(--space-3xl);
}

.rich-editor a,
.blog-post-content a {
  color: var(--second-highlight-color);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.rich-editor ul,
.rich-editor ol,
.blog-post-content ul,
.blog-post-content ol {
  margin: var(--space-xl) 0 var(--space-3xl) var(--space-5xl);
  padding-left: var(--space-3xl);
}

.rich-editor li,
.blog-post-content li {
  display: list-item;
  justify-content: initial;
  margin-bottom: var(--space-sm);
}

.rich-editor li:hover,
.blog-post-content li:hover {
  background: transparent;
}

.rich-editor blockquote,
.blog-post-content blockquote {
  margin: var(--space-3xl) 0;
  padding: 0.8rem var(--space-3xl);
  border-left: 0.25rem solid var(--second-highlight-color);
  border-radius: var(--radius-sm);
  background: var(--overlay-soft);
  color: var(--text-muted);
}

.rich-editor pre,
.blog-post-content pre {
  margin: var(--space-3xl) 0;
  padding: var(--space-3xl);
  border-radius: var(--radius-md);
  background: var(--overlay-heavy);
  color: var(--text-primary);
  overflow-x: auto;
}

.rich-editor code,
.blog-post-content code {
  padding: var(--space-3xs) var(--space-sm);
  border-radius: var(--radius-2xs);
  background: var(--overlay-strong);
  color: var(--prime-highlight-color);
  font-family: var(--font-mono);
}

/* Contact */
.contact-info-card p {
  margin-top: var(--space-xl);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--line-readable);
}

.contact-info-list {
  margin-top: var(--space-3xl);
  display: grid;
  gap: var(--space-xl);
}

.contact-info-list div,
.contact-message-meta div,
.contact-message-body {
  border: 0.1em solid var(--border-accent-mid);
  border-radius: var(--radius-md);
  background: var(--overlay-soft);
}

.contact-info-list div,
.contact-message-meta div {
  padding: var(--space-xl);
}

.contact-info-list span,
.contact-message-meta span {
  display: block;
  margin-bottom: var(--space-xs);
  color: var(--second-highlight-color);
  font-family: var(--font-body);
  font-size: var(--text-xxs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-info-list strong,
.contact-message-meta strong,
.contact-message-meta a {
  display: block;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

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

.contact-admin-message-link.unread {
  border-color: var(--prime-color1);
  box-shadow: 0 0 0 0.08rem #f3b52940;
}

.contact-message-meta {
  margin-bottom: var(--space-3xl);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xl);
}

.contact-message-body {
  padding: var(--space-3xl);
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.7;
  user-select: text;
}

.contact-reply-button {
  min-height: 2.45rem;
  padding: 0.65rem var(--space-3xl);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--prime-color1);
  color: var(--second-color2);
  font-family: var(--font-display);
  text-decoration: none;
}

.contact-reply-button:hover {
  background: var(--prime-color2);
  color: var(--third-color1);
}

.contact-ip-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label label"
    "ip action";
  gap: var(--space-sm) var(--space-xl);
  align-items: center;
}

.contact-ip-box > span {
  grid-area: label;
}

.contact-ip-box > strong {
  grid-area: ip;
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-ip-blacklist-form {
  grid-area: action;
  margin: 0;
  justify-self: end;
}

.ip-blacklist-button {
  width: fit-content;
  margin: 0;
  padding: var(--space-md) 0.65rem;
  border-radius: var(--radius-sm);
  box-shadow: none;
  font-size: var(--text-xs);
  cursor: pointer;
  white-space: nowrap;
}

.ip-blacklisted-label {
  grid-area: action;
  justify-self: end;
  width: fit-content;
  margin: 0;
  padding: var(--space-sm) 0.55rem;
  border: 0.1em solid var(--danger-border);
  border-radius: var(--radius-pill);
  background: var(--danger-bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  line-height: 1;
  white-space: nowrap;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--overlay-weak);
}

::-webkit-scrollbar-thumb {
  background: var(--border-accent-soft);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-accent-strong);
  border: 0.1em solid var(--border-accent-strong);
}

/* Animations */
@keyframes slide-and-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glowup {
  from {
    border: 0.1em solid var(--border-accent-soft);
  }

  to {
    border: 0.1em solid var(--border-accent-strong);
  }
}

@keyframes bg-animation {
  0% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -5%); }
  20% { transform: translate(-10%, 5%); }
  30% { transform: translate(5%, -10%); }
  40% { transform: translate(-5%, 15%); }
  50% { transform: translate(-10%, 5%); }
  60% { transform: translate(15%, 0); }
  70% { transform: translate(0, 10%); }
  80% { transform: translate(-15%, 0); }
  90% { transform: translate(10%, 5%); }
  100% { transform: translate(5%, 0); }
}

/* Responsive */
@media (min-width: 600px) {
  .banner {
    padding: var(--space-3xl) 2rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }

  .top-float-name {
    background-position: left center;
  }

  .top-float {
    width: auto;
    justify-content: flex-end;
    flex: 1 1 auto;
  }

  .greeting {
    width: auto;
    text-align: right;
    flex: 0 0 auto;
  }
}

@media (min-width: 900px) {
  .blog-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .blog-card-meta,
  .blog-card h2,
  .blog-tech-tags,
  .blog-card p,
  .blog-read-more {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1100px) {
  .blog-filter-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .blog-filter-panel .portfolio-filter-summary {
    grid-column: 1 / -1;
    justify-self: start;
    text-align: left;
  }
}

@media (max-width: 900px) {
  .manage-projects-layout,
  .manage-blog-layout,
  .manage-contact-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .project-admin-sidebar,
  .blog-admin-sidebar,
  .contact-admin-sidebar {
    position: static;
  }

  .project-admin-sidebar {
    max-height: 22rem;
  }

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

  .portfolio-filter-summary {
    justify-self: start;
    text-align: left;
  }
}

@media (max-width: 700px) {
  .blog-filter-panel {
    grid-template-columns: 1fr;
  }

  .blog-filter-panel .portfolio-reset-button,
  .blog-filter-reset {
    width: 100%;
  }

  .blog-filter-panel .portfolio-filter-summary {
    justify-self: center;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .portfolio-page,
  .blog-page,
  .blog-post-page,
  .manage-projects-page,
  .manage-blog-page,
  .contact-page,
  .manage-contact-page {
    padding: var(--space-3xl);
  }

  .admin-page-title,
  .portfolio-page-title,
  .blog-page-title,
  .blog-post-title,
  .contact-page-title {
    text-align: center;
    font-size: clamp(2.5rem, 14vw, 4rem);
  }

  .admin-page-subtitle,
  .admin-kicker,
  .portfolio-page-subtitle,
  .portfolio-header .admin-kicker,
  .blog-page-subtitle,
  .blog-header .admin-kicker,
  .blog-post-header .admin-kicker,
  .contact-page-subtitle,
  .contact-header .admin-kicker {
    text-align: center;
  }

  .admin-form-grid,
  .portfolio-filter-panel,
  .contact-message-meta {
    grid-template-columns: 1fr;
  }

  .admin-actions {
    justify-content: stretch;
  }

  .admin-actions button,
  .portfolio-reset-button,
  .human-check-input {
    width: 100%;
  }

  .project-select-button,
  .blog-card h2,
  .contact-info-card h2 {
    text-align: center;
  }

  .repo-provider-preview,
  .blog-card-meta,
  .blog-tech-tags,
  .blog-post-meta,
  .rich-editor-toolbar {
    justify-content: center;
  }

  .not-found-page {
    min-height: calc(100vh - 10rem);
    padding: var(--space-3xl);
  }

  .not-found-card {
    padding: var(--space-4xl);
  }

  .not-found-copy {
    font-size: var(--text-body);
  }

  .not-found-actions {
    flex-direction: column;
    gap: var(--space-xl);
  }

  .not-found-button,
  .not-found-link {
    width: 100%;
    text-align: center;
  }

  .blog-card {
    text-align: center;
  }

  .blog-card p,
  .blog-read-more {
    margin-left: auto;
    margin-right: auto;
  }

  .rich-editor-toolbar button {
    flex: 1 1 auto;
  }

  .rich-editor {
    min-height: 16rem;
  }

  .contact-ip-box {
    grid-template-columns: 1fr;
    grid-template-areas:
      "label"
      "ip"
      "action";
  }

  .contact-ip-blacklist-form,
  .ip-blacklisted-label {
    justify-self: start;
  }
}
.login-options {
  margin: var(--space-sm) 0 var(--space-md);
  display: grid;
  gap: var(--space-xs);
}

.login-check {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  cursor: pointer;
}

.login-check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--color-primary);
}

.login-check span {
  line-height: 1.4;
}
.project-select-with-status {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: var(--space-xs);
}

.project-visibility-cell {
  width: 1.45rem;
  height: 1.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 900;
  line-height: 1;
}

.project-visibility-cell.project-visible {
  background: var(--color-success-bg);
  border: var(--border-size) solid var(--color-success-border);
  color: var(--color-success-text);
}

.project-visibility-cell.project-hidden {
  background: var(--color-danger-bg);
  border: var(--border-size) solid var(--color-danger-border);
  color: var(--color-text);
}

.project-select-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.blog-pagination {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-sm);
  align-items: center;
  border: var(--border-size) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--surface-panel-soft);
  box-shadow: var(--shadow-panel-soft);
}

.blog-pagination-link,
.blog-pagination-number {
  min-height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .55rem .8rem;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  border: var(--border-size) solid var(--color-border-soft);
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  text-decoration: none;
  line-height: 1;
}

.blog-pagination-link:hover,
.blog-pagination-number:hover {
  background: var(--surface-blue-hover);
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.blog-pagination-disabled {
  opacity: .45;
  cursor: not-allowed;
}

.blog-pagination-disabled:hover {
  background: var(--surface-subtle);
  color: var(--color-primary);
  border-color: var(--color-border-soft);
}

.blog-pagination-pages {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.blog-pagination-number {
  width: 2.35rem;
  padding-left: .4rem;
  padding-right: .4rem;
}

.blog-pagination-number.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-bg-dark);
}

@media (max-width: 700px) {
  .blog-pagination {
    grid-template-columns: 1fr;
  }

  .blog-pagination-link,
  .blog-pagination-pages {
    width: 100%;
  }

  .blog-pagination-pages {
    justify-content: center;
  }
}
/* OS / Platform selector for Manage Projects */

.os-icon-selector {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  border: var(--border-size) solid var(--color-border-soft);
}

.os-icon-option {
  cursor: pointer;
  user-select: none;
}

.os-icon-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.os-icon-option > span {
  min-height: 4.2rem;
  min-width: 5.6rem;
  display: grid;
  place-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  background: transparent;
  border: var(--border-size) solid transparent;
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  line-height: 1;
  opacity: .45;
  transform: scale(.92);
  transition:
    opacity var(--transition-fast),
    transform var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    color var(--transition-fast);
}

.os-icon-option img {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
  flex: 0 0 auto;
}

.os-icon-option:hover > span {
  opacity: .8;
  transform: scale(1);
  background: var(--surface-blue-hover);
  border-color: var(--color-border-soft);
}

.os-icon-option input:checked + span {
  opacity: 1;
  transform: scale(1.08);
  background: var(--surface-blue-hover);
  border-color: var(--color-primary);
  color: var(--color-text);
  box-shadow: 0 0 0 .12rem var(--color-border-soft);
}

.os-icon-option input:focus-visible + span {
  outline: .15rem solid var(--color-border-strong);
  outline-offset: .15rem;
}

/* OS pins shown on public portfolio cards */

.project-os-block {
  margin-bottom: var(--space-sm);
  padding: var(--space-sm);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-xs);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  border: var(--border-size) solid var(--color-border-soft);
}

.project-os-pin {
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .6rem;
  border-radius: var(--radius-pill);
  background: var(--surface-panel-soft);
  border: var(--border-size) solid var(--color-border-soft);
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  line-height: 1;
  white-space: nowrap;
}

.project-os-pin img {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
  flex: 0 0 auto;
}

@media (max-width: 600px) {
  .os-icon-selector {
    gap: var(--space-xs);
    padding: var(--space-sm);
  }

  .os-icon-option > span {
    min-width: 4.8rem;
    min-height: 3.8rem;
  }

  .os-icon-option img {
    width: 2rem;
    height: 2rem;
  }

  .project-os-block {
    justify-content: center;
  }
}
.project-admin-panel {
  display: block;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity var(--transition-fast),
    transform var(--transition-fast);
}

.project-admin-panel.is-hidden {
  display: none;
  opacity: 0;
  transform: translateY(1rem);
}

.project-select-button.is-selected {
  background: var(--surface-blue-hover);
  color: var(--color-text);
  border-color: var(--color-border-strong);
  box-shadow: 0 0 0 .12rem var(--color-border-soft);
}

.secondary-button {
  background: var(--surface-subtle);
  color: var(--color-primary);
  border: var(--border-size) solid var(--color-border-soft);
  box-shadow: none;
}

.secondary-button:hover {
  background: var(--surface-blue-hover);
  color: var(--color-text);
  border-color: var(--color-border-strong);
}
/* Make bold text visually obvious inside the rich editor and public blog post. */
.rich-editor strong,
.rich-editor b,
.blog-post-content strong,
.blog-post-content b {
  font-weight: 800;
}
/* Business lead admin */
.business-lead-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 25rem) minmax(0, 1fr);
  gap: var(--space-4xl);
  align-items: start;
}

.business-lead-list {
  position: sticky;
  top: var(--space-3xl);
  display: grid;
  gap: var(--space-md);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: var(--space-xl);
  border: 0.1em solid var(--border-accent-soft);
  border-radius: var(--radius-xl);
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
}

.business-lead-item {
  display: grid;
  gap: 0.28rem;
  padding: 0.8rem;
  border: 0.1em solid var(--border-accent-soft);
  border-radius: var(--radius-md);
  background: var(--overlay-soft);
  color: var(--text-muted);
  font-family: var(--font-body);
  text-decoration: none;
}

.business-lead-item:hover,
.business-lead-item.is-selected {
  border-color: var(--border-accent-mid);
  background: var(--overlay-mid);
  color: var(--text-primary);
}

.business-lead-item__top {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: start;
}

.business-lead-item strong {
  color: var(--prime-color1);
}

.business-lead-item em {
  display: inline-flex;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(243, 181, 41, 0.14);
  color: var(--second-highlight-color);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.business-lead-detail {
  display: grid;
  gap: var(--space-3xl);
}

.business-detail-header,
.business-admin-card {
  padding: var(--space-3xl);
  border: 0.1em solid var(--border-accent-soft);
  border-radius: var(--radius-xl);
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
}

.business-detail-header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2xl);
  align-items: center;
}

.business-detail-header h2,
.business-admin-card h3 {
  margin: 0;
  text-align: left;
}

.business-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3xl);
}

.business-admin-card dl {
  display: grid;
  gap: 0.75rem;
  margin: var(--space-xl) 0 0;
}

.business-admin-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 0.1em solid var(--border-subtle);
  padding-bottom: 0.55rem;
}

.business-admin-card dt {
  color: var(--text-muted);
  font-family: var(--font-body);
}

.business-admin-card dd {
  margin: 0;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 800;
  text-align: right;
}

.business-summary-pre {
  white-space: pre-wrap;
  overflow-x: auto;
  color: var(--text-muted);
  font-family: var(--font-body);
  line-height: var(--line-readable);
}

.business-inline-form,
.business-note-form {
  display: grid;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.business-inline-form {
  grid-template-columns: auto minmax(12rem, 1fr) auto;
  align-items: center;
}

.business-inline-form label,
.business-note-form label {
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 800;
}

.business-inline-form select,
.business-note-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 0.1em solid var(--border-accent-soft);
  border-radius: var(--radius-md);
  background: var(--overlay-mid);
  color: var(--text-primary);
  font-family: var(--font-body);
}

.business-notes-list,
.business-history-list {
  display: grid;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.business-notes-list article,
.business-history-list p,
.business-empty-state {
  margin: 0;
  padding: var(--space-lg);
  border: 0.1em solid var(--border-accent-soft);
  border-radius: var(--radius-md);
  background: var(--overlay-soft);
  color: var(--text-muted);
  font-family: var(--font-body);
  line-height: var(--line-readable);
}

.business-notes-list small,
.business-history-list span {
  color: var(--text-faint);
}

.business-notes-list p {
  margin: 0.4rem 0 0;
}

@media (max-width: 60rem) {
  .business-lead-layout,
  .business-detail-grid {
    grid-template-columns: 1fr;
  }

  .business-lead-list {
    position: static;
    max-height: none;
  }

  .business-detail-header,
  .business-inline-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

/* Business proposal admin */
.business-proposal-form {
  display: grid;
  gap: 1rem;
}

.business-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.business-form-grid label,
.business-wide-label,
.business-checkbox-label {
  display: grid;
  gap: 0.45rem;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.business-form-grid input,
.business-form-grid select,
.business-wide-label textarea,
.business-checkbox-label input,
.business-inline-form input {
  border: 1px solid rgba(243, 181, 41, 0.22);
  border-radius: 12px;
  background: rgba(8, 10, 18, 0.64);
  color: #f5f2e8;
  padding: 0.75rem 0.85rem;
  font: inherit;
}

.business-wide-label textarea {
  min-height: 7rem;
  resize: vertical;
}

.business-wide-label span {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
}

.business-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.business-checkbox-label input {
  width: 1.1rem;
  height: 1.1rem;
}

.business-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: flex-end;
}

.business-form-errors ul {
  margin: 0.6rem 0 0;
  color: #ffd1d1;
  line-height: 1.55;
}

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

  .business-form-actions {
    justify-content: stretch;
  }

  .business-form-actions .btn,
  .business-form-actions .secondary-button {
    width: 100%;
    justify-content: center;
  }
}
