/* ============================================================
   Michael Opsha — portfolio
   Theme: reduction. Editor paper, ink prose, mono data.
   ============================================================ */

:root {
  --paper:  #EEF0F3;
  --ink:    #14161A;
  --muted:  #656B78;
  --hair:   #D2D6DE;
  --accent: #2B44E8;
  --strike: #9AA0AC;

  --sans: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --measure: 42rem;      /* ~680px reading column */
  --gutter: clamp(1.25rem, 6vw, 8rem);
  --rhythm: clamp(3.5rem, 8vw, 6rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;      /* 17px */
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Links ---- */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Visible keyboard focus everywhere */
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: .55rem .9rem;
  z-index: 10;
}
.skip-link:focus {
  left: var(--gutter);
  top: .6rem;
  text-decoration: none;
}

/* Placeholder links that are not yet real */
.placeholder {
  color: var(--muted);
  font-family: var(--mono);
  font-size: .8125rem;
  cursor: not-allowed;
  border-bottom: 1px dashed var(--hair);
}
.placeholder:hover { text-decoration: none; }

/* ---- Top bar ---- */
.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem var(--gutter) 0;
  flex-wrap: wrap;
}
.wordmark {
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.wordmark:hover { text-decoration: none; }
.nav {
  display: flex;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: .8125rem;
}
.nav a { color: var(--muted); }
.nav a:hover { color: var(--ink); }

/* ---- Shared layout column ---- */
.hero,
.section {
  max-width: calc(var(--measure) + var(--gutter) * 2);
  margin-inline: 0;
  padding-inline: var(--gutter);
}

/* ============================================================
   HERO — the one bold moment
   ============================================================ */
.hero {
  padding-top: clamp(3.5rem, 9vw, 7rem);
  padding-bottom: var(--rhythm);
}

.portrait {
  display: block;
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--hair);
  margin: 0 0 1.6rem;
}

.hero__statement {
  font-size: clamp(1.6rem, 3.4vw, 2.35rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 24ch;
  margin: 0 0 .75rem;
}
.hero__sub {
  color: var(--muted);
  max-width: 40ch;
  margin: 0 0 2rem;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 1.25rem 1.5rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  padding: .7rem 1.15rem;
  border-radius: 4px;
}
.btn:hover { text-decoration: none; background: var(--accent); }
.hero__actions .link { color: var(--accent); }

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding-block: 0;
  margin-bottom: var(--rhythm);
}
.section__h {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 1.5rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--hair);
}

/* ---- Projects (details/summary) ---- */
.project {
  border-bottom: 1px solid var(--hair);
  padding: 1.1rem 0;
}
.project:first-of-type { padding-top: 0; }

.project__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}
.project__head::-webkit-details-marker { display: none; }
.project__head::after {
  content: "+";
  font-family: var(--mono);
  color: var(--muted);
  font-size: 1.1rem;
  order: 3;
}
.project[open] .project__head::after { content: "\2212"; } /* minus */

.project__name {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
  flex: 1 1 auto;
}
.project__year {
  font-family: var(--mono);
  font-size: .8125rem;
  color: var(--muted);
}

.project__body { margin-top: .9rem; max-width: var(--measure); }
.project__body p { margin: 0 0 1rem; }

.meta {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: .8125rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.stat {
  font-family: var(--mono);
  color: var(--accent);
  font-weight: 500;
}

/* ---- Roles (experience / education) ---- */
.role { margin-bottom: 2rem; max-width: var(--measure); }
.role:last-child { margin-bottom: 0; }
.role__head { margin-bottom: .7rem; }
.role__title {
  font-size: 1.075rem;
  font-weight: 500;
  margin: 0 0 .15rem;
}
.role__at { color: var(--ink); }
.role__when {
  display: block;
  font-family: var(--mono);
  font-size: .8125rem;
  color: var(--muted);
  margin-top: .2rem;
}
.role__at + .role__when { margin-top: .1rem; }

.role__points {
  margin: 0;
  padding-left: 1.1rem;
}
.role__points li { margin-bottom: .6rem; }
.role__points li:last-child { margin-bottom: 0; }

/* ---- Skills ---- */
.skills { margin: 0; max-width: var(--measure); }
.skills__row {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--hair);
}
.skills__row:last-child { border-bottom: none; }
.skills dt {
  font-family: var(--mono);
  font-size: .8125rem;
  color: var(--muted);
  padding-top: .1rem;
}
.skills dd { margin: 0; }

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--hair);
  padding: 2rem var(--gutter) 3rem;
}
.footer__inner {
  display: flex;
  gap: 1.25rem 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  .skills__row {
    grid-template-columns: 1fr;
    gap: .25rem;
  }
}

@media (max-width: 400px) {
  body { font-size: 1rem; }
  .nav { gap: 1rem; }
}
