:root {
  --ink: #17212b;
  --muted: #5d6875;
  --line: #d8dde3;
  --paper: #fbfaf7;
  --soft: #eef2f4;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --rust: #b45309;
  --white: #ffffff;
  --shadow: 0 20px 50px rgba(23, 33, 43, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(251, 250, 247, 0.92);
  border-bottom: 1px solid rgba(216, 221, 227, 0.8);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--white);
  background: var(--ink);
  border-radius: 8px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.nav a {
  text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--accent-dark);
}

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  align-items: center;
  padding: clamp(48px, 8vw, 104px) clamp(20px, 5vw, 72px);
  background:
    linear-gradient(120deg, rgba(15, 118, 110, 0.12), transparent 42%),
    linear-gradient(280deg, rgba(180, 83, 9, 0.1), transparent 38%),
    var(--paper);
}

.hero-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: clamp(32px, 7vw, 88px);
  align-items: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(3rem, 7vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  line-height: 1.25;
}

h4 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  line-height: 1.3;
}

.lead {
  max-width: 680px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

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

.button.secondary {
  color: var(--ink);
  background: transparent;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.profile-panel {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.portrait {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  margin-bottom: 22px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(23, 33, 43, 0.92), rgba(15, 118, 110, 0.9)),
    var(--accent);
  border-radius: 8px;
  font-size: clamp(5rem, 12vw, 8rem);
  font-weight: 800;
}

.quick-facts {
  display: grid;
  gap: 14px;
  margin: 0;
}

.quick-facts div {
  display: grid;
  gap: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

dd {
  margin: 0;
  font-weight: 700;
}

.section {
  padding: clamp(56px, 9vw, 104px) clamp(20px, 5vw, 72px);
}

.section > * {
  width: min(1120px, 100%);
  margin-inline: auto;
}

.section.muted {
  background: var(--soft);
}

.section-heading {
  margin-bottom: 28px;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 5vw, 64px);
  color: var(--muted);
  font-size: 1.08rem;
}

.timeline {
  display: grid;
  gap: 18px;
}

.timeline-item,
.skill-card {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.period {
  margin: 0 0 8px;
  color: var(--rust);
  font-size: 0.9rem;
  font-weight: 800;
}

.company {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 700;
}

.timeline-item p:last-child,
.skill-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.certificates-block {
  margin-top: 42px;
}

.certificates-heading {
  margin-bottom: 18px;
}

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.certificate-card {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.certificate-date {
  margin: 0;
  color: var(--rust);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.certificate-card p:not(.certificate-date) {
  margin: 0;
  color: var(--muted);
}


.contact-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.5fr);
  gap: 28px;
  align-items: center;
}

.contact-band p {
  max-width: 620px;
  color: var(--muted);
}

.contact-list {
  display: grid;
  gap: 10px;
  font-style: normal;
}

.contact-list a {
  display: flex;
  min-height: 46px;
  align-items: center;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.site-footer {
  padding: 24px clamp(20px, 5vw, 72px);
  color: var(--muted);
  background: var(--ink);
}

.site-footer p {
  width: min(1120px, 100%);
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.78);
}

.auth-page {
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(15, 118, 110, 0.12), transparent 45%),
    var(--paper);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(440px, 100%);
  display: grid;
  gap: 20px;
  padding: clamp(24px, 6vw, 38px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-card h1,
.dashboard h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

input[type="email"],
input[type="password"],
input[type="file"],
input[type="text"],
input[type="url"],
textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

input[type="file"] {
  padding: 10px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.editor-form {
  display: grid;
  gap: 22px;
}

.editor-section {
  display: grid;
  gap: 16px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.editor-section h2 {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.editor-grid {
  display: grid;
  gap: 16px;
}

.editor-grid.two-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editor-grid.three-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.form-error,
.form-success {
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 700;
}

.form-error {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
}

.form-success {
  color: #14532d;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}

.dashboard {
  min-height: calc(100vh - 76px);
}

.upload-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.files-list {
  margin-top: 34px;
}

.files-list h2 {
  margin-bottom: 18px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.empty-state {
  color: var(--muted);
}

.file-table {
  display: grid;
  gap: 10px;
}

.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.file-row span:first-child {
  overflow-wrap: anywhere;
}

.file-row span:last-child {
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 820px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner,
  .two-column,
  .contact-band,
  .upload-box,
  .editor-grid.two-fields,
  .editor-grid.three-fields {
    grid-template-columns: 1fr;
  }

  .profile-panel {
    max-width: 420px;
  }

  .skills-grid,
  .certificates-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .hero-actions,
  .button {
    width: 100%;
  }

  .skills-grid,
  .certificates-grid {
    grid-template-columns: 1fr;
  }
}
