:root {
  --ink: #14211d;
  --ink-soft: #54615d;
  --paper: #f5f2e9;
  --paper-deep: #eae5d9;
  --white: #fffefa;
  --green: #1c5b43;
  --green-dark: #0f3e2e;
  --mint: #b9dfcb;
  --lime: #d7ef83;
  --orange: #e36f3e;
  --line: rgba(20, 33, 29, 0.14);
  --shadow: 0 18px 55px rgba(27, 45, 38, 0.09);
  --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a { color: inherit; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
input {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

.shell {
  width: min(1240px, calc(100% - 40px));
  margin-inline: auto;
}

.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;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 15px;
  border-radius: 9px;
  background: var(--white);
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.masthead {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 80% 65%, rgba(215, 239, 131, .14), transparent 31%),
    radial-gradient(circle at 14% 85%, rgba(185, 223, 203, .14), transparent 26%),
    var(--green-dark);
}

.masthead::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -170px;
  bottom: -250px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 50%;
  box-shadow: 0 0 0 48px rgba(255, 255, 255, .025), 0 0 0 96px rgba(255, 255, 255, .018);
}

.nav {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 760;
  text-decoration: none;
  letter-spacing: -.02em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--green-dark);
  background: var(--lime);
  border-radius: 50%;
  font-size: 12px;
  letter-spacing: -.04em;
}

.nav-actions { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.nav-actions a { text-decoration: none; opacity: .85; }
.nav-actions a:hover { opacity: 1; }

.nav-actions .nav-primary {
  padding: 10px 16px;
  color: var(--green-dark);
  background: var(--lime);
  border-radius: 999px;
  font-weight: 750;
  opacity: 1;
}
.nav-identity { color: var(--mint); font-size: 12px; white-space: nowrap; }
.nav-logout { padding: 8px 12px; color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 9px; background: transparent; }
.nav-logout:hover { background: rgba(255,255,255,.1); }

.hero {
  position: relative;
  z-index: 1;
  padding-block: 92px 80px;
}

.eyebrow, .kicker {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--mint); }
.eyebrow span { width: 28px; height: 1px; background: var(--mint); }

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 920px;
  margin-bottom: 24px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(54px, 7.5vw, 108px);
  font-weight: 500;
  line-height: .89;
  letter-spacing: -.055em;
}

h1 em { color: var(--lime); font-weight: 500; }

.hero-copy {
  max-width: 690px;
  margin-bottom: 52px;
  color: rgba(255, 255, 255, .72);
  font-size: clamp(17px, 2vw, 21px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 920px;
  border-top: 1px solid rgba(255, 255, 255, .15);
}

.hero-stats div { padding: 24px 28px 0 0; }
.hero-stats strong { display: block; font-family: Georgia, serif; font-size: 34px; font-weight: 500; color: var(--lime); }
.hero-stats span { color: rgba(255, 255, 255, .58); font-size: 13px; }

.discovery { padding-block: 84px 42px; }

.section-heading, .results-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
}

.section-heading > p { max-width: 530px; color: var(--ink-soft); }
.kicker { color: var(--orange); }

h2 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.04em;
}

.search-panel {
  margin-top: 36px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 7px 16px;
  border-bottom: 1px solid var(--line);
}

.search-symbol { color: var(--green); font-size: 33px; line-height: 1; transform: rotate(-18deg); }

.search-box input {
  flex: 1;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: clamp(17px, 2vw, 21px);
}

.search-box input::placeholder { color: #919b96; }

kbd {
  padding: 3px 8px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--paper);
  font-size: 12px;
}

.filters {
  display: grid;
  grid-template-columns: 1.15fr 1.15fr 1fr .8fr 1.15fr auto;
  gap: 12px;
  padding-top: 18px;
}

.filters label { min-width: 0; }
.filters label > span { display: block; margin: 0 0 6px 4px; color: var(--ink-soft); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }

select {
  width: 100%;
  height: 44px;
  padding: 0 35px 0 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.clear-button {
  align-self: end;
  height: 44px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--green);
  background: transparent;
  font-weight: 750;
}

.clear-button:hover { background: var(--paper); }

