:root {
  --ink: #25211d;
  --muted: #6d6257;
  --paper: #f4efe7;
  --panel: #fffaf1;
  --line: #d8cbbb;
  --olive: #59633f;
  --clay: #b45f43;
  --deep: #1f2b28;
  --white: #fffdf8;
  --shadow: 0 24px 70px rgba(43, 35, 27, 0.16);
}

* {
  box-sizing: border-box;
}

body,
section,
article,
div,
figure,
figcaption,
p,
h1,
h2,
h3,
a {
  min-width: 0;
  max-width: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(37, 33, 29, 0.05) 1px, transparent 1px) 0 0 / 76px 76px,
    linear-gradient(180deg, #f7f1e8 0%, #eee4d5 48%, #f8f4ec 100%);
  font-family: "IBM Plex Sans", sans-serif;
  line-height: 1.6;
}

body.auth-locked .site-hero,
body.auth-locked main,
body.auth-locked .site-footer {
  display: none;
}

body:not(.auth-locked) .auth-panel {
  display: none;
}

a {
  color: inherit;
  overflow-wrap: anywhere;
}

.auth-panel {
  display: grid;
  min-height: 100vh;
  padding: clamp(20px, 5vw, 72px);
  place-items: center;
}

.auth-box {
  width: min(100%, 620px);
  border: 1px solid var(--line);
  padding: clamp(26px, 5vw, 48px);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
}

.auth-box h1 {
  font-size: clamp(2.2rem, 6vw, 4.2rem);
}

