/* ─────────────────────────────────────────────
   dimaphil.github.io — Swiss-minimal personal card
   ───────────────────────────────────────────── */

:root {
  --paper: #fcfcfa;
  --ink: #16181c;
  --ink-soft: #5a5f68;
  --hairline: #e3e2dd;
  --accent: #0c62b8;
  --accent-ink: #0a4f94;
  --tag-bg: #f1f0eb;

  --sans: "Schibsted Grotesk", "Helvetica Neue", sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, "SF Mono", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  border-top: 3px solid var(--accent);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #fff; }

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.page {
  max-width: 44.5rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1.25rem, 5vw, 2rem) 3rem;
}

/* ── Meta labels (mono small caps) ───────────── */

.meta-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.meta-label a { color: inherit; }
.meta-label a:hover { color: var(--accent); }

/* ── Hero ────────────────────────────────────── */

.hero-top {
  display: flex;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 2.5rem;
}

.hero-main {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgb(22 24 28 / 0.12), 0 6px 18px rgb(22 24 28 / 0.08);
}

h1 {
  font-size: clamp(2.1rem, 6.5vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.role {
  margin-top: 0.6rem;
  font-size: 1.0625rem;
  color: var(--ink-soft);
  max-width: 32rem;
  text-wrap: balance;
}
.role a { font-weight: 600; }

/* ── Contact buttons ─────────────────────────── */

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover {
  text-decoration: none;
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
  color: #fff;
}

/* ── Facts strip ─────────────────────────────── */

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2.4rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.facts dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.2rem;
}
.facts dd { font-weight: 700; font-size: 0.98rem; letter-spacing: -0.01em; }

@media (max-width: 540px) {
  .facts { grid-template-columns: repeat(2, 1fr); row-gap: 1.2rem; }
}

/* ── Sections ────────────────────────────────── */

section { margin-top: 3.4rem; }

h2 {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  font-size: 0.8rem;
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 1.7rem;
}
.sec-num { color: var(--accent); font-weight: 500; }

.about {
  font-size: 1.17rem;
  line-height: 1.65;
  letter-spacing: -0.005em;
  max-width: 40rem;
}

/* ── Timeline (experience / education / awards) ── */

.timeline { list-style: none; }

.timeline > li {
  display: grid;
  grid-template-columns: 7.2rem 1fr;
  gap: 1.4rem;
  padding: 1.35rem 0;
}
.timeline > li + li { border-top: 1px solid var(--hairline); }

.when {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding-top: 0.22rem;
  white-space: nowrap;
}

.what h3 {
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.4;
}
.at { font-weight: 500; color: var(--ink-soft); }

.what p {
  margin-top: 0.45rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  max-width: 36rem;
}

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.tags li {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  background: var(--tag-bg);
  color: var(--ink-soft);
}

@media (max-width: 540px) {
  .timeline > li { grid-template-columns: 1fr; gap: 0.3rem; }
  .when { padding-top: 0; }
}

/* ── Skills ──────────────────────────────────── */

.skills div {
  display: grid;
  grid-template-columns: 7.2rem 1fr;
  gap: 1.4rem;
  padding: 0.8rem 0;
}
.skills div + div { border-top: 1px solid var(--hairline); }
.skills dt {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 0.3rem;
}
.skills dd { font-size: 0.97rem; }

@media (max-width: 540px) {
  .skills div { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* ── Footer ──────────────────────────────────── */

footer {
  margin-top: 4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
}

/* ── Load-in reveal ──────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: rise 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(var(--d, 0) * 70ms);
  }
  @keyframes rise {
    to { opacity: 1; transform: none; }
  }
}

/* ── Print ───────────────────────────────────── */

@media print {
  body { border-top: none; font-size: 10.5pt; }
  .contact-row .btn { border: none; padding: 0; margin-right: 1rem; }
  .btn-primary { display: none; }
  .reveal { animation: none; opacity: 1; transform: none; }
  a { color: var(--ink); }
}