.library { padding-block: 52px 90px; }
.results-bar { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.results-bar h2 { font-size: clamp(29px, 3vw, 40px); }

.view-actions { display: flex; align-items: center; gap: 8px; }
.view-actions select { height: 38px; }

.view-button {
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-soft);
  background: transparent;
}

.view-button.is-active { color: #fff; border-color: var(--green); background: var(--green); }

.active-filters { display: flex; flex-wrap: wrap; gap: 8px; min-height: 46px; padding-block: 12px; }
.filter-pill { padding: 6px 10px; color: var(--green); border: 1px solid rgba(28, 91, 67, .2); border-radius: 999px; background: rgba(185, 223, 203, .25); font-size: 12px; }

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

.skill-card {
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 254, 250, .72);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.skill-card:hover { transform: translateY(-3px); border-color: rgba(28, 91, 67, .38); box-shadow: var(--shadow); }

.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.category-tag { overflow: hidden; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; text-overflow: ellipsis; white-space: nowrap; }

.rating {
  display: grid;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(28, 91, 67, .2);
  border-radius: 50%;
  background: rgba(185, 223, 203, .22);
  font-family: Georgia, serif;
  font-size: 17px;
}

.rating[data-tier="top"] { color: var(--green-dark); border-color: var(--lime); background: var(--lime); }

.skill-card h3 { margin: 18px 0 10px; font-family: Georgia, serif; font-size: 24px; font-weight: 600; line-height: 1.08; letter-spacing: -.025em; overflow-wrap: anywhere; }
.skill-card .description { display: -webkit-box; overflow: hidden; margin-bottom: 18px; color: var(--ink-soft); font-size: 14px; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }

.card-meta { display: flex; flex-wrap: wrap; gap: 7px 13px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 12px; }
.card-meta span { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }

.card-actions { display: flex; align-items: center; gap: 9px; margin-top: 16px; }
.card-actions a, .details-button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 750;
}

