/* samarikas.com: a hero, project cards and key numbers. Restrained: system fonts, no frameworks, no animation. */

:root {
  color-scheme: light dark;
  --bg: #f8f8f7;
  --surface: #ffffff;
  --text: #17181a;
  --muted: #5c5f65;
  --faint: #8a8d93;
  --rule: #e5e5e2;
  --accent: #1f4e9c;
  --accent-soft: rgba(31, 78, 156, 0.07);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1012;
    --surface: #17181b;
    --text: #e8e9eb;
    --muted: #a2a5ab;
    --faint: #7b7e85;
    --rule: #2a2c30;
    --accent: #8fb0ec;
    --accent-soft: rgba(143, 176, 236, 0.09);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  font-variant-numeric: lining-nums;
}

.wrap {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 2rem;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

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

/* Top bar */

.bar {
  border-bottom: 1px solid var(--rule);
}

.bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  font-weight: 600;
  color: var(--text);
}

.bar nav {
  display: flex;
  gap: 1.75rem;
  font-size: 0.95rem;
}

.bar nav a {
  color: var(--muted);
}

.bar nav a:hover {
  color: var(--text);
  text-decoration: none;
}

/* Hero */

.hero {
  padding: 6.5rem 0 5.5rem;
  background:
    radial-gradient(ellipse 60% 70% at 85% 0%, var(--accent-soft), transparent 70%);
  border-bottom: 1px solid var(--rule);
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.hero h1 {
  margin: 0;
  font-size: 3.4rem;
  line-height: 1.05;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.hero .lede {
  margin: 1.25rem 0 0;
  max-width: 38rem;
  font-size: 1.45rem;
  line-height: 1.4;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.btn {
  display: inline-block;
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
}

.btn:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

/* Sections */

.section {
  padding: 4.5rem 0 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

h2 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.about {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 2rem;
}

.about p {
  margin: 0;
  max-width: 40rem;
  font-size: 1.2rem;
  line-height: 1.55;
}

/* Cards */

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
}

.card-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.85rem;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--faint);
}

.kicker::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 2px;
  background: var(--accent);
}

.card-links {
  display: inline-flex;
  gap: 1.1rem;
}

.card h3 {
  margin: 0.9rem 0 0;
  font-size: 1.35rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
  max-width: 44rem;
}

.card .meta {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.card .summary {
  margin: 0.6rem 0 0;
  max-width: 46rem;
}

.facts {
  margin: 1rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--rule);
  list-style: none;
  font-size: 0.95rem;
  color: var(--muted);
}

.facts li {
  position: relative;
  margin: 0 0 0.45rem;
  padding-left: 1rem;
}

.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.4rem;
  height: 1px;
  background: var(--faint);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: auto 0 0;
  padding: 1rem 0 0;
  list-style: none;
}

.tags li {
  padding: 0.1rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Key numbers on the cards */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.4rem 0 0;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  list-style: none;
}

.stats li {
  display: flex;
  flex-direction: column;
}

.stats strong {
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.stats span {
  font-size: 0.9rem;
  color: var(--muted);
}

.stats + .facts {
  border-top: 0;
}

/* Background: one row per role, the dates on the left */

.timeline {
  border-top: 1px solid var(--rule);
}

.entry {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.entry .when {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

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

.entry .role {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.entry p:not(.when):not(.role) {
  margin: 0.6rem 0 0;
  max-width: 46rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.entry .facts {
  margin: 0.6rem 0 0;
  padding: 0;
  border-top: 0;
  max-width: 46rem;
}

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

.facts b {
  font-weight: 600;
  color: var(--text);
}

/* Skills */

.skills {
  margin: 0;
  border-top: 1px solid var(--rule);
  font-size: 0.95rem;
}

.skills div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 2rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
}

.skills dt {
  font-weight: 600;
}

.skills dd {
  margin: 0;
  color: var(--muted);
}

.nowrap {
  white-space: nowrap;
}

/* Contact */

.contact {
  padding: 4.5rem 0 4rem;
}

.contact .email {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  word-break: break-word;
}

.contact .more {
  margin: 1rem 0 0;
}

.contact .more a + a {
  margin-left: 1.5rem;
}

.foot {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0 2.5rem;
  font-size: 0.85rem;
  color: var(--faint);
}

.foot p {
  margin: 0;
}

/* Tablets and phones */

@media (max-width: 52rem) {
  .entry,
  .skills div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .about {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 40rem) {
  .wrap {
    padding: 0 1.25rem;
  }

  .bar nav {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .brand {
    font-size: 0.95rem;
  }

  .hero {
    padding: 3.5rem 0 3rem;
  }

  .hero h1 {
    font-size: 2.4rem;
  }

  .hero .lede {
    font-size: 1.2rem;
  }

  .section {
    padding-top: 3rem;
  }

  .about p {
    font-size: 1.1rem;
  }

  .card {
    padding: 1.35rem;
  }

  .card h3 {
    font-size: 1.2rem;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .contact {
    padding: 3rem 0;
  }

  .contact .email {
    font-size: 1.15rem;
  }
}

@media (max-width: 26rem) {
  .bar .wrap {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.15rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
}
