:root {
  --ink: #182028;
  --muted: #536071;
  --bg: #f6f4ee;
  --surface: #ffffff;
  --surface-2: #eef4f0;
  --line: #d8e0dc;
  --primary: #0f6d62;
  --primary-strong: #0b4f47;
  --accent: #d5663e;
  --radius: 18px;
  --shadow: 0 12px 36px rgba(18, 31, 45, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Sora", sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, #f4efe2 0%, #f2f8f3 40%, #f8f4ed 100%);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Spectral", serif;
  line-height: 1.2;
}

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

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.section {
  padding: 4.5rem 0;
}

.kicker {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 1.6rem;
}

.section-heading p {
  margin: 0.75rem 0 0;
  color: var(--muted);
}

.bg-orb {
  position: fixed;
  z-index: -1;
  width: 360px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(44px);
  opacity: 0.45;
}

.bg-orb-left {
  top: -80px;
  left: -90px;
  background: #8bc8af;
}

.bg-orb-right {
  top: 20vh;
  right: -120px;
  background: #f2b98d;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(246, 244, 238, 0.82);
  border-bottom: 1px solid rgba(24, 32, 40, 0.08);
}

.nav-wrap {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-right {
  margin-left: auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
}

.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, var(--primary) 0%, var(--accent) 100%);
}

.brand-text {
  font-size: 0.95rem;
}

