/* Luke — personal site. Editorial, warm, no CDNs. */

:root {
  --bg: #faf8f5;
  --bg-soft: #f3efe9;
  --ink: #1c1a17;
  --ink-soft: #5c574f;
  --card: #ffffff;
  --line: #e7e0d5;
  --accent: #e0643a;
  --accent-deep: #b34a26;
  --radius: 18px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #121110;
  --bg-soft: #1a1917;
  --ink: #f2ede5;
  --ink-soft: #a8a096;
  --card: #1d1c1a;
  --line: #2c2a27;
  --accent: #f08a5c;
  --accent-deep: #e0643a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .35s ease;
}

.wrap { max-width: 1020px; margin: 0 auto; padding: 0 24px; }

/* ---------- theme toggle ---------- */
.theme-toggle {
  position: fixed; top: 18px; right: 18px; z-index: 50;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform .2s ease, background .35s ease;
}
.theme-toggle:hover { transform: scale(1.08); }
.theme-toggle svg { width: 20px; height: 20px; }
.icon-moon { display: none; }
[data-theme="dark"] .icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: none; }

/* ---------- hero ---------- */
.hero {
  min-height: 92svh;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; text-align: center;
}
.hero-blob {
  position: absolute; width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 65%);
  opacity: .14; filter: blur(40px);
  animation: drift 14s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes drift {
  from { transform: translate(-18%, -8%) scale(1); }
  to   { transform: translate(18%, 10%) scale(1.15); }
}
.hero-inner { position: relative; padding: 0 24px; max-width: 760px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .22em; font-size: 13px;
  color: var(--ink-soft); margin-bottom: 12px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(64px, 15vw, 128px); line-height: 1; letter-spacing: -.02em;
}
.tagline {
  font-family: var(--serif); font-size: clamp(22px, 4.5vw, 34px);
  margin-top: 18px; color: var(--ink-soft);
}
.underlined { position: relative; color: var(--ink); white-space: nowrap; }
.underline {
  position: absolute; left: -4%; bottom: -.18em; width: 108%; height: .34em;
  overflow: visible;
}
.underline path {
  stroke-dasharray: 240; stroke-dashoffset: 240;
  animation: draw 1.1s .9s ease forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero-links { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--bg);
  padding: 14px 26px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 16px;
  transition: transform .18s ease, opacity .18s ease;
}
.btn:hover { transform: translateY(-2px); opacity: .92; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); }

.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: var(--ink-soft); text-decoration: none; font-size: 22px;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- sections ---------- */
.section { padding: 96px 0; }
.section:nth-of-type(even) { background: var(--bg-soft); }
.section h2 {
  font-family: var(--serif); font-size: clamp(32px, 6vw, 48px);
  letter-spacing: -.01em; margin-bottom: 14px;
}
.section-sub { color: var(--ink-soft); font-size: 18px; margin-bottom: 36px; }

/* ---------- about ---------- */
.about-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 36px 34px; max-width: 680px;
}
.about-card p { font-size: 18px; margin-bottom: 16px; color: var(--ink); }
.about-card p:last-child { margin-bottom: 0; color: var(--ink-soft); }

/* ---------- apps grid ---------- */
.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 24px;
  text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 14px 34px rgba(0,0,0,.08);
}
.card-icon { font-size: 34px; }
.card h3 { font-family: var(--serif); font-size: 21px; letter-spacing: -.01em; }
.card p { color: var(--ink-soft); font-size: 15px; flex: 1; }
.card-go { color: var(--accent); font-weight: 600; font-size: 15px; }

/* ---------- contact ---------- */
.contact-links { display: flex; gap: 14px; flex-wrap: wrap; }
.gh { width: 18px; height: 18px; }

/* ---------- footer ---------- */
footer { padding: 48px 0; border-top: 1px solid var(--line); text-align: center; }
footer p { color: var(--ink-soft); font-size: 14px; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-blob, .scroll-hint, .underline path { animation: none; }
  .underline path { stroke-dashoffset: 0; }
  html { scroll-behavior: auto; }
}

/* ---------- small screens ---------- */
@media (max-width: 560px) {
  .section { padding: 72px 0; }
  .about-card { padding: 28px 24px; }
  .theme-toggle { top: 14px; right: 14px; }
}
