/* =========== Tokens =========== */
:root {
  /* typography & layout */
  --font-sans: "Play", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --content-max: 72rem;
  --hero-gap: clamp(1.5rem, 4vw, 3rem);

  /* spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 2rem;
  --space-8: 3rem;

  /* colors: light */
  --bg: #ffffff;
  --fg: #0b0d10;
  --muted: #5b6572;
  --surface: #f4f6f8;
  --link: #0a66ff;
  --link-visited: #6a38ff;
  --border: #e3e8ef;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Force light palette even in dark mode */
    --bg: #ffffff;
    --fg: #0b0d10;
    --muted: #5b6572;
    --surface: #f4f6f8;
    --link: #0a66ff;
    --link-visited: #6a38ff;
    --border: #e3e8ef;
  }
}

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

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  line-height: 1.5;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:visited { color: var(--link-visited); }

/* skip link */
.skiplink {
  position: absolute;
  left: -9999px;
  top: -9999px;
}
.skiplink:focus {
  left: var(--space-4);
  top: var(--space-4);
  z-index: 1000;
  background: var(--surface);
  color: var(--fg);
  padding: var(--space-2) var(--space-3);
  border-radius: 0.5rem;
  outline: 2px solid var(--border);
}

/* ========== Wrappers ========== */
.site-main,
.hero-area,
.site-footer {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

/* ========== Hero ========== */
.hero-area { padding-top: var(--space-8); }

.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) 0 var(--space-4);
  text-align: center;
}

.avatar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.avatar-img {
  border-radius: 0.5rem;
  max-width: 260px;
  width: 100%;
  height: auto;
}

.intro { text-align: center; }

.hero {
  font-size: clamp(2rem, 3.8vw + 1rem, 3.25rem);
  letter-spacing: -0.0125em;
  line-height: 1.2;
  margin: 0 0 var(--space-3);
}

.tagline {
  margin: 0 0 var(--space-3);
  color: var(--muted);
}

.social {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

.social-link {
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
}

.social-link:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* =========== Main =========== */
.site-main { padding-bottom: var(--space-8); }
/* ===== Row list: elegant separators, no bullets/cards ===== */
.row-list{
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;            /* rounds the top/bottom separators */
  background: transparent;
}

/* each row */
.row{
  display: grid;
  row-gap: var(--space-2);
  padding: var(--space-4);
  background: var(--surface);
}

/* hairline separators between rows */
.row + .row{
  border-top: 1px solid var(--border);
}

/* header: title on left, meta on right; wraps nicely */
.card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
}

.card-title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
  flex: 1 1 auto;   /* let the title grow/wrap naturally */
  min-width: 0;
}

.card-meta {
  color: var(--muted);
  flex: 0 0 auto;   /* don’t let author shrink */
  white-space: nowrap; /* keep on one line */
}

.card-body{ margin-top: var(--space-2); color: var(--muted); }
.card-actions{ margin-top: var(--space-2); font-weight: 700; }

/* dot separators only when multiple links exist */
.card-actions a + a::before{
  content: "·";
  display: inline-block;
  margin: 0 var(--space-2);
  color: var(--muted);
}

/* subtle affordance on hover/focus (no heavy shadow) */
.row:hover,
.row:focus-within{
  background: color-mix(in oklab, var(--surface), var(--fg) 4%);
  box-shadow: inset 3px 0 0 var(--link);   /* tasteful left accent bar */
}

/* nicer section spacing */
.content-section{ margin-top: var(--space-8); }
.section-title{ margin: 0 0 var(--space-4); }

/* desktop sizing */
@media (min-width: 900px){
  .card-title{ font-size: 1.25rem; }
}

/* =========== Footer =========== */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space-6);
  text-align: center;
  color: var(--muted);
}

/* =========== Desktop Tweaks (>=900px) =========== */
@media (min-width: 900px) {
  .hero-area {
    grid-template-columns: 1fr;
    align-items: center;
  }

  .site-header {
    padding: var(--space-8) 0 var(--space-6);
    grid-template-columns: minmax(160px, 260px) minmax(20ch, 40ch);
    column-gap: var(--hero-gap);
    justify-content: center;
    justify-items: center;
    align-items: center;
  }

  .intro { text-align: center; }
  .social { justify-content: center; }

  .card-title { font-size: 1.25rem; }

  .site-footer { padding: var(--space-8) var(--space-4); }
}

/* =========== Avatar =========== */
.avatar-wrap{
  width: 100%;
  max-width: 260px;
  min-width: 160px;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  box-shadow: none;
  will-change: transform;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0%;
}

@keyframes avatar-float{
  0%, 100% { transform: translateY(-2px); }
  50%      { transform: translateY(2px); }
}

@media (prefers-reduced-motion: reduce){
  .avatar-wrap{ animation: none; }
}

.avatar-wrap:hover,
.avatar-wrap:focus-within{
  transform: none;
  box-shadow: none;
}

@media (max-width: 640px){
  .site-header{
    grid-template-columns: 1fr;
    justify-items: start;
  }
}

/* =========== Utilities & ASCII =========== */
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.ascii-section {
  margin-top: var(--space-8, 2rem);
  text-align: center;
}

.ascii-canvas {
  white-space: pre;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  line-height: 1;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  display: inline-block;
  box-sizing: content-box;
  width: max-content;
  max-width: 100%;
  overflow: auto;
  --ascii-min: 2px;
  --ascii-max: 14px;
  --ascii-zoom: 0.8;
  font-size: var(--ascii-font, 10px);
}

/* Interactions disabled: no hover styling for ASCII canvas */
