/* Palette sampled verbatim from kitaPorto.jpg */
:root {
  --paper: #ebeaea;
  --paper-2: #f1f1f1;
  --red: #d73a4d;
  --red-soft: #d65461;
  --red-deep: #a9555c;
  --ink: #353536;
  --ink-strong: #232324;
  --gray: #525053;
  --gray-soft: #a39fa0;
  --pink: #dda4a9;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  padding: 0 clamp(16px, 5vw, 72px);
}

a { color: inherit; text-decoration: none; }
.arr { font-size: 0.85em; }

/* Top label, like the small centered text on the poster */
.top-label {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray);
  padding: 28px 0 8px;
}

/* Sticky section nav */
.section-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
  max-width: 920px;
  margin: 0 auto;
}

.section-nav a {
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  -webkit-tap-highlight-color: transparent;
}

.section-nav a:active {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper-2);
}

.section-nav a.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper-2);
}

section { scroll-margin-top: 78px; }

/* Hero */
.role {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-weight: 500;
  text-align: center;
  font-size: clamp(1.25rem, 3vw, 2rem);
  margin-top: 20px;
}

.name {
  font-family: "Archivo Black", sans-serif;
  font-weight: 400;
  color: var(--red);
  text-align: center;
  font-size: clamp(2.4rem, 8.4vw, 6.6rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  margin: 6px 0 26px;
}

/* Pills, the poster chip vocabulary */
.pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
  max-width: 920px;
  margin: 0 auto;
}

.pills li {
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: transparent;
}

.pills li.pill-red,
.pills .pill-red {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper-2);
}
.pills li.pill-red a,
.pills .pill-red a { color: var(--paper-2); }

/* Hero card, the rounded red panel with the portrait breaking its top edge */
.hero-card {
  position: relative;
  background: var(--red);
  border-radius: 28px;
  max-width: 920px;
  margin: 26px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.hero-about {
  padding: clamp(24px, 5vw, 52px) clamp(20px, 6vw, 80px) clamp(14px, 3vw, 28px);
  text-align: center;
  color: var(--paper-2);
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
  line-height: 1.65;
  max-width: 700px;
}

.portrait-wrap {
  position: relative;
  width: min(62%, 380px);
  border-radius: 999px;
  border: 8px solid var(--paper);
  overflow: hidden;
  transform: translateY(clamp(20px, 3vw, 40px));
  margin-bottom: calc(-1 * clamp(20px, 3vw, 40px));
  box-shadow: 0 18px 44px rgba(53, 53, 54, 0.28);
}

.portrait {
  display: block;
  width: 100%;
  filter: saturate(0.8) sepia(0.15) contrast(1.05) brightness(1.02);
}

.portrait-tint {
  position: absolute;
  inset: 0;
  background: var(--red);
  mix-blend-mode: soft-light;
  opacity: 0.4;
  pointer-events: none;
}

/* Sections */
section { max-width: 920px; margin: 0 auto; padding: 56px 0 0; }

.section-label {
  font-family: "Archivo Black", sans-serif;
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--ink-strong);
  margin-bottom: 22px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.project {
  border: 1.5px solid var(--ink);
  border-radius: 20px;
  padding: 20px 20px 16px;
  background: transparent;
}

.project h3 {
  font-family: "Archivo Black", sans-serif;
  font-weight: 400;
  font-size: 1rem;
  color: var(--ink-strong);
  margin-bottom: 8px;
}

.project p { font-size: 0.92rem; margin-bottom: 12px; }

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
}

.tools li {
  border: 1px solid var(--gray-soft);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray);
}

.star { color: var(--red); font-size: 0.9em; }

.case-details { margin: 14px 0 18px; }

.case-details summary {
  cursor: pointer;
  list-style: none;
  display: inline-block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--gray);
  border-bottom: 1.5px solid var(--gray-soft);
}

.case-details summary::-webkit-details-marker { display: none; }

.case-details[open] summary { color: var(--red); border-color: var(--red); }

.case-details p { font-size: 0.9rem; margin: 8px 0; }

.more-line {
  margin-top: 14px;
  font-size: 0.88rem;
  color: var(--gray);
}

/* Web scrapers block */
.scrapers-block {
  border: 2px solid var(--ink);
  border-radius: 28px;
  padding: clamp(24px, 4vw, 44px);
}

.scrapers-title {
  font-family: "Archivo Black", sans-serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  color: var(--red);
  line-height: 1;
  margin-bottom: 4px;
}

.scrapers-sub {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  margin-bottom: 18px;
}

.scrapers-block p {
  font-size: 1rem;
  margin: 10px 0;
}

.scrapers-block a {
  font-weight: 600;
  border-bottom: 2px solid var(--red);
  white-space: nowrap;
}

/* Rows for experience, education, certifications */
.rows { display: grid; gap: 18px; }

.row {
  border: 1.5px solid var(--ink);
  border-radius: 20px;
  padding: 18px 20px;
}

.row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.row h3 {
  font-family: "Archivo Black", sans-serif;
  font-weight: 400;
  font-size: 0.98rem;
  color: var(--ink-strong);
}

.dates {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--red-deep);
  white-space: nowrap;
}

.row ul { margin-left: 18px; }
.row li { font-size: 0.92rem; margin: 3px 0; }
.row p { font-size: 0.92rem; }

/* Skills and contact reuse the pill row */
#skills .pills li, #contact .pills li { font-size: 13px; }

footer {
  max-width: 920px;
  margin: 0 auto;
  padding: 48px 0 320px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--gray);
}

/* Hover styling only where a real hover exists. On touch phones :hover
   fires on tap and sticks, which left stale red pills behind. */
@media (hover: hover) {
  a:hover { color: var(--red); }

  .section-nav a:hover {
    background: var(--red);
    border-color: var(--red);
    color: var(--paper-2);
  }

  .pills li.pill-red a:hover,
  .pills .pill-red a:hover { color: var(--pink); }

  .project h3 a:hover { color: var(--red); }

  .case-details summary:hover {
    color: var(--red);
    border-color: var(--red);
  }

  .scrapers-block a:hover { color: var(--red); }
}

@media (max-width: 560px) {
  .pills li { font-size: 11px; padding: 6px 12px; }
  .row-head { flex-direction: column; gap: 2px; }
}
