/* Global Styles for chrisheninger.com */
:root {
  --font-fira-code: "Fira Code", monospace;
}

html,
body {
  padding: 0;
  margin: 0;
  font-family: var(--font-fira-code);
  color: white;
  background-color: #111;
  width: 100%;
  height: 100%;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

a {
  display: inline-flex;
  color: inherit;
  text-decoration: underline;
  transition: color 0.25s ease;
}

a:hover {
  color: hotpink;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

h4 {
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

h5 {
  font-size: 0.875rem;
  line-height: 1.2;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

h6 {
  font-size: 0.75rem;
  line-height: 1.2;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

p {
  font-size: 1rem;
  line-height: 1.4;
  /* margin-top: 1.25em; */
  margin-bottom: 1.25em;
}

hr {
  border: none;
  border-top: 4px solid white;
  width: 100%;
  margin: 2rem auto;
}

.code {
  background: #fafafa;
  border-radius: 5px;
  padding: 0.75rem;
  font-size: 1.1rem;
  font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
    Bitstream Vera Sans Mono, Courier New, monospace;
}

/* Homepage */
.grid {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.card {
  display: flex;
  flex-direction: column;
  text-align: left;
  color: inherit;
  text-decoration: none;
  border: 4px solid white;
  border-radius: 0px;
  width: 100%;
  max-width: 800px;
  padding: 1.5rem 1.25rem;
  transition: all 0.25s ease;
}

.card:hover,
.card:focus,
.card:active {
  /* color: dodgerblue; */
  border-color: cyan;
}

@media (hover: hover) {
  .card:hover {
    cursor: pointer;
  }
}

.card h2 {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  margin: 0 0 0.5rem 0;
}

.card_emoji {
  margin-right: 0.75rem;
  font-size: 1.75rem;
}

.card_arrow {
  font-size: 1.75rem;
  margin-left: auto;
}

.card p {
  display: flex;
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

.center {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.paper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  outline: 4px solid white;
  border-radius: 0px;
  padding: 2rem;
  text-align: left;
}

.paper .row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
}

.paper section {
  margin-bottom: 1rem;
}

.paper h1,
.paper h2,
.paper h3,
.paper h4 {
  display: inline-flex;
}

.paper ul {
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
}

.paper ul li {
  list-style: disc outside;
  margin-left: 1rem;
}

.gallery.single {
}

.gallery.masonry {
  --gap: 16px;
  column-width: 320px; /* target column width; browser will calc count */
  column-gap: var(--gap);
}

.gallery img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 0 var(--gap);
  border-radius: 16px;
  break-inside: avoid; /* prevents awkward splits */
}

.slider {
  --radius: 16px;
  --dot: 12px;
  --ctrl: 32px;

  width: 100%;
  margin: 0 auto;
  position: relative;
  display: grid;
  row-gap: 10px;
}

/* radios hidden */
.slider > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* viewport tracks height naturally (images have varied heights) */
.slider__viewport {
  overflow: hidden;
}

/* horizontal track */
.slider__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  transition: transform 0.45s ease;
  will-change: transform;
}

/* center each slide's content */
.slide {
  margin: 0;
  display: grid;
  place-items: center;
  min-height: 0;
}

/* images: centered, max 320px wide, natural height */
.slide img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

/* ===== Instance-scoped state via :has() (no IDs here) ===== */
.slider:has(> input:nth-of-type(1):checked) .slider__track {
  transform: translateX(-0%);
}
.slider:has(> input:nth-of-type(2):checked) .slider__track {
  transform: translateX(-100%);
}
.slider:has(> input:nth-of-type(3):checked) .slider__track {
  transform: translateX(-200%);
}

/* dots */
.slider__dots {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.slider__dots label {
  width: var(--dot);
  height: var(--dot);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

/* active dot (scoped) */
.slider:has(> input:nth-of-type(1):checked) .slider__dots label:nth-child(1),
.slider:has(> input:nth-of-type(2):checked) .slider__dots label:nth-child(2),
.slider:has(> input:nth-of-type(3):checked) .slider__dots label:nth-child(3) {
  background: hotpink;
}

/* prev/next */
.slider__controls .prev,
.slider__controls .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: var(--ctrl);
  height: var(--ctrl);
  line-height: var(--ctrl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #111;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  opacity: 0;
  pointer-events: none;
}
.slider__controls .prev {
  left: 8px;
}
.slider__controls .next {
  right: 8px;
}

/* show the correct pair (scoped) */
.slider:has(> input:nth-of-type(1):checked) .p--1,
.slider:has(> input:nth-of-type(1):checked) .n--1,
.slider:has(> input:nth-of-type(2):checked) .p--2,
.slider:has(> input:nth-of-type(2):checked) .n--2,
.slider:has(> input:nth-of-type(3):checked) .p--3,
.slider:has(> input:nth-of-type(3):checked) .n--3 {
  opacity: 1;
  pointer-events: auto;
}

/* focus styles */
.slider__controls .prev:focus-visible,
.slider__controls .next:focus-visible,
.slider__dots label:focus-visible {
  outline: 2px solid #1e90ff;
  outline-offset: 2px;
}

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
  .slider__track {
    transition: none;
  }
}

.experience {
  margin-bottom: 1.75rem;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 960px;
  padding-left: 16px;
  padding-right: 16px;
  margin: 0 auto;
}

.image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  margin-bottom: 24px;
}

.main {
  padding: 1rem;
  width: 100%;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  padding: 1rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.logo img {
  height: auto;
}

.footer {
  display: flex;
  flex-direction: column;
  padding: 2rem 1rem;
  margin: 0 auto;
  justify-content: center;
  align-items: center;
}

.footer .social {
  display: flex;
  flex-direction: row;
  width: 120px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.footer .social svg {
  transition: transform 0.25s ease;
}

@media (hover: hover) {
  .social svg:hover {
    transform: scale(1.125);
  }
}

.footer a {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
}

@keyframes borderColor {
  0% {
    border-color: dodgerblue;
  }
  33% {
    border-color: hotpink;
  }
  66% {
    border-color: cyan;
  }
  100% {
    border-color: dodgerblue;
  }
}