.card-actions .file-button { color: #fff; border-color: var(--green); background: var(--green); }
.details-button { color: var(--green); background: transparent; }

.details {
  display: none;
  margin-top: 14px;
  padding: 14px;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.details.is-open { display: block; }
.details strong { color: var(--ink); }
.details a { color: var(--green); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 14px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--ink-soft); background: var(--paper-deep); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
th button { padding: 0; color: inherit; border: 0; background: transparent; font: inherit; text-transform: inherit; letter-spacing: inherit; }
td:first-child { min-width: 220px; font-weight: 750; }
td:nth-child(3) { max-width: 210px; overflow-wrap: anywhere; color: var(--ink-soft); }
td a { color: var(--green); }

.empty-state { padding: 80px 20px; text-align: center; border: 1px dashed var(--line); border-radius: 18px; }
.empty-state span { display: block; color: var(--orange); font-family: Georgia, serif; font-size: 55px; }
.empty-state h3 { margin: 4px 0; font-family: Georgia, serif; font-size: 28px; }
.empty-state p { color: var(--ink-soft); }
.empty-state button { padding: 10px 16px; color: #fff; border: 0; border-radius: 9px; background: var(--green); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 20px; padding-top: 34px; }
.pagination button { padding: 10px 15px; color: var(--green); border: 1px solid var(--line); border-radius: 9px; background: transparent; }
.pagination button:disabled { cursor: not-allowed; opacity: .35; }
.pagination span { color: var(--ink-soft); font-size: 13px; }

.method { display: grid; grid-template-columns: .7fr 1.5fr; gap: 58px; padding-block: 80px; border-top: 1px solid var(--line); }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.method-grid article { padding: 25px; background: var(--paper); }
.method-grid strong { color: var(--orange); font-family: Georgia, serif; font-size: 28px; }
.method-grid h3 { margin: 20px 0 8px; font-size: 16px; }
.method-grid p, .method-note { color: var(--ink-soft); font-size: 13px; }
.method-note { grid-column: 2; margin: 0; }

.account-panel { padding-block: 72px 90px; border-top: 1px solid var(--line); }
.account-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.account-summary { margin: 18px 0 24px; color: var(--ink-soft); }
.account-primary { min-height: 44px; padding: 0 18px; color: #fff; border: 0; border-radius: 10px; background: var(--green); font-weight: 750; }
.account-primary:hover { background: var(--green-dark); }
.account-primary:disabled { cursor: wait; opacity: .6; }
.account-message { min-height: 24px; color: var(--green); font-weight: 700; }
.account-message.is-error, .form-error { color: #a33124; }
.user-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.user-table td:first-child { min-width: 150px; }
.user-table td:nth-child(3) { min-width: 210px; }
.user-table td:last-child { min-width: 220px; }
.role-badge, .status-badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: rgba(185,223,203,.35); color: var(--green-dark); font-size: 11px; font-weight: 800; text-transform: capitalize; }
.status-badge.is-frozen { background: #f5d5ca; color: #8b2e20; }
.row-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.row-actions button, .dialog-actions > button:not(.account-primary) { min-height: 34px; padding: 0 10px; color: var(--green); border: 1px solid var(--line); border-radius: 8px; background: transparent; }
.row-actions .danger-button { color: #a33124; }

.user-dialog { width: min(640px, calc(100% - 28px)); padding: 0; color: var(--ink); border: 0; border-radius: 20px; background: var(--paper); box-shadow: 0 24px 90px rgba(0,0,0,.3); }
.user-dialog::backdrop { background: rgba(15,62,46,.72); backdrop-filter: blur(4px); }
.user-dialog form { padding: 28px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.dialog-heading h2 { font-size: 38px; }
.icon-button { width: 38px; height: 38px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.form-grid label > span, .login-card label > span { display: block; margin-bottom: 6px; color: var(--ink-soft); font-size: 12px; font-weight: 750; }
.form-wide { grid-column: 1 / -1; }
.form-error { min-height: 25px; padding-top: 12px; font-size: 13px; }
.dialog-actions { display: flex; justify-content: end; gap: 10px; margin-top: 12px; }

.login-page { min-height: 100vh; background: var(--green-dark); }
.login-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr); min-height: 100vh; }
.login-intro { display: flex; flex-direction: column; justify-content: space-between; padding: clamp(34px, 6vw, 90px); color: #fff; background: radial-gradient(circle at 20% 80%, rgba(215,239,131,.15), transparent 30%), var(--green-dark); }
.login-intro .brand { align-self: flex-start; }
.login-intro h1 { margin-top: 30px; font-size: clamp(54px, 7vw, 100px); }
.login-intro > div > p:last-child { max-width: 620px; color: rgba(255,255,255,.7); font-size: 19px; }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: clamp(30px, 7vw, 100px); background: var(--paper); }
.login-card h2 { margin-bottom: 12px; font-size: 52px; }
.login-card > div > p:last-child { color: var(--ink-soft); }
.login-card form { display: grid; gap: 18px; margin-top: 34px; }
.login-card .account-primary { margin-top: 8px; }

footer { color: rgba(255, 255, 255, .74); background: var(--green-dark); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 42px; }
.footer-inner strong { color: #fff; }
.footer-inner p { margin: 3px 0 0; font-size: 13px; }
.footer-links { display: flex; gap: 20px; font-size: 13px; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

@media (max-width: 1000px) {
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .clear-button { width: 100%; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .method { grid-template-columns: 1fr; }
  .method-note { grid-column: 1; }
}

@media (max-width: 700px) {
  .shell { width: min(100% - 24px, 1240px); }
  .nav { min-height: 68px; }
  .nav-actions > a:not(.nav-primary) { display: none; }
  .nav-identity { display: none; }
  .nav-primary { font-size: 12px; }
  .hero { padding-block: 68px 56px; }
  h1 { font-size: clamp(48px, 15vw, 72px); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .section-heading, .results-bar { align-items: start; flex-direction: column; }
  .filters { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .view-actions { width: 100%; flex-wrap: wrap; }
  .view-actions label { flex: 1 0 100%; }
  .method-grid { grid-template-columns: 1fr; }
  .footer-inner { align-items: start; flex-direction: column; gap: 24px; }
  .account-heading { align-items: start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .form-wide { grid-column: 1; }
  .login-layout { grid-template-columns: 1fr; }
  .login-intro { min-height: 42vh; }
  .login-card { min-height: 58vh; }
}
