:root {
  color-scheme: light;
  --bg: #f5f7ff;
  --panel: rgba(255, 255, 255, 0.74);
  --panel-strong: #ffffff;
  --ink: #1b2333;
  --muted: #5f6d7d;
  --line: rgba(94, 106, 133, 0.12);
  --primary: #5d6cff;
  --primary-2: #7a5cff;
  --secondary: #23b6a1;
  --accent: #ffb870;
  --accent-soft: #ffe3ba;
  --dark: #111827;
  --shadow: 0 24px 70px rgba(26, 40, 66, 0.12);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #202a39;
  --panel: rgba(48, 60, 78, 0.96);
  --panel-strong: #39485e;
  --ink: #f3f5fa;
  --muted: #c1cada;
  --line: rgba(213, 223, 239, 0.2);
  --primary: #b6a5ff;
  --primary-2: #947cff;
  --secondary: #63decc;
  --accent: #ffc17a;
  --accent-soft: #514257;
  --dark: #f3f5fa;
  --shadow: 0 24px 70px rgba(5, 12, 24, 0.24);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(125, 106, 255, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(35, 182, 161, 0.18), transparent 25%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { max-width: 100%; display: block; }
.shell { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(245, 247, 255, 0.7);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(33, 46, 70, 0.08);
}
.nav-wrap {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--dark);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-links a {
  position: relative;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 600;
  transition: color 0.2s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--dark);
}
.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}
.nav-links .nav-contact {
  padding: 10px 16px;
  border: 1px solid rgba(93, 108, 255, 0.24);
  border-radius: 999px;
  background: rgba(93, 108, 255, 0.06);
  color: var(--dark);
}
.blog-header-actions,
.login-top { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  padding: 9px 13px;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.theme-toggle:hover { border-color: var(--primary); }
.menu-toggle { display: none; border: 0; background: transparent; color: var(--dark); cursor: pointer; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 92px;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  pointer-events: none;
}
.hero::before {
  top: -120px;
  right: -120px;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(125, 106, 255, 0.18), transparent 60%);
}
.hero::after {
  bottom: 10px;
  left: -120px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(35, 182, 161, 0.12), transparent 60%);
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 52px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(93, 108, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  box-shadow: 0 0 14px rgba(35, 182, 161, 0.9);
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 610px;
  margin: 20px 0 18px;
  font-family: var(--serif);
  font-size: clamp(48px, 5.5vw, 72px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
h1 span {
  display: block;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-copy {
  max-width: 520px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 1rem;
}
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.button-primary,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.button-primary {
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 18px 32px rgba(93, 108, 255, 0.28);
}
.button-primary:hover,
.text-link:hover { transform: translateY(-2px); }
.text-link {
  color: var(--dark);
  font-size: 0.86rem;
  font-weight: 700;
}
.arrow {
  display: inline-block;
  transition: transform 0.22s ease;
}
.text-link:hover .arrow { transform: translateX(5px); }

.hero-art {
  position: relative;
  width: min(100%, 470px);
  margin-left: auto;
  animation: float 7s ease-in-out infinite;
}
.profile-card {
  position: relative;
  overflow: hidden;
  width: min(100%, 420px);
  aspect-ratio: 1 / 1;
  margin: 0;
  border: 10px solid rgba(255,255,255,0.78);
  border-radius: 34px;
  background: #dfe5f5;
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}
.profile-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(29,35,62,0.18));
  pointer-events: none;
}
.profile-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.profile-badge {
  position: absolute;
  right: -12px;
  bottom: 24px;
  padding: 10px 14px;
  border: 1px solid rgba(93,108,255,0.16);
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 12px 24px rgba(31,43,67,0.12);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.writing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}
.writing-card,
.writing-empty {
  min-height: 220px;
  padding: 24px;
  border: 1px solid rgba(87, 101, 146, 0.12);
  border-radius: 24px;
  background: rgba(255,255,255,0.78);
  box-shadow: 0 18px 36px rgba(31,43,67,0.05);
}
.writing-card { cursor: pointer; transition: transform 0.25s ease, border-color 0.25s ease; }
.writing-card:hover { transform: translateY(-5px); border-color: rgba(93,108,255,0.32); }
.writing-card small { color: var(--primary); font-weight: 800; }
.writing-card h3 { margin: 12px 0 8px; font-family: var(--serif); font-size: 1.35rem; }
.writing-card p { color: var(--muted); font-size: 0.88rem; }
.writing-card .writing-author { margin-top: 16px; color: var(--ink); font-size: 0.78rem; font-weight: 700; }
.writing-empty { display: grid; place-items: center; color: var(--muted); }

.blog-page { min-height: calc(100vh - 78px); }
.article-author { color: var(--primary); font-weight: 800; }
.article-body {
  max-width: 760px;
  margin-top: 24px;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.9;
}
.article-body p { margin-bottom: 18px; }

.admin-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(125,106,255,0.16), transparent 28%),
    var(--bg);
}
.admin-login {
  width: min(440px, calc(100% - 36px));
  margin: 10vh auto 0;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255,255,255,0.88);
  box-shadow: var(--shadow);
}
.admin-login h1 { margin: 18px 0 8px; font-size: 2.4rem; }
.admin-login form,
.article-form { display: grid; gap: 16px; }
.admin-login label,
.article-form label { display: grid; gap: 7px; font-size: 0.85rem; font-weight: 700; }
.admin-login input,
.article-form input,
.article-form textarea {
  width: 100%;
  border: 1px solid rgba(87,101,146,0.18);
  border-radius: 12px;
  background: white;
  padding: 12px 14px;
  font: inherit;
}
.article-form textarea { resize: vertical; }
.publish-options {
  display: block;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.publish-options legend { padding: 0 6px; font-size: 0.85rem; font-weight: 700; }
.publish-options label { display: inline-flex !important; align-items: center; gap: 8px !important; margin: 4px 20px 4px 0; cursor: pointer; }
.publish-options input { width: auto; padding: 0; border: 0; background: transparent; accent-color: var(--primary); }
.form-message { min-height: 24px; color: #b64d4d; }
.demo-credentials { color: var(--muted); font-size: 0.76rem; }
.admin-dashboard { min-height: 100vh; display: grid; grid-template-columns: 220px 1fr; }
.admin-dashboard aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 20px;
  border-right: 1px solid var(--line);
  background: rgba(255,255,255,0.65);
}
.admin-dashboard aside button,
.admin-list-item button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 9px 13px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.admin-user { display: grid; gap: 2px; margin-bottom: auto; }
.admin-user small { color: var(--muted); }
.admin-user strong { font-family: var(--serif); }
.admin-user span {
  width: fit-content;
  margin-top: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(93,108,255,0.09);
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 800;
}
.admin-tabs { display: flex; gap: 8px; margin-bottom: 28px; }
.admin-tabs button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 9px 14px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.admin-tabs button.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}
.form-actions,
.item-actions { display: flex; align-items: center; gap: 8px; }
.secondary-button {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 0 18px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.admin-list-empty { padding: 18px; color: var(--muted); }
.admin-content { width: min(760px, calc(100% - 48px)); margin: 42px auto; }
.admin-content h2 { font-family: var(--serif); }
.admin-list { display: grid; gap: 10px; margin: 18px 0 40px; }
.admin-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.admin-list-item div { display: grid; }
.admin-list-item span { color: var(--muted); font-size: 0.78rem; }
.admin-list-item .item-actions { display: flex; flex: 0 0 auto; }

.admin-dashboard {
  min-height: 100vh;
  grid-template-columns: 250px minmax(0, 1fr);
  background: var(--bg);
}
.admin-dashboard .admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  justify-content: flex-start;
  gap: 30px;
  padding: 28px 20px;
}
.admin-menu { display: grid; gap: 8px; }
.admin-menu button {
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  padding: 12px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
}
.admin-menu button:hover,
.admin-menu button.active { background: rgba(93,108,255,0.1); color: var(--primary); }
.admin-dashboard .admin-user { margin: 0; }
.sidebar-logout { margin-top: auto; }
.sidebar-theme-toggle { align-self: flex-start; }
.admin-main { width: min(1050px, 100%); margin: 0 auto; padding: 52px clamp(22px, 5vw, 64px); }
.admin-view > h1,
.writer-content > h1 { margin: 0 0 12px; font-size: clamp(36px, 5vw, 54px); }
.admin-welcome { color: var(--muted); }
.admin-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 30px 0; }
.admin-stats article,
.admin-shortcuts button {
  display: grid;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,0.82);
  text-align: left;
}
.admin-stats span,
.admin-shortcuts span { color: var(--muted); font-size: 0.82rem; }
.admin-stats strong { font-family: var(--serif); font-size: 2rem; }
.admin-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.admin-shortcuts button { cursor: pointer; font: inherit; }
.admin-shortcuts button:hover { border-color: rgba(93,108,255,0.35); }
.admin-shortcuts strong { color: var(--primary); }
.admin-migration {
  margin-top: 32px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.admin-migration h2 { margin-top: 0; }
.admin-migration p { color: var(--muted); font-size: 0.88rem; }
.admin-migration .form-message { color: #b64d4d; }
.admin-migration label { font-size: 0.85rem; font-weight: 700; }
.admin-migration a { color: var(--primary); font-weight: 700; }
.admin-migration form { display: grid; gap: 10px; }
.admin-migration input[type="file"] { display: block; width: 100%; margin-top: 8px; }
.admin-migration .secondary-button { justify-self: start; }
.admin-form { max-width: 760px; margin: 24px 0 40px; }
.admin-view > h2 { margin-top: 38px; }

.writer-page { min-height: 100vh; background: var(--bg); }
.writer-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px max(24px, calc((100% - 1040px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(245,247,255,0.92);
  backdrop-filter: blur(14px);
}
.writer-header > div { display: flex; align-items: center; gap: 14px; }
.writer-header #writer-name { color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.writer-content { width: min(800px, calc(100% - 40px)); margin: 48px auto; }
.writer-content > p:not(.section-kicker) { color: var(--muted); }
.writer-form { margin: 28px 0 48px; }
.demo-warning { margin: 24px 0; padding: 12px; border-radius: 12px; background: rgba(255,184,112,0.15); color: #725326; font-size: 0.76rem; }

@media (max-width: 620px) {
  .writer-header { padding: 14px 18px; }
  .writer-header > div { gap: 8px; }
  .writer-header #writer-name { display: none; }
  .writer-content { margin: 32px auto; }
  .admin-list-item { align-items: flex-start; }
  .item-actions { flex-wrap: wrap; }
}

.section { padding: 92px 0; }
.section-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 35px;
}
.section-kicker {
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
h2 {
  margin-bottom: 0;
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.04em;
}
.section-intro {
  max-width: 390px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
}
.about {
  background: rgba(125, 106, 255, 0.04);
  border-top: 1px solid var(--line);
}
.about-grid {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 72px;
  align-items: start;
}
.about-copy {
  padding-top: 12px;
  color: var(--muted);
  font-size: 0.97rem;
}
.about-copy p:last-child { margin-bottom: 0; }
.about-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255,255,255,0.6);
}
.fact {
  min-height: 114px;
  padding: 20px 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.fact:nth-child(2n) { border-right: 0; }
.fact:nth-last-child(-n+2) { border-bottom: 0; }
.fact-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.fact strong {
  font-size: 1rem;
  font-weight: 700;
}

.projects {
  background: rgba(35, 182, 161, 0.04);
  border-top: 1px solid var(--line);
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.project-card {
  position: relative;
  display: block;
  min-height: 260px;
  padding: 24px 24px 22px;
  border: 1px solid rgba(87, 101, 146, 0.12);
  border-radius: 26px;
  background: rgba(255,255,255,0.78);
  box-shadow: 0 18px 36px rgba(31, 43, 67, 0.05);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(93, 108, 255, 0.35);
  box-shadow: 0 24px 45px rgba(70, 83, 122, 0.08);
}
.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.project-meta span:first-child {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(93, 108, 255, 0.2);
  background: rgba(93, 108, 255, 0.08);
  letter-spacing: 0;
}
.project-card h3 {
  margin-bottom: 10px;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.project-card p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.project-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(93, 108, 255, 0.12);
  background: rgba(93, 108, 255, 0.05);
  color: #4a5878;
  font-size: 0.68rem;
  font-weight: 700;
}

.learning-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.learning-item {
  min-height: 200px;
  padding: 26px 22px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,0.7);
  box-shadow: 0 12px 28px rgba(22, 31, 48, 0.03);
}
.item-number {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(93, 108, 255, 0.14), rgba(35, 182, 161, 0.14));
  color: var(--primary);
  font-family: var(--serif);
  font-weight: 700;
}
.learning-item h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}
.learning-item p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.quote-band {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--dark), #1f2a44 65%, #24314f);
  color: white;
}
.quote-inner {
  display: flex;
  align-items: center;
  gap: 18px;
}
.quote-mark {
  font-family: var(--serif);
  font-size: 5rem;
  line-height: 0.8;
  color: rgba(255,255,255,0.5);
}
.quote-inner blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.contact {
  position: relative;
  overflow: hidden;
  padding: 90px 0 28px;
  background: linear-gradient(135deg, #171d2e, #1d2850 42%, #1c3553);
  color: white;
}
.contact::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(125, 106, 255, 0.28), transparent 58%);
}
.contact-inner {
  position: relative;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 46px;
  padding-bottom: 42px;
  border-bottom: 1px solid rgba(255,255,255,0.16);
}
.contact-copy .section-kicker { color: #b9c1ff; }
.contact-copy h2 { color: white; }
.contact-inner p {
  margin-top: 12px;
  max-width: 430px;
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
}
.contact-methods { display: grid; gap: 14px; }
.contact-method {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 86px;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  transition: transform 0.22s ease, border-color 0.22s ease;
}
.contact-method:hover {
  transform: translateX(4px);
  border-color: rgba(255,255,255,0.2);
}
.method-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: #ffb87a;
  font-family: var(--serif);
  font-weight: 700;
}
.contact-method small,
.contact-method strong { display: block; }
.contact-method a { color: inherit; }
.contact-method a:hover strong,
.contact-method a:focus-visible strong {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.contact-method small {
  margin-bottom: 3px;
  color: #b9c1ff;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.contact-method strong {
  color: white;
  font-size: 0.98rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 18px;
  color: rgba(255,255,255,0.7);
  font-size: 0.74rem;
}
footer a { color: #ffcb7a; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.22s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes drift {
  0% { transform: translateX(0); }
  100% { transform: translateX(-8px); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes blink {
  50% { opacity: 0; }
}

@media (max-width: 800px) {
  .hero-grid,
  .about-grid,
  .contact-inner { grid-template-columns: 1fr; }
  .hero-grid { gap: 26px; }
  .hero-art { margin: 0 auto; }
  .project-grid,
  .learning-grid,
  .writing-grid { grid-template-columns: 1fr; }
  .about-grid { gap: 30px; }
  .section { padding: 76px 0; }
}
@media (max-width: 620px) {
  .shell { width: min(100% - 36px, 480px); }
  .admin-dashboard { grid-template-columns: 1fr; }
  .admin-dashboard .admin-sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .admin-menu { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .admin-menu button { padding: 10px 6px; text-align: center; font-size: 0.7rem; }
  .admin-dashboard .admin-user { display: none; }
  .sidebar-logout { margin: 0; }
  .admin-main { padding: 34px 20px; }
  .admin-stats { grid-template-columns: 1fr; gap: 10px; }
  .admin-stats article { grid-template-columns: 1fr auto; align-items: center; padding: 15px 18px; }
  .admin-stats strong { font-size: 1.5rem; }
  .admin-shortcuts { grid-template-columns: 1fr; }
  .nav-wrap { min-height: 66px; }
  .menu-toggle { display: grid; place-items: center; width: 40px; height: 40px; }
  .menu-toggle svg { width: 22px; height: 22px; }
  .nav-links {
    position: absolute;
    top: 65px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 18px 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(245, 247, 255, 0.96);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a {
    display: block;
    padding: 12px 0;
  }
  .nav-links .nav-contact {
    display: inline-block;
    width: fit-content;
    margin-top: 8px;
  }
  .nav-links .theme-toggle { width: fit-content; margin-top: 8px; }
  .hero { padding: 60px 0 70px; }
  h1 { font-size: clamp(42px, 14vw, 58px); }
  .hero-copy, .section-intro, .about-copy, .project-card p, .learning-item p, .contact-inner p { font-size: 0.9rem; }
  .section-top { flex-direction: column; align-items: start; gap: 16px; }
  .about-facts { grid-template-columns: 1fr; }
  .fact { border-right: 0; }
  .fact:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .fact:last-child { border-bottom: 0; }
  .quote-mark { font-size: 3.5rem; }
  .contact { padding: 68px 0 24px; }
  footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

:root[data-theme="dark"] .site-header {
  background: rgba(32, 42, 57, 0.9);
  border-bottom-color: rgba(213, 223, 239, 0.16);
}
:root[data-theme="dark"] .eyebrow {
  border-color: rgba(182,165,255,0.38);
  background: linear-gradient(110deg, rgba(131,105,255,0.18), rgba(99,222,204,0.08));
  color: #d3c9ff;
}
:root[data-theme="dark"] .button-primary {
  background: linear-gradient(125deg, #7564f5, #9a65e9);
  box-shadow: 0 16px 34px rgba(119,91,255,0.32);
}
:root[data-theme="dark"] .nav-links {
  background: rgba(32, 42, 57, 0.98);
}
:root[data-theme="dark"] body {
  background:
    radial-gradient(ellipse at 8% 2%, rgba(119,91,255,0.18), transparent 32%),
    radial-gradient(ellipse at 92% 38%, rgba(40,190,173,0.1), transparent 31%),
    var(--bg);
  background-attachment: fixed;
}
:root[data-theme="dark"] .about {
  background: linear-gradient(115deg, rgba(113,91,224,0.1), rgba(45,55,72,0.4));
}
:root[data-theme="dark"] .projects {
  background: linear-gradient(125deg, rgba(41,181,164,0.1), rgba(102,79,190,0.11));
}
:root[data-theme="dark"] .about-facts,
:root[data-theme="dark"] .writing-empty,
:root[data-theme="dark"] .learning-item,
:root[data-theme="dark"] .admin-login,
:root[data-theme="dark"] .admin-dashboard aside,
:root[data-theme="dark"] .admin-list-item,
:root[data-theme="dark"] .admin-stats article,
:root[data-theme="dark"] .admin-shortcuts button {
  background: var(--panel);
}
:root[data-theme="dark"] .project-card {
  border-color: rgba(196, 205, 231, 0.22);
  background: linear-gradient(145deg, #39445b, #303d51);
  box-shadow: 0 14px 30px rgba(8, 15, 27, 0.24), 0 1px 0 rgba(230, 236, 248, 0.08);
}
:root[data-theme="dark"] .project-card:nth-child(even) {
  background: linear-gradient(145deg, #35495a, #303d51);
}
:root[data-theme="dark"] .project-card:hover {
  border-color: rgba(196, 185, 255, 0.62);
  box-shadow: 0 20px 38px rgba(8, 15, 27, 0.3), 0 0 0 1px rgba(196, 185, 255, 0.12);
}
:root[data-theme="dark"] .project-meta span:first-child {
  border-color: rgba(182,165,255,0.28);
  background: linear-gradient(135deg, rgba(141,111,255,0.24), rgba(99,222,204,0.12));
}
:root[data-theme="dark"] .project-tags span {
  border-color: rgba(182,165,255,0.2);
  background: rgba(147,124,255,0.1);
  color: #ded8ff;
}
:root[data-theme="dark"] .writing-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(168, 222, 216, 0.24);
  background: linear-gradient(145deg, #344b55, #303d51);
  box-shadow: 0 14px 30px rgba(8, 15, 27, 0.24), 0 1px 0 rgba(230, 236, 248, 0.08);
}
:root[data-theme="dark"] .writing-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--secondary), var(--primary));
  content: "";
}
:root[data-theme="dark"] .writing-card small { color: var(--secondary); }
:root[data-theme="dark"] .writing-empty {
  border-color: rgba(196, 185, 255, 0.22);
  background: linear-gradient(135deg, #41445e, #303d51);
  box-shadow: 0 14px 30px rgba(8, 15, 27, 0.24), 0 1px 0 rgba(230, 236, 248, 0.08);
}
:root[data-theme="dark"] .learning-item,
:root[data-theme="dark"] .admin-stats article,
:root[data-theme="dark"] .admin-shortcuts button,
:root[data-theme="dark"] .admin-list-item,
:root[data-theme="dark"] .contact-method {
  border-color: rgba(213, 223, 239, 0.2);
  box-shadow: 0 12px 28px rgba(8, 15, 27, 0.2), 0 1px 0 rgba(230, 236, 248, 0.07);
}
:root[data-theme="dark"] .learning-item {
  background: linear-gradient(145deg, #354257, #303d51);
}
:root[data-theme="dark"] .about-facts {
  box-shadow: 0 14px 30px rgba(8, 15, 27, 0.2);
}
:root[data-theme="dark"] .fact {
  box-shadow: inset 0 1px 0 rgba(230, 236, 248, 0.06);
}
:root[data-theme="dark"] .profile-card {
  border-color: rgba(196, 185, 255, 0.38);
  background: #354257;
  box-shadow: 0 24px 48px rgba(8, 15, 27, 0.28), 0 0 32px rgba(119,91,255,0.12);
}
:root[data-theme="dark"] .profile-badge {
  border-color: rgba(255,193,122,0.3);
  background: linear-gradient(120deg, #282342, #1d2c3b);
  color: var(--accent);
}
:root[data-theme="dark"] .quote-band {
  background:
    radial-gradient(circle at 85% 10%, rgba(99,222,204,0.14), transparent 28%),
    linear-gradient(125deg, #211d3b, #1d2942 65%, #17333d);
  color: var(--ink);
}
:root[data-theme="dark"] .profile-badge,
:root[data-theme="dark"] .admin-login input,
:root[data-theme="dark"] .article-form input,
:root[data-theme="dark"] .article-form textarea,
:root[data-theme="dark"] .publish-options,
:root[data-theme="dark"] .admin-dashboard aside button,
:root[data-theme="dark"] .admin-list-item button,
:root[data-theme="dark"] .admin-tabs button,
:root[data-theme="dark"] .secondary-button {
  border-color: var(--line);
  background: var(--panel-strong);
  color: var(--ink);
}
:root[data-theme="dark"] .publish-options input {
  background: transparent;
}
:root[data-theme="dark"] .admin-tabs button.active {
  background: var(--primary);
  color: #111521;
}
:root[data-theme="dark"] .writer-header {
  border-color: var(--line);
  background: rgba(32,42,57,0.94);
}
:root[data-theme="dark"] .demo-warning {
  background: rgba(255,184,112,0.12);
  color: #ffd9a8;
}