.site-nav {
  display: flex;
  gap: 1.1rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.site-nav a {
  color: #24303d;
  transition: color 180ms ease;
}

.site-nav a:hover {
  color: var(--primary);
}

.auth-corner {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.auth-quick-status {
  margin: 0;
  color: #4f5f71;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.auth-open-btn {
  gap: 0.45rem;
  padding-inline: 0.95rem;
}

.auth-open-btn i {
  font-size: 0.82rem;
}

.auth-open-btn.active {
  border-color: #8fbcb2;
  background: #e7f3ee;
  color: #0f5f54;
}

.menu-button {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  color: var(--ink);
}

.hero {
  padding-top: 5.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.8rem;
  align-items: start;
}

.hero-copy h1 {
  margin: 0.2rem 0 1rem;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
}

.hero-copy p {
  margin: 0;
  color: var(--muted);
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.status-line {
  margin: 1rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #455365;
  font-size: 0.88rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.3rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: #e8ebef;
  color: #374253;
}

.status-pill.online {
  background: #dbf4e8;
  color: #125b4f;
}

.status-pill.offline {
  background: #ffe8df;
  color: #99411f;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(15, 109, 98, 0.25);
}

.btn-primary:hover {
  background: var(--primary-strong);
}

.btn-secondary {
  border-color: #cfd8d4;
  background: rgba(255, 255, 255, 0.68);
}

.btn-ghost {
  border-color: #c5d0ca;
  background: #fff;
  color: #405062;
}

.btn-ghost[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.hero-meta {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
  display: grid;
  gap: 0.45rem;
  color: #384758;
  font-size: 0.9rem;
}

.hero-meta i {
  width: 1.2rem;
  color: var(--accent);
}

.hero-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow);
}

.hero-panel h2 {
  font-size: 1.25rem;
  margin-bottom: 0.9rem;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.panel-grid article {
  background: var(--surface-2);
  border: 1px solid #dce7e0;
  border-radius: 0.9rem;
  padding: 0.75rem;
}

.stat {
  margin: 0;
  color: var(--primary-strong);
  font-weight: 800;
  font-size: 1.2rem;
}

.panel-grid article p {
  margin: 0;
  font-size: 0.86rem;
}

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

.card,
.job-card,
.panel,
.architecture {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.card h3,
.job-card h3 {
  font-family: "Sora", sans-serif;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.card p,
.job-card p {
  margin: 0.25rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.inline-meta {
  margin-top: 0.6rem;
  color: #334152;
  font-weight: 600;
  font-size: 0.88rem;
}

.badge {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  background: #e8f5ef;
  color: #175a4f;
}

.job-filter {
  position: relative;
  margin-bottom: 1rem;
}

.job-filter i {
  position: absolute;
  top: 50%;
  left: 0.95rem;
  transform: translateY(-50%);
  color: #6b7683;
}

.job-filter input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  background: rgba(255, 255, 255, 0.82);
}

.job-filter input:focus {
  outline: 2px solid #78b4a7;
  border-color: #78b4a7;
}

.job-actions {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c6d3cc;
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.42rem 0.8rem;
  cursor: pointer;
}

.btn-action:hover {
  border-color: var(--primary);
}

.btn-action.strong {
  border-color: transparent;
  background: var(--primary);
  color: #fff;
}

.btn-action.strong:hover {
  background: var(--primary-strong);
}

.btn-action.danger {
  border-color: #f0ccc0;
  color: #8f3315;
}

.stack-form {
  margin-top: 0.95rem;
  display: grid;
  gap: 0.75rem;
}

.stack-form label {
  display: grid;
  gap: 0.35rem;
  color: #334354;
  font-size: 0.88rem;
  font-weight: 600;
}

.stack-form input,
.stack-form select,
.stack-form textarea {
  width: 100%;
  border: 1px solid #cfdbd5;
  border-radius: 0.75rem;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  color: #213040;
  background: rgba(255, 255, 255, 0.88);
}

.stack-form textarea {
  resize: vertical;
}

.stack-form input:focus,
.stack-form select:focus,
.stack-form textarea:focus {
  outline: 2px solid #78b4a7;
  border-color: #78b4a7;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.auth-inline-status {
  margin-top: 0.8rem;
}

.form-status {
  margin: 0.15rem 0 0;
  min-height: 1.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #435163;
}

.form-status.success {
  color: #0f6648;
}

.form-status.error {
  color: #963e1d;
}

.helper-note {
  margin: 0.45rem 0 0;
  color: #536274;
  font-size: 0.82rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.panel ul {
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.listing-grid,
.application-grid {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.75rem;
}

.listing-item,
.application-item,
.empty-state {
  border: 1px solid #d5e1db;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.82);
  padding: 0.75rem;
}

.listing-item h3,
.application-item h3 {
  font-family: "Sora", sans-serif;
  font-size: 0.98rem;
  margin-bottom: 0.3rem;
}

.listing-item p,
.application-item p,
.empty-state p {
  margin: 0.2rem 0;
  color: #506071;
  font-size: 0.86rem;
}

.application-actions {
  margin-top: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cv-link {
  color: #0f6d62;
  font-weight: 700;
  text-decoration: none;
}

button.cv-link {
  background: #fff;
}

.cv-link:hover {
  color: #0b4f47;
}

.listing-actions {
  margin-top: 0.5rem;
}

.job-detail-panel {
  border: 1px solid #d7e1db;
  border-radius: 0.9rem;
  background: #f7fbf8;
  padding: 0.9rem;
  margin-bottom: 0.9rem;
}

.job-detail-panel h2 {
  font-size: 1.25rem;
  margin-bottom: 0.45rem;
}

.job-detail-list {
  margin: 0.65rem 0 0;
  padding-left: 1.1rem;
  color: #405062;
  font-size: 0.88rem;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.timeline li {
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--primary);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 0.75rem;
}

.architecture p {
  margin: 0.8rem 0 0;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid rgba(24, 32, 40, 0.08);
  background: rgba(255, 255, 255, 0.7);
}

.footer-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.86rem;
  color: #586577;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 22, 30, 0.55);
}

.modal-dialog {
  position: relative;
  width: min(640px, calc(100% - 1.2rem));
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d5e2db;
  border-radius: 1rem;
  box-shadow: 0 24px 46px rgba(15, 26, 38, 0.25);
  padding: 1rem;
}

.cv-modal-dialog {
  width: min(900px, calc(100% - 1.2rem));
}

.auth-modal-dialog {
  width: min(560px, calc(100% - 1.2rem));
}

.auth-role-switch {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #d4e0d9;
  border-radius: 999px;
  overflow: hidden;
  background: #f3f7f4;
}

.auth-role-tab {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  color: #435365;
  padding: 0.58rem 0.8rem;
  cursor: pointer;
}

.auth-role-tab.active {
  background: #0f6d62;
  color: #fff;
}

.auth-panel {
  margin-top: 0.85rem;
}

.cv-modal-tools {
  display: flex;
  justify-content: flex-start;
  margin: 0.45rem 0 0.75rem;
}

.cv-modal-tools .btn[disabled] {
  opacity: 0.62;
  cursor: not-allowed;
}

.cv-preview-frame {
  width: 100%;
  min-height: 68vh;
  border: 1px solid #d5e2db;
  border-radius: 0.75rem;
  background: #fff;
}

.close-modal {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d4ddd7;
  border-radius: 0.65rem;
  background: #fff;
  color: #354454;
  cursor: pointer;
}

body.modal-open {
  overflow: hidden;
}

.reveal {
  opacity: 1;
  transform: translateY(0);
}

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.js .reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 980px) {
  .hero-grid,
  .card-grid,
  .job-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    min-width: 190px;
    display: none;
    flex-direction: column;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .auth-quick-status {
    display: none;
  }
}

@media (max-width: 620px) {
  .section {
    padding: 3.4rem 0;
  }

  .status-line {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .hero {
    padding-top: 4.4rem;
  }

  .cv-preview-frame {
    min-height: 52vh;
  }

  .footer-wrap {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 0.7rem 0;
  }
}
