:root {
  --ink: #102a33;
  --muted: #5a6d73;
  --line: #dce9ea;
  --paper: #f6fbfb;
  --white: #ffffff;
  --teal: #00a6a6;
  --aqua: #67d5cc;
  --blue: #176b87;
  --deep: #083344;
  --shadow: 0 18px 50px rgba(8, 51, 68, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
p { color: var(--muted); }
i { line-height: 1; }
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 100%;
  height: 4px;
  background: transparent;
  pointer-events: none;
}
.reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--aqua), var(--blue));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .08s linear;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 72px);
  background: rgba(246, 251, 251, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 220px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--teal));
  font-weight: 800;
}
.brand-logo {
  overflow: hidden;
  background: transparent;
}
.brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand small { display: block; color: var(--muted); font-size: 12px; line-height: 1.25; }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a, .admin-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--deep);
  font-weight: 650;
  font-size: 14px;
}
.site-nav a:hover, .admin-nav a:hover { background: rgba(0, 166, 166, .1); }
.nav-admin { border: 1px solid var(--line); background: var(--white); }
.nav-logout { color: #8a1f1f; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.nav-toggle { display: none; align-items: center; gap: 8px; }

.hero, .page-hero, .cv-hero, .section, .timeline, .project-list, .cards, .contact-grid, .portfolio-grid, .project-detail, .home-cta {
  width: min(1120px, calc(100% - 36px));
  margin-inline: auto;
}
.hero {
  position: relative;
  min-height: 76vh;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 42px;
  align-items: center;
  padding: 74px 0 46px;
}
.has-3d { isolation: isolate; }
.hero-three {
  position: absolute;
  inset: 0 auto auto 50%;
  z-index: -1;
  width: 100vw;
  height: 100%;
  min-height: 620px;
  transform: translateX(-50%);
  opacity: .9;
  pointer-events: none;
}
.hero-copy, .hero-panel {
  animation: rise-in .72s ease both;
}
.hero-panel {
  animation-delay: .12s;
}
.hero h1, .page-hero h1 {
  margin: 0;
  max-width: 860px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: .96;
  letter-spacing: 0;
  color: var(--deep);
}
.lead, .page-hero p { max-width: 760px; font-size: 19px; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero-actions, .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 750;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn.primary { color: var(--white); background: var(--deep); border-color: var(--deep); }
.btn.ghost { background: var(--white); color: var(--deep); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(8, 51, 68, .12); }
.text-link { color: var(--blue); font-weight: 750; text-decoration: underline; text-underline-offset: 4px; }
.hero-panel, .contact-card, .admin-card, .card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.hero-panel { padding: 26px; }
.hero-panel dl { margin: 0; display: grid; gap: 16px; }
.hero-panel div { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.hero-panel div:last-child { border-bottom: 0; padding-bottom: 0; }
dt { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
dd { margin: 0; font-weight: 800; color: var(--deep); }

.section { padding: 62px 0; }
.section-head { max-width: 760px; margin-bottom: 24px; }
.section-head.row, .admin-title.row { display: flex; justify-content: space-between; gap: 20px; align-items: end; max-width: none; }
h2, h3 { color: var(--deep); line-height: 1.18; }
.value-grid, .cards, .admin-grid, .private-apps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.value-grid article, .project-list article {
  padding: 24px;
  border-top: 3px solid var(--aqua);
  background: var(--white);
  transition: transform .18s ease, box-shadow .18s ease;
}
.value-grid article:hover, .project-list article:hover, .card:hover, .app-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(8, 51, 68, .1);
}
.feature-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal), var(--blue));
}
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
.home-projects {
  align-items: center;
  gap: 54px;
}
.home-projects-copy {
  position: sticky;
  top: 110px;
}
.home-projects-copy h2 {
  margin-top: 0;
  font-size: clamp(30px, 4vw, 46px);
}
.home-projects-grid {
  display: grid;
  gap: 18px;
}
.home-project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(8, 51, 68, .08);
  transition: transform .18s ease, box-shadow .18s ease;
}
.home-project-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(8, 51, 68, .13);
}
.home-project-card a {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 210px;
}
.home-project-card figure {
  margin: 0;
  min-height: 100%;
  background: #dce9ea;
}
.home-project-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-project-card div:not(.tags) {
  display: grid;
  align-content: center;
  padding: 24px;
}
.home-project-card h3 {
  margin: 12px 0 8px;
  font-size: 26px;
}
.home-project-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.compact-tags {
  margin-top: 14px;
}
.compact-tags span {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-list { display: grid; gap: 18px; padding-bottom: 70px; }
.project-list.compact { width: auto; margin: 0; padding: 0; }
.home-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-top: 18px;
  padding: 30px;
  border: 1px solid rgba(103, 213, 204, .34);
  border-radius: 8px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(8, 51, 68, .96), rgba(23, 107, 135, .94)),
    var(--deep);
  box-shadow: var(--shadow);
}
.home-cta h2 {
  max-width: 780px;
  margin: 0;
  color: var(--white);
  font-size: clamp(26px, 4vw, 42px);
}
.home-cta p:not(.eyebrow) {
  max-width: 680px;
  margin: 10px 0 0;
  color: rgba(255,255,255,.72);
}
.home-cta .btn.primary {
  color: var(--deep);
  border-color: var(--aqua);
  background: var(--aqua);
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding-bottom: 76px;
}
.portfolio-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(8, 51, 68, .08);
  transition: transform .18s ease, box-shadow .18s ease;
}
.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(8, 51, 68, .13);
}
.portfolio-card figure {
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #dce9ea;
}
.portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .28s ease;
}
.portfolio-card:hover img { transform: scale(1.04); }
.portfolio-card-body { padding: 20px; }
.portfolio-card-body h2 { margin: 10px 0; font-size: 22px; }
.portfolio-card-body > p {
  display: -webkit-box;
  min-height: 4.35em;
  margin-bottom: 14px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.portfolio-card-body .tags {
  min-height: 34px;
  margin-top: 12px;
}
.portfolio-card-body .tags span {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-card-skills {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.project-card-skills strong {
  display: block;
  color: var(--deep);
  font-size: 13px;
}
.project-card-skills p {
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.project-detail { padding: 56px 0 86px; }
.project-detail-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: end;
  margin: 24px 0 28px;
}
.project-detail-head h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
  color: var(--deep);
}
.project-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.project-carousel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.carousel-viewport {
  position: relative;
  aspect-ratio: 16 / 8.5;
  background: #dce9ea;
}
.carousel-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
.carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.carousel-slide figcaption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  max-width: min(460px, calc(100% - 36px));
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--white);
  background: rgba(8, 51, 68, .82);
  font-weight: 700;
}
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px;
}
.carousel-controls button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--deep);
  background: var(--white);
  cursor: pointer;
}
.carousel-dots { display: flex; gap: 7px; }
.carousel-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  background: #c9dadd;
}
.carousel-dots button.is-active { background: var(--teal); }
.project-story {
  margin-top: 30px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.project-skills-panel {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.project-skills-panel h3 {
  margin: 0 0 12px;
}
.open-source-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--blue);
  background: rgba(103, 213, 204, .18);
  font-weight: 800;
}
.project-list article span, .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(103, 213, 204, .22);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tags span {
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef7f7;
  color: var(--deep);
  font-size: 13px;
  font-weight: 650;
}
.card { padding: 24px; box-shadow: none; transition: transform .18s ease, box-shadow .18s ease; }
.card time, .article time { color: var(--muted); font-size: 13px; font-weight: 700; }
.blog-grid { padding-bottom: 70px; }
.blog-home-hero h1 {
  max-width: 980px;
}
.blog-home-hero {
  position: relative;
  isolation: isolate;
  min-height: 560px;
  display: grid;
  align-content: center;
  overflow: hidden;
}
.blog-three {
  opacity: .34;
}
.blog-section {
  padding-top: 34px;
}
.blog-intro-grid,
.resume-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
  padding-top: 8px;
  padding-bottom: 28px;
}
.blog-intro-card,
.resume-main,
.resume-side {
  min-height: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(8, 51, 68, .06);
}
.blog-intro-card h2,
.resume-main h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
}
.blog-topic-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.blog-topic-list li {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 14px 15px;
  border: 1px solid rgba(103, 213, 204, .34);
  border-radius: 8px;
  color: var(--deep);
  background: rgba(246, 251, 251, .9);
  font-size: 15px;
  font-weight: 800;
}
.blog-topic-list i {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 8px;
  color: var(--teal);
  background: rgba(103, 213, 204, .16);
}
.resume-summary {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
}
.resume-main p:last-child {
  margin-bottom: 0;
}
.resume-side {
  display: grid;
  gap: 12px;
}
.resume-side div {
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}
.resume-side div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.resume-side span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
.resume-side strong {
  display: block;
  margin-top: 4px;
  color: var(--deep);
  line-height: 1.25;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-top: 10px;
  padding-bottom: 78px;
}
.blog-empty {
  display: grid;
  justify-items: start;
  gap: 8px;
  padding: 26px;
  border: 1px dashed rgba(0, 166, 166, .45);
  border-radius: 8px;
  background: rgba(255,255,255,.68);
}
.blog-empty i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal), var(--blue));
}
.blog-empty h3,
.blog-empty p {
  margin: 0;
}
.blog-card {
  overflow: hidden;
  padding: 0;
}
.blog-card a {
  display: grid;
  height: 100%;
}
.blog-card figure {
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #dce9ea;
}
.blog-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .28s ease;
}
.blog-card:hover img {
  transform: scale(1.04);
}
.blog-card div {
  padding: 22px;
}
.blog-card h2 {
  margin: 9px 0 8px;
  font-size: 23px;
}
.blog-card p {
  margin: 0;
}
.page-hero { padding: 70px 0 42px; }
.cv-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 34px;
  align-items: end;
  min-height: 560px;
  padding: 78px 0 54px;
}
.cv-hero > div,
.hero-copy,
.timeline-body {
  min-width: 0;
}
.cv-hero h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: .98;
  color: var(--deep);
}
.cv-hero p {
  max-width: 760px;
  font-size: 19px;
}
.cv-three {
  position: absolute;
  inset: 0 auto auto 50%;
  z-index: -1;
  width: 100vw;
  height: 100%;
  min-height: 560px;
  transform: translateX(-50%);
  opacity: .72;
  pointer-events: none;
}
.current-experience {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.current-experience span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.current-experience h2 {
  margin: 14px 0 8px;
}
.current-experience strong {
  color: var(--deep);
}
.timeline { padding-bottom: 80px; }
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 28px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  --timeline-dot-left: 185px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: var(--timeline-dot-left);
  top: 36px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--aqua);
  transform: translateX(-50%);
  box-shadow: 0 0 0 6px rgba(103, 213, 204, .16);
}
.timeline-item.is-current {
  padding: 30px 24px;
  border: 1px solid rgba(0, 166, 166, .28);
  border-radius: 8px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 14px 34px rgba(8, 51, 68, .08);
  --timeline-dot-left: 196px;
}
.timeline-date {
  display: grid;
  align-content: start;
  gap: 8px;
  color: var(--blue);
  font-weight: 850;
}
.timeline-date small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--deep);
  background: rgba(103, 213, 204, .2);
  font-size: 12px;
}
.timeline-body h2 { margin-top: 0; }
.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -4px 0 12px;
}
.timeline-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}
.article {
  width: min(820px, calc(100% - 36px));
  margin: 70px auto;
  padding: 34px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.article h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.02; }
