/* raffaelerusso.dev - one column, one page, no dependencies. */

:root {
  --bg:      #fafaf9;
  --fg:      #14140f;
  --muted:   #6b6b66;
  --rule:    #e4e2dd;
  --cta-bg:  #14140f;
  --cta-fg:  #fafaf9;
  --measure: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:     #101010;
    --fg:     #ededea;
    --muted:  #96968f;
    --rule:   #2a2a27;
    --cta-bg: #ededea;
    --cta-fg: #101010;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter,
               "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 10vh 1.5rem 6rem;
}

/* ---------------------------------------------------------------- hero */

h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.intro {
  margin: 1.75rem 0 0;
  max-width: 34rem;
}

.links {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}

.cta {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.6rem 1.1rem;
  background: var(--cta-bg);
  color: var(--cta-fg);
  border-radius: 6px;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.cta:hover { opacity: 0.8; }

/* --------------------------------------------------------------- links */

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule);
  transition: text-decoration-color 0.15s ease;
}

a:hover { text-decoration-color: currentColor; }

/* -------------------------------------------------------------- resume */

h2 {
  margin: 4.5rem 0 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.role { margin-top: 2.5rem; }

/* A second title under the same employer - keep it visually attached. */
.role--same-company { margin-top: 1.75rem; }

.role-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 1rem;
}

.role-head h3 {
  flex: 1 0 100%;
  margin: 0 0 0.15rem;
  font-size: 1rem;
  font-weight: 600;
}

.place {
  font-weight: 400;
  color: var(--muted);
}

.place::before { content: "· "; }

.title {
  margin: 0;
  flex: 1 1 auto;
}

.dates {
  margin: 0;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.role ul {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
}

.role li {
  margin-top: 0.5rem;
  padding-left: 0.25rem;
}

.role li::marker { color: var(--muted); }

/* ------------------------------------------- education / skills tables */

.facts {
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: 12rem 1fr;
  column-gap: 1.5rem;
  row-gap: 1rem;
}

.facts dt {
  font-weight: 600;
  font-size: 0.9375rem;
}

.facts dd { margin: 0; }

/* -------------------------------------------------------------- footer */

footer {
  margin-top: 5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.875rem;
}

footer p { margin: 0; }

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.85em;
}

/* -------------------------------------------------------------- narrow */

@media (max-width: 34rem) {
  main { padding-top: 6vh; }

  h1 { font-size: 1.75rem; }

  .facts {
    grid-template-columns: 1fr;
    row-gap: 0.25rem;
  }

  .facts dd { margin-bottom: 0.75rem; }

  .title { flex: 1 0 100%; }

  .dates { margin-left: 0; }
}

/* --------------------------------------------------------------- print */

@media print {
  :root {
    --bg: #fff;
    --fg: #000;
    --muted: #444;
    --rule: #ccc;
  }

  main { padding: 0; max-width: none; }

  .cta { display: none; }

  h2 { margin-top: 1.75rem; }

  .role { margin-top: 1.25rem; }

  .role, .facts { break-inside: avoid; }
}
