/* Homepage styles. Every value comes from tokens.css; the card and tile shapes follow
   the Lingo design system's .lg-card and .lg-tile components. */
*, *::before, *::after { box-sizing: border-box; }

html { background: var(--surface); }
body { margin: 0; background: var(--surface); color: var(--ink); font: 400 17px/26px var(--font-sans); -webkit-font-smoothing: antialiased; }
a { color: var(--lake); }
a:focus-visible { outline: 3px solid var(--lingon); outline-offset: 2px; border-radius: var(--radius-sm); }

.page { max-width: 960px; margin: 0 auto; padding: var(--space-12) var(--space-4) var(--space-8); display: flex; flex-direction: column; gap: var(--space-12); }

/* Hero: the name spelled in word tiles that pop in one after another */
.hero { display: flex; flex-direction: column; gap: var(--space-3); }
.wordmark { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-3); }
.tile { width: 52px; height: 64px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); background: var(--surface-raised); border-bottom: 3px solid var(--pine); box-shadow: var(--shadow-raised); font: 700 36px/1 var(--font-display); color: var(--ink); animation: tile-pop .45s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--i) * 70ms + 100ms); transition: transform .15s, background-color .15s, border-color .15s; }
.tile:nth-child(2), .tile:nth-child(7) { border-bottom-color: var(--lingon); }
.tile:hover { transform: translateY(-4px) rotate(-3deg); background: var(--pine-soft); }
@keyframes tile-pop { 0% { transform: scale(.4) translateY(12px); opacity: 0; } 100% { transform: none; opacity: 1; } }

.lede { margin: 0; font: 600 24px/32px var(--font-display); max-width: 30ch; }
.lede-fi { margin: 0; color: var(--ink-muted); font-size: 15px; line-height: 22px; }

.section-title { margin: 0 0 var(--space-4); font: 600 14px/20px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }

/* Project cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-4); }
.card { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); background: var(--surface-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-raised); border: 2px solid transparent; color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--lake); transform: translateY(-2px); }
.card:focus-visible { outline: 3px solid var(--lingon); outline-offset: 2px; border-radius: var(--radius-lg); }
.card__art { height: 88px; border-radius: var(--radius-sm); background: var(--lake-soft); display: flex; align-items: center; justify-content: center; gap: var(--space-1); color: var(--lake); overflow: hidden; }
.card__name { margin: var(--space-2) 0 0; font: 600 22px/28px var(--font-display); }
.card__fi { margin: 0; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.card__desc { margin: 0; flex: 1; }
.card__go { margin: var(--space-2) 0 0; font-weight: 700; color: var(--lake); }
.card__go span { display: inline-block; transition: transform .15s; }
.card:hover .card__go span { transform: translateX(4px); }

/* Lingo card: a half-solved word */
.mini-tile { width: 28px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--surface-sunken); border-bottom: 3px solid var(--border); font: 600 20px/1 var(--font-display); color: var(--ink); }
.mini-tile--found { background: var(--surface-raised); border-bottom-color: var(--pine); }
.card--lingo:hover .mini-tile:not(.mini-tile--found) { background: var(--cloudberry-soft); border-bottom-color: var(--cloudberry); }

/* Frequency card: a signal wave that drifts on hover */
.card--freq .card__art { background: var(--pine-soft); color: var(--pine); }
.card--freq svg { width: 200%; height: 40px; flex: none; }
.wave { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.card--freq:hover svg { animation: drift 1.6s linear infinite; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-25%); } }

/* GitHub card */
.card--github .card__art { background: var(--lingon-soft); color: var(--lingon); }
.gh { width: 44px; height: 44px; fill: currentColor; transition: transform .2s; }
.card--github:hover .gh { transform: rotate(-8deg) scale(1.08); }

.foot { color: var(--ink-muted); font-size: 13px; line-height: 18px; border-top: 1px solid var(--line); padding-top: var(--space-4); }
.foot p { margin: 0; }

@media (max-width: 480px) {
  .page { padding-top: var(--space-8); gap: var(--space-8); }
  .tile { width: 40px; height: 52px; font-size: 28px; }
  .lede { font-size: 20px; line-height: 28px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