.article-wide {
  width: min(1180px, calc(100% - 36px));
  padding: 0;
  border: 0;
  background: transparent;
}
.article-header {
  max-width: 860px;
  margin-top: 24px;
}
.article-header h1 {
  margin: 10px 0 14px;
}
.article-header p {
  margin: 0;
  font-size: 19px;
}
.article-cover {
  margin: 28px 0 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #dce9ea;
  box-shadow: var(--shadow);
}
.article-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}
.article-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 820px);
  gap: 42px;
  align-items: start;
}
.article-toc {
  position: sticky;
  top: 96px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 12px 30px rgba(8, 51, 68, .07);
  backdrop-filter: blur(14px);
}
.article-toc strong {
  display: block;
  margin-bottom: 12px;
  color: var(--deep);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.article-toc nav {
  position: relative;
  display: grid;
  gap: 8px;
  padding-left: 14px;
}
.article-toc nav::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--line);
}
.article-toc a {
  position: relative;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
}
.article-toc a::before {
  content: "";
  position: absolute;
  left: -14px;
  top: .65em;
  width: 9px;
  height: 1px;
  background: var(--line);
}
.article-toc a:hover {
  color: var(--blue);
}
.article-toc .toc-level-3 {
  padding-left: 16px;
  font-size: 13px;
  font-weight: 700;
}
.article-toc .toc-level-4 {
  padding-left: 30px;
  font-size: 12px;
  font-weight: 700;
}
.article-body {
  min-width: 0;
  font-size: 18px;
  line-height: 1.68;
  color: #29444c;
}
.article-body p {
  margin: .58em 0;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 24px;
  padding-bottom: 80px;
}
form { display: grid; gap: 14px; }
label { display: grid; gap: 7px; color: var(--deep); font-weight: 750; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
}
textarea { resize: vertical; }
.ajax-form, .contact-card { padding: 24px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; }
.contact-card h2 {
  margin-top: 0;
}
.contact-topics,
.contact-links {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.contact-topics span,
.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--deep);
  font-weight: 750;
}
.contact-topics span {
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef7f7;
}
.contact-links {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.contact-links i,
.contact-topics i {
  color: var(--teal);
}
.hp { position: absolute; left: -9999px; }
.form-status, .alert { color: var(--blue); font-weight: 750; }
.site-footer {
  margin-top: 42px;
  border-top: 1px solid rgba(103, 213, 204, .24);
  color: var(--white);
  background:
    radial-gradient(circle at 18% 0%, rgba(103, 213, 204, .18), transparent 34%),
    linear-gradient(135deg, #052734 0%, #083344 54%, #0b4c5b 100%);
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) .7fr .7fr .85fr;
  gap: 34px;
  width: min(1200px, calc(100% - 36px));
  margin-inline: auto;
  padding: 44px 0 34px;
}
.footer-profile p {
  max-width: 520px;
  color: rgba(255,255,255,.72);
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.footer-brand .brand-mark {
  box-shadow: 0 16px 32px rgba(0, 166, 166, .22);
}
.footer-brand small {
  display: block;
  max-width: 320px;
  color: rgba(255,255,255,.64);
  font-size: 12px;
  line-height: 1.35;
}
.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.footer-socials a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  color: var(--white);
  background: rgba(255,255,255,.07);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.footer-socials a:hover {
  transform: translateY(-2px);
  border-color: rgba(103, 213, 204, .55);
  background: rgba(103, 213, 204, .14);
}
.footer-column,
.footer-note {
  display: grid;
  align-content: start;
  gap: 10px;
}
.footer-column h2 {
  margin: 0 0 8px;
  color: var(--white);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.footer-column a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(255,255,255,.76);
  font-weight: 700;
}
.footer-column a:hover {
  color: var(--white);
}
.footer-column i {
  color: var(--aqua);
}
.footer-note {
  padding: 18px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.06);
}
.footer-newsletter {
  padding: 0;
  border: 0;
  background: transparent;
}
.footer-note h2 {
  margin: 0;
  color: var(--white);
  font-size: 22px;
}
.footer-note p {
  margin: 0;
  color: rgba(255,255,255,.7);
}
.footer-newsletter-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.footer-newsletter-form label {
  display: block;
  color: rgba(255,255,255,.86);
  font-size: 13px;
}
.footer-newsletter-form input {
  min-height: 42px;
  border-color: rgba(255,255,255,.14);
  color: var(--white);
  background: rgba(255,255,255,.08);
}
.footer-newsletter-form input::placeholder {
  color: rgba(255,255,255,.52);
}
.footer-newsletter-form input:focus {
  outline: 0;
  border-color: rgba(103, 213, 204, .8);
  box-shadow: 0 0 0 3px rgba(103, 213, 204, .16);
}
.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--deep);
  background: var(--aqua);
  font-weight: 850;
  border: 0;
  cursor: pointer;
  font: inherit;
}
.footer-newsletter .form-status {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 0;
  color: rgba(255,255,255,.74);
  font-size: 13px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(1200px, calc(100% - 36px));
  margin-inline: auto;
  padding: 16px 0 22px;
  border-top: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.58);
  font-size: 13px;
}

