/* ============================================================
   Clark Ummard — portfolio
   Clean & minimal. White space, system sans, one indigo accent,
   soft cards, swappable screenshot frames.
   ============================================================ */

:root {
  --bg:       #ffffff;
  --bg-soft:  #f7f8fa;
  --surface:  #ffffff;
  --tint:     #f3f4f9;

  --text:   #0c0d10;
  --muted:  #565d6b;
  --faint:  #8a909c;

  --border:  #e8e9ee;
  --border-2:#dcdee5;

  --accent:    #4f46e5;
  --accent-d:  #4338ca;
  --accent-bg: #eef0fe;

  --radius:   16px;
  --radius-sm:10px;
  --maxw:     68rem;
  --measure:  40rem;

  --shadow-sm: 0 1px 2px rgba(16,24,40,.05);
  --shadow:    0 1px 3px rgba(16,24,40,.06), 0 12px 28px -16px rgba(16,24,40,.18);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 680; letter-spacing: -0.022em; line-height: 1.12; }
p { margin: 0 0 1rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
strong { font-weight: 650; color: var(--text); }
ul, ol, dl { margin: 0; padding: 0; }
li { list-style: none; }
svg { display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 2.5rem); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 1rem; top: -3.5rem; z-index: 60;
  background: var(--text); color: #fff; padding: 0.6rem 1rem; border-radius: 8px; font-weight: 600;
  transition: top 0.18s ease;
}
.skip-link:focus { top: 0.6rem; text-decoration: none; }

