:root {
  --bg: #f3f0e9;
  --paper: #ffffff;
  --ink: #171717;
  --muted: #66645f;
  --line: #d9d4ca;
  --accent: #1f5a45;
  --accent-dark: #153f31;
  --soft-accent: #e9f0ec;
  --shadow: 0 24px 70px rgba(35, 30, 22, 0.12);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(31, 90, 69, 0.09), transparent 28rem),
    var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 26px auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.language-switcher {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(23, 23, 23, 0.08);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.language-button {
  min-width: 46px;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.language-button.is-active {
  background: var(--accent);
  color: #fff;
}

.resume {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(28px, 5vw, 68px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  align-items: center;
  gap: 56px;
  padding-bottom: 34px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(2.65rem, 7vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.role {
  margin: 14px 0 24px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-style: italic;
  line-height: 1.2;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.contact-link,
.linkedin-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.contact-link {
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 10px 15px;
}

.linkedin-button {
  background: var(--accent);
  color: #fff;
  padding: 11px 17px;
}

.contact-link:hover,
.linkedin-button:hover {
  transform: translateY(-2px);
}

.contact-link:hover {
  border-color: var(--ink);
}

.linkedin-button:hover {
  background: var(--accent-dark);
}

.contact-link svg,
.linkedin-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: 0 0 auto;
}

.portrait-frame {
  position: relative;
  width: 230px;
  aspect-ratio: 4 / 5;
  justify-self: end;
  border-radius: 18px;
  overflow: hidden;
  background: var(--soft-accent);
  box-shadow: 14px 14px 0 var(--soft-accent);
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(23, 23, 23, 0.08);
  border-radius: inherit;
  pointer-events: none;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.resume-section {
  padding: 28px 0 8px;
}

.section-heading {
  border-bottom: 2px solid var(--ink);
  margin-bottom: 18px;
}

.section-heading h2 {
  display: inline-block;
  margin: 0 0 7px;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  letter-spacing: -0.03em;
}

.profile-text {
  color: #2b2b2b;
  max-width: 920px;
  font-size: 1rem;
}

.profile-text p {
  margin-bottom: 12px;
}

.profile-text p:last-child {
  margin-bottom: 0;
}

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

.timeline-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  padding: 2px 0 16px;
  border-bottom: 1px solid #eeeae2;
}

.timeline-item:last-child {
  border-bottom: 0;
}

.timeline-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.timeline-subtitle {
  margin: 3px 0 0;
  color: #2f2f2f;
}

.timeline-meta {
  min-width: 150px;
  text-align: right;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.compact-timeline .timeline-item {
  padding-bottom: 14px;
}

.education-note {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.certificate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.certificate-card {
  display: flex;
  flex-direction: column;
  min-height: 150px;
  padding: 18px;
  background: #fbfaf7;
  border: 1px solid #e7e2d8;
  border-radius: 16px;
}

.certificate-card h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
  line-height: 1.45;
}

.certificate-issuer {
  margin: 0 0 12px;
  color: #343434;
  font-size: 0.9rem;
}

.certificate-date,
.certificate-id {
  margin: auto 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.certificate-id {
  margin-top: 4px;
}

.language-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.language-chip {
  padding: 10px 15px;
  border-radius: 999px;
  background: var(--soft-accent);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.9rem;
}

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

.skill-item {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 13px 15px;
  border: 1px solid #e5e0d7;
  border-radius: 13px;
  background: #fff;
  font-size: 0.92rem;
  font-weight: 600;
}

.skill-item::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 8px 0;
  color: #6c6962;
  font-size: 0.82rem;
}

:focus-visible {
  outline: 3px solid rgba(31, 90, 69, 0.35);
  outline-offset: 3px;
}

@media (max-width: 820px) {
  .resume {
    padding: 32px;
  }

  .hero {
    grid-template-columns: 1fr 180px;
    gap: 28px;
  }

  .portrait-frame {
    width: 180px;
  }

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

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 22px, 1120px);
    margin: 12px auto 22px;
  }

  .resume {
    padding: 24px 20px 34px;
    border-radius: 20px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .portrait-frame {
    width: min(100%, 250px);
    justify-self: start;
    order: -1;
  }

  h1 {
    font-size: clamp(2.7rem, 16vw, 4.5rem);
  }

  .contact-actions {
    align-items: stretch;
  }

  .contact-link,
  .linkedin-button {
    width: 100%;
    justify-content: center;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .timeline-meta {
    text-align: left;
    min-width: 0;
  }

  .certificate-grid,
  .skill-grid {
    grid-template-columns: 1fr;
  }

  .certificate-card {
    min-height: 0;
  }

  .site-footer {
    flex-direction: column;
    gap: 2px;
  }
}

@media print {
  body {
    background: #fff;
  }

  .page-shell {
    width: 100%;
    margin: 0;
  }

  .site-header,
  .site-footer {
    display: none;
  }

  .resume {
    box-shadow: none;
    border-radius: 0;
    padding: 18mm;
  }

  .linkedin-button,
  .contact-link {
    border: 1px solid #aaa;
    background: #fff;
    color: #111;
  }

  .resume-section,
  .timeline-item,
  .certificate-card {
    break-inside: avoid;
  }
}