.admin-body { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; background: #f4f8f9; }
.auth-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(103, 213, 204, .16), transparent 28%),
    radial-gradient(circle at 88% 76%, rgba(23, 107, 135, .12), transparent 30%),
    #f4f8f9;
}
.admin-sidebar { padding: 24px; border-right: 1px solid var(--line); background: var(--white); }
.admin-sidebar .brand { margin-bottom: 30px; }
.admin-nav { display: grid; gap: 4px; }
.admin-main { padding: 34px; }
.auth-main {
  display: grid;
  min-height: 100vh;
  padding: 72px clamp(18px, 5vw, 72px);
}
.admin-title { margin-bottom: 24px; }
.admin-title h1, .login-card h1 { margin: 0; font-size: clamp(30px, 4vw, 48px); color: var(--deep); }
.login-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(380px, .65fr);
  gap: 0;
  align-items: center;
  width: min(1180px, 100%);
  min-height: calc(100vh - 144px);
  margin: auto;
}
.login-back {
  position: absolute;
  left: 0;
  top: -44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--deep);
  background: var(--white);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(8, 51, 68, .08);
}
.login-visual {
  display: grid;
  align-content: center;
  min-height: 600px;
  padding: 56px;
  border-radius: 8px 0 0 8px;
  color: var(--white);
  background:
    radial-gradient(circle at 78% 20%, rgba(103, 213, 204, .38), transparent 28%),
    linear-gradient(135deg, #062b37 0%, #083344 58%, #0b6170 100%);
  box-shadow: var(--shadow);
}
.login-visual .brand-mark {
  margin-bottom: 34px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
}
.login-visual h1 {
  max-width: 620px;
  margin: 0;
  color: var(--white);
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1;
}
.login-visual p {
  max-width: 560px;
  color: rgba(255,255,255,.72);
}
.login-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.login-badges span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 8px;
  color: rgba(255,255,255,.88);
  background: rgba(255,255,255,.08);
  font-weight: 800;
  font-size: 13px;
}
.login-card {
  align-self: center;
  display: grid;
  align-content: center;
  max-width: none;
  width: 100%;
  min-height: 600px;
  margin: 0;
  padding: 42px;
  border-radius: 0 8px 8px 0;
  box-shadow: var(--shadow);
}
.login-card h2 {
  margin: 0;
  font-size: 38px;
  line-height: 1.05;
}
.login-card form {
  margin-top: 18px;
}
.two-factor-shell {
  position: relative;
  width: min(640px, 100%);
  margin: auto;
}
.two-factor-card {
  border-radius: 8px;
  min-height: auto;
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stats article { position: relative; padding: 22px; border-radius: 8px; background: var(--deep); color: var(--white); overflow: hidden; }
.stats article > i {
  position: absolute;
  right: 18px;
  top: 18px;
  color: rgba(255,255,255,.18);
  font-size: 34px;
}
.stats span { display: block; font-size: 38px; font-weight: 850; }
.stats p { margin: 0; color: rgba(255,255,255,.75); }
.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, .8fr) minmax(240px, .8fr);
  gap: 16px;
  margin-bottom: 18px;
}
.analytics-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(8, 51, 68, .06);
  margin-bottom: 18px;
}
.analytics-panel h2 {
  margin-top: 0;
}
.analytics-wide {
  min-width: 0;
}
.analytics-bars {
  display: grid;
  grid-template-columns: repeat(14, minmax(22px, 1fr));
  align-items: end;
  gap: 8px;
  min-height: 220px;
  padding-top: 18px;
}
.analytics-bar {
  display: grid;
  align-items: end;
  gap: 8px;
  min-height: 190px;
}
.analytics-bar span {
  display: block;
  min-height: 4px;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, var(--aqua), var(--blue));
}
.analytics-bar small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
.metric-list {
  display: grid;
  gap: 9px;
}
.metric-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.metric-list div:last-child {
  border-bottom: 0;
}
.metric-list span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.metric-list strong {
  flex: 0 0 auto;
  color: var(--deep);
}
.analytics-table {
  margin-top: 12px;
}
.seo-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.seo-check-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fcfc;
}
.seo-check-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}
.seo-check-head h3 {
  margin: 0;
  font-size: 18px;
}
.seo-check-head span {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--deep);
  background: rgba(103, 213, 204, .22);
  font-size: 12px;
  font-weight: 850;
}
.seo-check-card p {
  margin: 0;
  font-size: 13px;
}
.seo-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.seo-checks small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  font-weight: 800;
}
.seo-checks .is-ok {
  color: #12643b;
  background: #e8f7ef;
}
.seo-checks .is-missing {
  color: #9b2c2c;
  background: #fff0f0;
}
.empty-note {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}
.auth-page {
  padding-top: 68px;
}
.reader-auth-wrap {
  display: grid;
  justify-items: start;
  padding-top: 18px;
}
.reader-auth-card {
  width: min(520px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.reader-auth-card form {
  display: grid;
  gap: 16px;
}
.reader-switch {
  margin: 18px 0 0;
}
.alert {
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 750;
}
.alert.error {
  color: #8a1f1f;
  background: #fff0f0;
}
.alert.success {
  color: #12643b;
  background: #e8f7ef;
}
.article-engagement {
  margin-top: 42px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.engagement-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.engagement-head h2 {
  margin: 0;
}
.like-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--deep);
  background: var(--white);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}
.like-button i {
  color: var(--muted);
}
.like-button.is-liked {
  border-color: rgba(0, 166, 166, .28);
  background: rgba(103, 213, 204, .18);
}
.like-button.is-liked i {
  color: #cc3366;
}
.token-give-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fcfc, rgba(103, 213, 204, .14));
}
.token-give-card > div {
  display: grid;
  gap: 4px;
  color: var(--muted);
}
.token-give-card i,
.comment-token-row i {
  color: var(--blue);
}
.token-give-card strong {
  color: var(--deep);
}
.token-give-card form,
.comment-token-row form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.token-give-card input,
.comment-token-row input {
  width: 76px;
  min-height: 42px;
}
.comments-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fcfc;
}
.comment-count {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--deep);
  background: rgba(103, 213, 204, .22);
  font-weight: 900;
}
.comment-wallet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}
.comment-wallet strong {
  color: var(--deep);
}
.comment-form {
  display: grid;
  gap: 12px;
}
.comment-form textarea {
  resize: vertical;
}
.comment-login {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.comment-login p {
  margin: 0;
}
.comment-list {
  display: grid;
  gap: 12px;
}
.comment-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.comment-card.is-reply {
  background: #f8fcfc;
}
.comment-card .comment-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.comment-card time {
  color: var(--muted);
  font-size: 13px;
}
.comment-card p {
  margin: 0;
}
.comment-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.comment-author img,
.comment-author > span,
.profile-avatar,
.leaderboard-avatar {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  overflow: hidden;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal), var(--blue));
  font-weight: 900;
}
.comment-author img,
.leaderboard-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.comment-token-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.comment-token-row > span {
  color: var(--deep);
  font-weight: 850;
}
.comment-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.comment-token-row button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--deep);
  background: var(--white);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}
