/*/css/styles.css*/
/* =========== Tokens =========== */
:root {
  /* typography & layout */
  --font-sans: "Play", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --content-max: 76rem;
  --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%; }

html {
  font-size: clamp(17px, 0.35vw + 15px, 20px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  background:
    linear-gradient(
      to bottom,
      #f3d688 0%,
      #f6e2ad 14%,
      #f8ecd1 30%,
      rgba(248, 236, 209, 0.42) 48%,
      rgba(255, 255, 255, 0) 68%
    ),
    var(--bg);
  background-repeat: no-repeat;
  background-size: 100% clamp(760px, 78vh, 1080px), auto;
  background-position: top center, top left;
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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: clamp(4rem, 8vw, 7rem); }

.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 4vw, 3rem) 0 clamp(1.5rem, 3vw, 2.25rem);
  text-align: center;
  position: relative;
  isolation: isolate;
}

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

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

.intro { text-align: center; }

.hero {
  font-size: clamp(3.25rem, 8vw, 6.25rem);
  letter-spacing: -0.0125em;
  line-height: 1.05;
  margin: 0 0 var(--space-4);
}

.tagline {
  margin: 0 0 var(--space-4);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  color: var(--muted);
}

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

.social-link {
  padding: 0.45rem 0.65rem;
  border-radius: 0.375rem;
}

.social-link img {
  width: 2rem;
  height: 2rem;
}

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

/* =========== Main =========== */
.site-main { padding-bottom: 0; }
/* ===== 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.3rem;
  line-height: 1.3;
  flex: 1 1 auto;   /* let the title grow/wrap naturally */
  min-width: 0;
}

.card-meta {
  font-size: 1rem;
  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);
  font-size: 1.05rem;
  color: var(--muted);
}

.card-body-details {
  display: grid;
  gap: var(--space-3);
}

.card-body-details p { margin: 0; }

.card-actions{
  margin-top: var(--space-2);
  font-size: 1.05rem;
  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);
  font-size: 1.6rem;
}

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

/* =========== Footer =========== */
.site-footer {
  border-top: 0;
  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.4rem; }

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

/* =========== Avatar =========== */
.avatar-wrap{
  width: 100%;
  max-width: clamp(380px, 52vw, 620px);
  min-width: 280px;
  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){
  .hero-area {
    padding-top: clamp(2.5rem, 10vw, 4rem);
  }

  .site-header{
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .hero {
    font-size: clamp(2.7rem, 12vw, 4.1rem);
  }

  .tagline {
    font-size: clamp(1.15rem, 5vw, 1.45rem);
  }

  .avatar-wrap {
    max-width: min(88vw, 460px);
    min-width: 0;
  }
}

/* =========== Utilities & Akhet =========== */
.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;
}

.akhet-section {
  position: relative;
  z-index: 0;
  isolation: isolate;
  margin-top: clamp(2.5rem, 7vw, 4.5rem);
  margin-inline: calc(50% - 50vw);
  padding: clamp(1.75rem, 4vw, 2.75rem) var(--space-4) clamp(4.25rem, 9vw, 6rem);
  display: grid;
  place-items: center;
  overflow: visible;
}

.akhet-section::before,
.akhet-section::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.akhet-section::before {
  inset: clamp(-4rem, -6vw, -2rem) 0 clamp(-5rem, -8vw, -2.5rem);
  background: none;
}

.akhet-section::after {
  inset: auto 0 clamp(-5rem, -8vw, -2.5rem);
  height: clamp(10rem, 22vw, 15rem);
  background: none;
}

.akhet-section > .akhet-canvas {
  position: relative;
  z-index: 1;
  width: min(96vw, 980px);
  aspect-ratio: 5 / 3;
  display: block;
  max-width: 100%;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  touch-action: none;
  cursor: grab;
}

.akhet-canvas.is-interacting {
  cursor: grabbing;
}

.akhet-noscript {
  margin: var(--space-4) 0 0;
  color: var(--muted);
  text-align: center;
  position: relative;
  z-index: 1;
}
