/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base */
:root {
  --text: #1a1a1a;
  --muted: #555;
  --border: #e0e0e0;
  --accent: #2563eb;
  --bg: #fff;
  --max-width: 720px;
  --space: 1.25rem;
}

html {
  font-size: 16px;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  padding: 2rem 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.portrait {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.header-text {
  min-width: 0;
}

.name {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.title {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.visitor-row {
  margin-top: 1rem;
  min-height: 1.25rem;
}

.visitor-count {
  display: inline-block;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--muted);
}

@media (max-width: 480px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}

/* Sections */
.section {
  margin-bottom: 2rem;
}

.section h2 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: var(--space);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.section p {
  color: var(--text);
  margin-bottom: 0.5rem;
}

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

/* Entries */
.entry {
  margin-bottom: 1.25rem;
}

.entry:last-child {
  margin-bottom: 0;
}

.entry-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin-bottom: 0.4rem;
}

.entry-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
}

.meta {
  font-size: 0.875rem;
  color: var(--muted);
}

.entry ul {
  padding-left: 1.15rem;
}

.entry li {
  margin-bottom: 0.25rem;
}

.entry li:last-child {
  margin-bottom: 0;
}

/* Skills */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.skills li {
  font-size: 0.875rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
}

/* Print / PDF friendly */
@media print {
  body {
    padding: 0;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  .portrait {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .visitor-row {
    display: none;
  }
}