.interaction-status {
  display: block;
  width: 100%;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}
.interaction-status.is-error {
  color: #b42318;
}
.reply-details {
  position: relative;
}
.reply-details summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--deep);
  background: var(--white);
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}
.reply-details summary::-webkit-details-marker {
  display: none;
}
.reply-form {
  width: min(520px, calc(100vw - 48px));
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fcfc;
}
.comment-replies {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-left: 18px;
  border-left: 3px solid rgba(103, 213, 204, .42);
}
.token-event-list {
  display: grid;
  gap: 10px;
  margin: -8px 0 24px;
}
.token-event {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fcfc;
}
.token-event img,
.token-event > span {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal), var(--blue));
  font-weight: 900;
}
.token-event img {
  object-fit: cover;
}
.token-event p {
  margin: 0;
  color: var(--muted);
}
.token-event strong {
  color: var(--deep);
}
.profile-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.profile-card,
.profile-panel,
.leaderboard-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.profile-card {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
  padding: 22px;
}
.profile-avatar {
  width: 86px;
  height: 86px;
  font-size: 32px;
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-card h2,
.profile-card p {
  margin: 0;
}
.token-wallet {
  display: grid;
  gap: 3px;
  padding: 14px;
  border-radius: 8px;
  color: var(--deep);
  background: #eef7f7;
}
.token-wallet strong {
  font-size: 34px;
  line-height: 1;
}
.token-wallet span,
.profile-card p {
  color: var(--muted);
}
.profile-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.profile-main {
  display: grid;
  gap: 18px;
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
}
.profile-stats article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fcfc;
}
.profile-stats strong {
  display: block;
  color: var(--deep);
  font-size: 28px;
}
.profile-stats span {
  color: var(--muted);
  font-weight: 750;
}
.profile-form {
  max-width: none;
}
.profile-form h2 {
  margin: 0;
}
.profile-panel {
  padding: 20px;
}
.profile-list {
  display: grid;
  gap: 10px;
}
.profile-list article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fcfc;
}
.profile-list p {
  margin: 6px 0;
}
.profile-list small {
  color: var(--muted);
  font-weight: 750;
}
.token-ledger-row {
  border-left: 4px solid var(--line);
}
.token-ledger-row.is-credit {
  border-left-color: var(--teal);
}
.token-ledger-row.is-debit {
  border-left-color: #f4a261;
}
.leaderboard-wrap {
  padding-top: 24px;
}
.leaderboard-list {
  display: grid;
  gap: 12px;
}
.leaderboard-card {
  display: grid;
  grid-template-columns: 64px 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
}
.leaderboard-rank {
  color: var(--blue);
  font-size: 22px;
  font-weight: 900;
}
.leaderboard-card h2,
.leaderboard-card p {
  margin: 0;
}
.leaderboard-card p {
  color: var(--muted);
}
.leaderboard-score {
  display: grid;
  justify-items: end;
  gap: 2px;
}
.leaderboard-score strong {
  color: var(--deep);
  font-size: 30px;
}
.leaderboard-score span,
.leaderboard-score small {
  color: var(--muted);
  font-weight: 800;
}
.community-grid {
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, .7fr);
}
.admin-comment-list {
  display: grid;
  gap: 12px;
}
.admin-comment-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fcfc;
}
.admin-comment-card header,
.admin-comment-card footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}
.admin-comment-card header span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
.admin-comment-card p {
  margin: 0;
}
.status-pill {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}
.status-pill.is-ok {
  color: #12643b;
  background: #e8f7ef;
}
.status-pill.is-muted {
  color: var(--muted);
  background: #eef7f7;
}
.admin-card { display: block; padding: 22px; transition: transform .18s ease, box-shadow .18s ease; }
.admin-card > i { color: var(--teal); font-size: 22px; }
.admin-card:hover { transform: translateY(-3px); }
.app-store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}
.app-tile {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(8, 51, 68, .08);
  transition: transform .18s ease, box-shadow .18s ease;
}
.app-launch {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}
.app-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal), var(--blue));
  font-size: 30px;
  font-weight: 850;
  overflow: hidden;
  box-shadow: inset 0 0 22px rgba(255,255,255,.22), 0 12px 24px rgba(23, 107, 135, .18);
}
.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.app-launch strong { color: var(--deep); line-height: 1.2; }
.app-launch small { color: var(--muted); }
.app-tile p {
  margin: 0;
  font-size: 14px;
}
.admin-form {
  max-width: 880px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.post-editor-form {
  max-width: none;
  width: 100%;
}
.project-form {
  max-width: none;
}
.cover-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
  align-items: stretch;
}
.cover-upload-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  grid-column: 1 / -1;
  gap: 14px;
}
.cover-upload-head,
.cover-url,
.gallery-upload > label {
  grid-column: 1 / -1;
}
.cover-upload-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}
.cover-upload-head small,
.cover-dropzone small,
.gallery-dropzone small {
  color: var(--muted);
}
.cover-dropzone,
.gallery-dropzone {
  position: relative;
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 172px;
  padding: 24px;
  border: 1px dashed rgba(0, 166, 166, .55);
  border-radius: 8px;
  color: var(--deep);
  background: linear-gradient(135deg, rgba(103, 213, 204, .12), rgba(255,255,255,.92));
  text-align: center;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.cover-dropzone:hover,
.cover-dropzone.is-dragging,
.gallery-dropzone:hover,
.gallery-dropzone.is-dragging {
  transform: translateY(-2px);
  border-color: var(--teal);
  background: linear-gradient(135deg, rgba(103, 213, 204, .2), rgba(255,255,255,.96));
}
.cover-dropzone input,
.gallery-dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.cover-dropzone-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal), var(--blue));
  font-size: 20px;
}
.cover-preview {
  min-height: 172px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef7f7;
  color: var(--muted);
  font-weight: 750;
}
.cover-preview img {
  width: 100%;
  height: 100%;
  min-height: 172px;
  object-fit: cover;
}
.cover-preview.is-empty {
  padding: 18px;
}
.seo-assistant-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #f8fcfc, rgba(103, 213, 204, .12));
}
.seo-assistant-panel h2 {
  margin: 0 0 6px;
  font-size: 24px;
}
.seo-assistant-panel p {
  margin: 0;
  color: var(--muted);
}
.seo-assistant-actions {
  display: flex;
  align-items: start;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.seo-assistant-panel .form-status,
.seo-assistant-results {
  grid-column: 1 / -1;
}
.seo-assistant-results {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.seo-assistant-results[hidden] {
  display: none;
}
.seo-score {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  text-align: center;
}
.seo-score strong {
  color: var(--deep);
  font-size: 42px;
  line-height: 1;
}
.seo-score span {
  color: var(--blue);
  font-weight: 850;
}
.seo-score small {
  color: var(--muted);
}
.seo-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.seo-check {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--white);
}
.seo-check strong,
.seo-ai-block h3 {
  color: var(--deep);
}
.seo-check span {
  color: var(--muted);
  font-size: 14px;
}
.seo-check.is-ok {
  border-left-color: var(--teal);
}
.seo-check.is-warn {
  border-left-color: #f4a261;
}
.seo-check.is-bad {
  border-left-color: #c2410c;
}
.seo-ai-block {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.seo-ai-block h3 {
  margin: 0;
  font-size: 20px;
}
.seo-ai-block dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.seo-ai-block dl div {
  padding: 10px;
  border-radius: 8px;
  background: #eef7f7;
}
.seo-ai-block dt {
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.seo-ai-block dd {
  margin: 4px 0 0;
  color: var(--deep);
  font-weight: 750;
}
.seo-ai-block ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}
.gallery-upload {
  display: grid;
  gap: 14px;
}
.gallery-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.gallery-manual-list {
  display: grid;
  gap: 10px;
}
.gallery-preview figure {
  cursor: grab;
}
.gallery-preview figure,
.gallery-manual-list figure {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef7f7;
  transition: opacity .18s ease, transform .18s ease, border-color .18s ease;
}
.gallery-preview figure.is-dragging,
.gallery-manual-list figure.is-dragging {
  opacity: .55;
  transform: scale(.98);
  border-color: var(--teal);
}
.gallery-preview img,
.gallery-manual-list img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.gallery-preview figcaption,
.gallery-manual-list figcaption {
  overflow: hidden;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gallery-manual-list figure {
  position: relative;
  display: grid;
  grid-template-columns: 42px 120px minmax(0, 1fr);
  align-items: center;
  cursor: grab;
}
.gallery-manual-list img {
  aspect-ratio: 16 / 10;
  min-height: 72px;
}
.gallery-manual-list figcaption {
  display: grid;
  gap: 3px;
  white-space: normal;
}
.gallery-manual-list figcaption strong,
.gallery-manual-list figcaption small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drag-handle {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--blue);
  background: rgba(103, 213, 204, .14);
}
.gallery-empty {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #f8fcfc;
  font-size: 14px;
}
.editor-full-page-active {
  overflow: hidden;
}
.editor-modal-open {
  overflow: hidden;
}
.editor-modal[hidden] {
  display: none;
}
.editor-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 22px;
}
.editor-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 51, 68, .46);
  cursor: pointer;
}
.editor-modal-card {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(860px, calc(100vh - 44px));
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 30px 90px rgba(8, 51, 68, .32);
}
.editor-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.editor-modal-head h2 {
  margin: 0;
  font-size: 30px;
}
.editor-modal-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--deep);
  background: var(--white);
  cursor: pointer;
}
.inline-image-tools {
  display: grid;
  gap: 14px;
}
.inline-image-dropzone {
  min-height: 190px;
}
.inline-image-preview {
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #eef7f7;
  font-weight: 750;
}
.inline-image-preview img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
}
.inline-image-preview.is-empty {
  padding: 18px;
}
.editor-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 6px;
}
.post-editor-form.is-full-page {
  position: fixed;
  inset: 16px;
  z-index: 100;
  display: grid;
  align-content: start;
  max-width: none;
  overflow: auto;
  box-shadow: 0 24px 80px rgba(8, 51, 68, .28);
}
.post-editor-form.is-full-page .markdown-editor,
.post-editor-form.is-full-page .markdown-preview {
  height: calc(100vh - 270px);
  min-height: 520px;
}
.post-editor-form.is-preview-collapsed .markdown-workspace {
  grid-template-columns: minmax(0, 1fr) 280px;
}
.post-editor-form.is-preview-collapsed .markdown-preview {
  max-height: 62vh;
  opacity: .9;
}
.editor-label {
  color: var(--deep);
  font-weight: 750;
}
.markdown-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr);
  gap: 18px;
}
.markdown-pane,
.markdown-preview-pane {
  min-width: 0;
}
.editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.markdown-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.markdown-toolbar button {
  display: grid;
  place-items: center;
  width: auto;
  min-width: 38px;
  min-height: 38px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--deep);
  background: var(--white);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.markdown-editor,