/* ------------------------- Buttons ------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm); font-weight: 600; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .14s ease, background .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -10px rgba(79,70,229,.7); }
.btn--primary:hover { background: var(--accent-d); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--lg { min-height: 54px; font-size: 1.1rem; padding: 0.9rem 1.9rem; }

/* ------------------------- Header ------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.78);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; min-height: 60px; }
.brand { font-weight: 700; font-size: 1.05rem; color: var(--text); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; color: var(--accent); }
.nav { display: flex; align-items: center; gap: 0.4rem; }
.nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0.4rem 0.8rem;
  border-radius: 8px; color: var(--muted); font-size: 0.95rem; font-weight: 550;
}
.nav a:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); }
.nav__btn { color: #fff !important; background: var(--accent); }
.nav__btn:hover { background: var(--accent-d) !important; color: #fff !important; }

/* ------------------------- Hero ------------------------- */
.hero { padding: clamp(3.5rem, 10vw, 7rem) 0 clamp(3rem, 8vw, 5.5rem); }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.01em; margin: 0 0 1.1rem; }
.hero__title { font-size: clamp(2.6rem, 7vw, 4.75rem); font-weight: 720; letter-spacing: -0.035em; line-height: 1.02; margin: 0 0 1.5rem; }
.hero__sub { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 40rem; margin: 0 0 2.2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* ------------------------- Sections ------------------------- */
.section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section--soft { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
[id] { scroll-margin-top: 4.5rem; }

.section__head { max-width: var(--measure); margin-bottom: clamp(2rem, 5vw, 3rem); }
.section__title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; margin-bottom: 0.8rem; }
.section__lead { color: var(--muted); font-size: 1.1rem; margin: 0; }

/* ------------------------- Tags & pills ------------------------- */
.tag {
  display: inline-flex; align-items: center; align-self: flex-start;
  font-size: 0.76rem; font-weight: 650; letter-spacing: 0.02em;
  padding: 0.3rem 0.7rem; border-radius: 999px; margin-bottom: 0.9rem;
}
.tag--live { color: #047857; background: #e7f6ef; }
.tag--ml { color: var(--accent-d); background: var(--accent-bg); }

.pills { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1.2rem; }
.pills li {
  font-size: 0.82rem; color: var(--muted); background: var(--bg-soft);
  border: 1px solid var(--border); padding: 0.32rem 0.7rem; border-radius: 8px;
}
.pills--lg li { font-size: 0.9rem; background: var(--surface); }

/* ------------------------- Screenshot frames ------------------------- */
.shot {
  aspect-ratio: 16 / 10; width: 100%;
  border-radius: var(--radius); border: 1px solid var(--border);
  display: grid; place-items: center; overflow: hidden;
  background: var(--tint); color: var(--accent);
}
.shot img, .feature__shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
video.shot, .shot--video { display: block; object-fit: cover; background: #0c0d10; }
.shot svg { width: 38%; max-width: 120px; opacity: .9; }
.shot--sm { aspect-ratio: 16 / 9; }
.shot--cea  { background: linear-gradient(135deg, #eef0fe, #e3f6ef); }
.shot--frc  { background: linear-gradient(135deg, #eef0fe, #e8ebff); color: var(--accent-d); }
.shot--prom { background: linear-gradient(135deg, #fdeef6, #eef0fe); color: #b4429a; }
.shot--qwen { background: linear-gradient(135deg, #eef0fe, #e6f0ff); }
.shot--sd   { background: linear-gradient(135deg, #fff1e6, #eef0fe); color: #c2671b; }
.shot--six  { background: linear-gradient(135deg, #e6f7f2, #eef0fe); color: #0f766e; }
.shot--mle  { background: linear-gradient(135deg, #eef0fe, #ede9fe); color: #6d28d9; }
.shot--game { background: linear-gradient(135deg, #fff7e6, #eef0fe); color: #b45309; }

/* ------------------------- Features (3 main) ------------------------- */
.features { display: grid; gap: clamp(1.5rem, 4vw, 2.5rem); }
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.4rem, 4vw, 3rem);
  align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(1.4rem, 3.5vw, 2.2rem); box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.feature:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--border-2); }
.feature--reverse .feature__shot { order: 2; }
.feature__content { display: flex; flex-direction: column; min-width: 0; }
.feature__title { font-size: clamp(1.4rem, 3vw, 1.85rem); margin-bottom: 0.6rem; }
.feature__desc { color: var(--muted); margin-bottom: 0.9rem; }

.case-toggle {
  display: none; align-self: flex-start;
  background: none; border: 0; padding: 0; margin: 0 0 0.3rem; cursor: pointer;
  color: var(--accent); font-family: inherit; font-size: 0.95rem; font-weight: 600;
}
.js .case-toggle { display: inline-flex; }
.case-toggle:hover .case-toggle__label { text-decoration: underline; text-underline-offset: 3px; }
.case-toggle__label::after { content: " ↓"; }
.case-toggle[aria-expanded="true"] .case-toggle__label::after { content: " ↑"; }
.case-body[hidden] { display: none; }
.case-body p { color: var(--muted); font-size: 1rem; }
.impact {
  color: var(--text) !important; background: var(--bg-soft);
  border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0;
  padding: 0.85rem 1rem; margin-top: 1rem; font-size: 0.98rem;
}
.case-media { margin: 1.2rem 0 0; }
.case-media video {
  width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover;
  background: #0c0d10; border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.case-media figcaption { color: var(--faint); font-size: 0.88rem; margin-top: 0.55rem; line-height: 1.5; }
.case-media__label { color: var(--text); font-weight: 600; }

/* ------------------------- Subhead + secondary cards ------------------------- */
.subhead { max-width: var(--measure); margin: clamp(2.5rem, 6vw, 4rem) 0 1.6rem; }
.subhead__title { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-bottom: 0.5rem; }
.subhead__lead { color: var(--muted); margin: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(1.2rem, 3vw, 1.8rem); }
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--border-2); }
.card .shot { border-radius: 0; border: 0; border-bottom: 1px solid var(--border); }
.card__content { padding: clamp(1.2rem, 3vw, 1.6rem); display: flex; flex-direction: column; flex: 1; }
.card__title { font-size: 1.2rem; margin-bottom: 0.6rem; }
.card__desc { color: var(--muted); font-size: 0.98rem; margin-bottom: 0.8rem; }
.card__note { color: var(--faint); font-size: 0.9rem; margin-bottom: 0.3rem; }
.card .pills { margin-top: auto; padding-top: 0.6rem; }

/* ------------------------- About ------------------------- */
.about { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(1.8rem, 5vw, 3.5rem); align-items: start; }
.about__main { max-width: 42rem; }
.about__main p { color: var(--muted); }
.about__lead { font-size: clamp(1.2rem, 2.4vw, 1.5rem); color: var(--text) !important; font-weight: 550; letter-spacing: -0.01em; margin-bottom: 1.1rem; }
.about__main .section__title { margin-bottom: 1.2rem; }
.note { margin-top: 1.8rem; background: var(--surface); border: 1px solid var(--border-2); border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 1.2rem 1.4rem; }
.note__title { font-size: 1.05rem; margin-bottom: 0.5rem; }
.note p { margin: 0; color: var(--muted); font-size: 0.98rem; }

.about__side { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.3rem, 3vw, 1.7rem); box-shadow: var(--shadow-sm); }
.facts > div { padding: 0.9rem 0; border-bottom: 1px solid var(--border); }
.facts > div:first-child { padding-top: 0; }
.facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); margin-bottom: 0.2rem; }
.facts dd { margin: 0; font-weight: 550; font-size: 0.98rem; }

/* ------------------------- Skills ------------------------- */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem, 3vw, 1.8rem); }
.skill { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.3rem, 3vw, 1.7rem); box-shadow: var(--shadow-sm); }
.skill__title { font-size: 1.15rem; margin-bottom: 1rem; }

/* ------------------------- Experience ------------------------- */
.exp { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 3vw, 1.5rem); }
.exp__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.3rem, 3vw, 1.7rem); box-shadow: var(--shadow-sm); }
.exp__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.25rem; }
.exp__title { font-size: 1.1rem; }
.exp__time { font-size: 0.8rem; font-weight: 600; color: var(--faint); white-space: nowrap; }
.exp__org { color: var(--accent); font-size: 0.9rem; font-weight: 550; margin-bottom: 0.6rem; }
.exp__desc { color: var(--muted); font-size: 0.97rem; margin: 0; }
@media (max-width: 600px) { .exp { grid-template-columns: 1fr; } }

/* ------------------------- Contact ------------------------- */
.contact__inner { max-width: 40rem; text-align: center; margin: 0 auto; }
.contact__text { color: var(--muted); font-size: 1.1rem; margin-bottom: 1.8rem; }
.contact__note { margin-top: 1.3rem; color: var(--faint); font-size: 0.9rem; }

/* ------------------------- Footer ------------------------- */
.site-footer { border-top: 1px solid var(--border); padding: 1.8rem 0; }
.site-footer__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; font-size: 0.9rem; color: var(--muted); }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* ------------------------- Reveal ------------------------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ------------------------- Responsive ------------------------- */
@media (max-width: 820px) {
  .feature, .feature--reverse { grid-template-columns: 1fr; }
  .feature--reverse .feature__shot { order: 0; }
  .about { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .cards { grid-template-columns: 1fr; }
  .hero__cta .btn { flex: 1 1 auto; }
}

/* ------------------------- Print ------------------------- */
@media print {
  body { color: #000; } .site-header, .nav, .skip-link, .case-toggle, .hero__cta, .site-footer a { display: none !important; }
  .case-body[hidden] { display: block !important; }
  .feature, .card, .skill, .about { break-inside: avoid; box-shadow: none; }
  a { color: #000; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