.auth-box p {
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.auth-form label {
  color: var(--deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.auth-message {
  min-height: 1.5em;
  margin: 16px 0 0;
  font-weight: 700;
}

.site-hero {
  min-height: 92vh;
  padding: 24px clamp(18px, 5vw, 72px) 72px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto 62px;
  padding: 14px 0;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  border: 1px solid rgba(37, 33, 29, 0.16);
  border-radius: 999px;
  padding: 8px 14px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease;
}

.nav-button {
  border: 1px solid rgba(37, 33, 29, 0.16);
  border-radius: 999px;
  padding: 8px 14px;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.nav-links a:hover,
.nav-button:hover {
  background: var(--white);
  transform: translateY(-2px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
  gap: clamp(28px, 6vw, 78px);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  line-height: 1.08;
  hyphens: auto;
  overflow-wrap: normal;
  word-break: normal;
}

h1 {
  max-width: 820px;
  font-size: clamp(2.35rem, 5.2vw, 4.85rem);
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 3.8vw, 3.7rem);
  text-wrap: balance;
}

h3 {
  font-size: clamp(1.22rem, 1.55vw, 1.42rem);
  text-wrap: balance;
}

.hero-text {
  max-width: 680px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  hyphens: auto;
  overflow-wrap: anywhere;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 48px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  white-space: normal;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(37, 33, 29, 0.14);
}

.button.primary {
  color: var(--white);
  background: var(--deep);
}

.button.secondary {
  background: rgba(255, 253, 248, 0.64);
}

.portrait-panel {
  position: relative;
  justify-self: end;
  width: min(100%, 430px);
  margin: 0;
  padding: clamp(12px, 2vw, 18px);
  border: 1px solid var(--olive);
  background: rgba(255, 250, 241, 0.38);
  transform: rotate(1.5deg);
}

.portrait-panel::before {
  content: none;
}

.portrait-panel img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
  object-position: center 18%;
  filter: saturate(0.96) contrast(1.02);
  image-rendering: auto;
  box-shadow: var(--shadow);
}

.portrait-panel figcaption {
  display: grid;
  gap: 2px;
  margin-top: 18px;
  color: var(--muted);
  hyphens: auto;
  overflow-wrap: anywhere;
}

.portrait-panel strong {
  color: var(--ink);
}

main {
  overflow: hidden;
}

.profile-band,
.jobs-section,
.documents-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 84px clamp(18px, 5vw, 72px);
}

.section-heading {
  display: grid;
  grid-template-columns: 0.62fr 1.38fr;
  gap: 28px;
  align-items: end;
  margin-bottom: 34px;
}

.section-heading.compact {
  grid-template-columns: 1fr;
  max-width: 780px;
}

.strength-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.strength-grid article {
  min-height: 0;
  padding: clamp(20px, 2.4vw, 26px);
  background: rgba(255, 250, 241, 0.88);
  hyphens: auto;
  overflow-wrap: break-word;
}

.strength-grid span {
  display: block;
  margin-bottom: clamp(28px, 4vw, 56px);
  color: var(--clay);
  font-weight: 700;
}

.strength-grid h3,
.strength-grid p,
.documents-section h2,
.documents-section p,
.site-footer p {
  max-width: 100%;
  hyphens: auto;
  overflow-wrap: break-word;
}

.strength-grid p,
.job-card p,
.documents-section p,
.site-footer p {
  color: var(--muted);
}

.job-list {
  display: grid;
  gap: 18px;
}

.empty-state {
  border: 1px solid var(--line);
  padding: clamp(20px, 3vw, 28px);
  color: var(--muted);
  background: rgba(255, 253, 248, 0.82);
  font-weight: 700;
}

.job-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 24px;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 16px 42px rgba(43, 35, 27, 0.08);
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  color: var(--deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.form-field textarea {
  resize: vertical;
}

.job-form .button {
  justify-self: start;
}

.job-card {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 4vw, 44px);
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.76);
  box-shadow: 0 16px 42px rgba(43, 35, 27, 0.08);
  hyphens: auto;
  overflow-wrap: anywhere;
}

.job-card.is-applied {
  border-color: rgba(37, 33, 29, 0.16);
  background: rgba(228, 224, 216, 0.78);
}

.job-card.is-applied h3,
.job-card.is-applied .motivation-box p {
  color: rgba(37, 33, 29, 0.56);
  text-decoration: line-through;
}

.job-status {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--white);
  background: var(--olive);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.job-card > * {
  min-width: 0;
}

.job-card h3 {
  max-width: 100%;
}

.motivation-box {
  max-width: 78ch;
  padding: clamp(18px, 2.6vw, 26px);
  border: 1px solid rgba(89, 99, 63, 0.22);
  border-left: 5px solid var(--olive);
  background: rgba(255, 250, 241, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 253, 248, 0.8);
}

.motivation-box strong {
  display: block;
  margin-bottom: 10px;
  color: var(--deep);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.motivation-box p {
  margin: 0;
  color: var(--muted);
  hyphens: auto;
  overflow-wrap: anywhere;
}

.job-card.featured {
  border-color: rgba(89, 99, 63, 0.52);
  background: linear-gradient(135deg, rgba(255, 253, 248, 0.94), rgba(228, 219, 198, 0.72));
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  max-width: 100%;
}

.job-meta span {
  color: var(--clay);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.job-meta a,
.document-actions a,
.site-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-width: 0;
  border: 1.5px solid var(--deep);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  hyphens: auto;
  overflow-wrap: anywhere;
  white-space: normal;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.job-meta a,
.document-actions a {
  background: var(--white);
  box-shadow: 0 10px 24px rgba(43, 35, 27, 0.08);
}

.job-meta a::after {
  content: " ->";
  margin-left: 8px;
  font-weight: 700;
}

.job-meta a:hover,
.document-actions a:hover,
.site-footer a:hover {
  color: var(--white);
  background: var(--deep);
  transform: translateY(-2px);
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-actions button {
  min-height: 40px;
  border: 1px solid rgba(37, 33, 29, 0.24);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.72);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.status-actions button:hover {
  background: var(--white);
  transform: translateY(-2px);
}

.documents-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, max-content);
  gap: 34px;
  align-items: center;
  margin-bottom: 70px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  min-width: 0;
  max-width: 100%;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 28px clamp(18px, 5vw, 72px);
  color: var(--white);
  background: var(--deep);
}

.site-footer p {
  margin: 0;
  color: rgba(255, 253, 248, 0.78);
}

.site-footer a {
  border-color: rgba(255, 253, 248, 0.78);
}

@media (max-width: 900px) {
  .topbar,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-grid,
  .section-heading,
  .job-card,
  .job-form,
  .documents-section {
    grid-template-columns: 1fr;
  }

  .strength-grid {
    grid-template-columns: 1fr;
  }

  .documents-section,
  .document-actions {
    justify-content: flex-start;
  }

  .portrait-panel {
    justify-self: stretch;
  }

  .motivation-box {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .site-hero {
    padding-bottom: 48px;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-links a,
  .nav-button,
  .button,
  .job-meta a,
  .document-actions a,
  .site-footer a {
    width: 100%;
    border-radius: 18px;
  }

  .portrait-panel {
    transform: none;
  }

  .strength-grid {
    grid-template-columns: 1fr;
  }

  .strength-grid article {
    min-height: auto;
  }

  .strength-grid span {
    margin-bottom: 28px;
  }

  .job-card,
  .strength-grid article {
    padding: 20px;
  }

  h1 {
    font-size: clamp(2.1rem, 11vw, 3.25rem);
  }

  h2 {
    font-size: clamp(1.85rem, 10vw, 2.7rem);
  }

  h3 {
    font-size: 1.28rem;
    line-height: 1.12;
  }
}