.markdown-preview {
  min-height: 620px;
  height: calc(100vh - 390px);
}
.markdown-editor {
  resize: vertical;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--white);
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  line-height: 1.65;
}
.markdown-editor:focus {
  box-shadow: 0 0 0 3px rgba(103, 213, 204, .22);
}
.markdown-preview {
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.preview-status {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(103, 213, 204, .18);
  font-size: 12px;
  font-weight: 850;
}
.preview-empty {
  color: var(--muted);
  font-style: italic;
}
.article-body h2,
.article-body h3,
.article-body h4 {
  scroll-margin-top: 110px;
  margin: 1.35em 0 .35em;
  line-height: 1.18;
}
.article-body h2 {
  font-size: 30px;
}
.article-body h3 {
  font-size: 24px;
}
.article-body h4 {
  font-size: 20px;
}
.article-body blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 4px solid var(--teal);
  background: #eef7f7;
  color: var(--deep);
}
.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 18px 0;
  border-radius: 8px;
}
.article-body a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-body pre {
  overflow-x: auto;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #dff7f4;
  background: #082f3d;
  line-height: 1.58;
}
.article-body pre code {
  display: block;
  padding: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  white-space: pre;
}
.markdown-table-wrap {
  overflow-x: auto;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.article-body .markdown-table-wrap table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}
.article-body .markdown-table-wrap th,
.article-body .markdown-table-wrap td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.article-body .markdown-table-wrap th {
  color: var(--deep);
  background: #eef7f7;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}
.article-body .markdown-table-wrap tr:last-child td {
  border-bottom: 0;
}
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--deep); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
td form { display: inline; }
td button, .actions button { border: 0; background: transparent; color: #b42318; cursor: pointer; font: inherit; font-weight: 750; }
.admin-project-cell { display: flex; align-items: center; gap: 12px; }
.admin-project-cell img {
  width: 62px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
}
.check-row input { width: auto; }
code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #eef7f7;
}
.totp-qr {
  display: grid;
  place-items: center;
  margin: 18px 0;
  padding: 16px;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--line);
}
.totp-qr svg {
  max-width: 240px;
  width: 100%;
  height: auto;
}
.secret-key { overflow-wrap: anywhere; }

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 820px) {
  .site-header { align-items: flex-start; }
  .brand { min-width: 0; }
  .brand small { max-width: 210px; }
  .nav-toggle { display: inline-flex; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
  .site-nav { display: none; position: absolute; left: 18px; right: 18px; top: 74px; flex-direction: column; align-items: stretch; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); box-shadow: var(--shadow); }
  .site-nav.is-open { display: flex; }
  .hero, .cv-hero, .split, .contact-grid, .timeline-item, .admin-body, .blog-intro-grid, .resume-summary, .about-grid, .profile-layout { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 46px; }
  .hero-three { min-height: 520px; opacity: .42; }
  .blog-home-hero {
    min-height: auto;
    align-content: start;
    padding-top: 54px;
  }
  .blog-topic-list {
    grid-template-columns: 1fr;
  }
  .cv-hero, .timeline {
    width: auto;
    margin-left: 18px;
    margin-right: 18px;
  }
  .cv-hero { min-height: auto; padding-top: 52px; }
  .cv-three { min-height: 560px; opacity: .32; }
  .timeline-item::before { display: none; }
  .timeline-date { padding-left: 0; }
  .value-grid, .cards, .admin-grid, .private-apps, .stats, .portfolio-grid, .project-detail-head, .form-grid, .analytics-grid, .profile-stats { grid-template-columns: 1fr; }
  .analytics-bars { grid-template-columns: repeat(7, minmax(22px, 1fr)); overflow-x: auto; }
  .cover-upload,
  .cover-upload-item { grid-template-columns: 1fr; }
  .seo-assistant-panel,
  .seo-assistant-results,
  .seo-ai-block dl { grid-template-columns: 1fr; }
  .seo-assistant-actions { justify-content: flex-start; }
  .article-wide {
    width: min(100% - 28px, 720px);
    margin-top: 42px;
  }
  .article-cover img {
    aspect-ratio: 4 / 3;
  }
  .article-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .article-toc {
    position: static;
    order: -1;
  }
  .article-body {
    font-size: 17px;
    line-height: 1.64;
  }
  .home-projects-copy {
    position: static;
  }
  .home-project-card a {
    grid-template-columns: 1fr;
  }
  .home-project-card figure {
    aspect-ratio: 16 / 9;
  }
  .home-cta {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .home-cta .btn {
    width: fit-content;
  }
  .markdown-workspace { grid-template-columns: 1fr; }
  .markdown-editor, .markdown-preview { min-height: 360px; height: auto; }
  .project-actions { justify-content: flex-start; }
  .carousel-viewport { aspect-ratio: 4 / 3; }
  .section-head.row, .admin-title.row { flex-direction: column; align-items: flex-start; }
  .engagement-head, .admin-comment-card header, .admin-comment-card footer, .token-give-card, .comment-token-row { flex-direction: column; align-items: flex-start; }
  .profile-card { position: static; }
  .leaderboard-card { grid-template-columns: 42px 48px minmax(0, 1fr); }
  .leaderboard-score { grid-column: 1 / -1; justify-items: start; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-newsletter-form { grid-template-columns: 1fr; }
  .footer-newsletter-form .footer-cta { width: fit-content; }
  .footer-bottom { flex-direction: column; }
  .admin-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-main { padding: 22px 18px; }
  .auth-main { padding: 64px 18px 28px; }
  .login-shell { grid-template-columns: 1fr; min-height: auto; padding-top: 52px; }
  .login-back { top: 0; }
  .login-visual { min-height: auto; padding: 34px 24px; border-radius: 8px 8px 0 0; }
  .login-card { min-height: auto; margin-top: 0; max-width: none; padding: 28px 24px; border-radius: 0 0 8px 8px; }
  .login-card h2 { font-size: 30px; }
}

@media (max-width: 480px) {
  .cv-hero h1 {
    max-width: 320px;
    font-size: 32px;
    line-height: 1.05;
    overflow-wrap: anywhere;
  }
  .cv-hero p {
    max-width: 320px;
    font-size: 17px;
  }
  .current-experience {
    padding: 18px;
  }
  .current-experience h2 {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
