/* Emily Kim — portfolio stylesheet. No frameworks, no build step. */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f2efe8;
  --text: #1d1b18;
  --muted: #5f5a52;
  --line: #e3ddd2;
  --accent: #500000;          /* Aggie maroon */
  --accent-soft: #f4e9e9;
  --accent-text: #ffffff;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
  --radius: 14px;
  --max: 1080px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
}
:root[data-theme="dark"] {
  --bg: #141311;
  --surface: #1c1a17;
  --surface-2: #24211d;
  --text: #f1ede6;
  --muted: #b2aa9e;
  --line: #34302a;
  --accent: #e6a1a1;
  --accent-soft: #2e1d1d;
  --accent-text: #1a0d0d;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background .2s ease, color .2s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0 0 .6rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 1rem; }
h3 { font-size: 1.2rem; margin: 0 0 .4rem; }
p { margin: 0 0 1rem; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600; color: var(--accent); margin-bottom: .6rem; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-text); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

/* Header + navigation */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; display: grid; place-items: center; font-size: 1.05rem; }
.icon-btn:hover { background: var(--surface-2); }
.menu-btn { display: none; }

@media (max-width: 820px) {
  .menu-btn { display: grid; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; padding: 12px 20px 18px; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
}

/* Sections */
main { min-height: 70vh; }
.section { padding-top: 64px; padding-bottom: 64px; }
.section + .section { border-top: 1px solid var(--line); }
.page-head { padding-top: 56px; padding-bottom: 24px; }
.page-head p { max-width: 640px; font-size: 1.1rem; color: var(--muted); }

/* Hero */
.hero { padding: 72px 20px 56px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 560px; }
.hero-art img { width: 100%; }
.hero-art { border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; padding-top: 40px; } }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.4rem; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: .95rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn-ghost:hover { background: var(--surface-2); }

/* Cards & grids */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card p:last-child { margin-bottom: 0; }
.card .thumb { border-radius: 10px; margin: -6px -6px 16px; overflow: hidden; background: var(--surface-2); }
.card .thumb img { width: 100%; }
.stat { font-family: var(--serif); font-size: 1.8rem; color: var(--accent); font-weight: 600; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding: 0; list-style: none; }
.tags li { font-size: .78rem; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline > li { position: relative; padding-left: 36px; margin-bottom: 36px; }
.timeline > li::before { content: ""; position: absolute; left: 0; top: 8px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.timeline .role { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; }
.timeline .org { color: var(--muted); font-weight: 500; margin-bottom: .5rem; }
.timeline ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.timeline ul li { margin-bottom: .3rem; }

/* Project filter (JS feature) */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter-bar button { font: inherit; font-size: .9rem; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.filter-bar button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.project[hidden] { display: none; }
.result-count { font-size: .9rem; color: var(--muted); margin: -12px 0 20px; }

/* Skills */
.skill-group h3 { font-family: var(--font); font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

/* Contact form */
.form { display: grid; gap: 16px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field input, .field textarea { width: 100%; font: inherit; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field .error { color: #b3261e; font-size: .85rem; min-height: 1.2em; margin-top: 4px; }
:root[data-theme="dark"] .field .error { color: #ffb4ab; }
.field [aria-invalid="true"] { border-color: #b3261e; }
.form-status { padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); display: none; }
.form-status.show { display: block; }

/* 404 */
.notfound { text-align: center; padding-top: 96px; padding-bottom: 96px; }
.notfound .code { font-family: var(--serif); font-size: clamp(4rem, 14vw, 8rem); color: var(--accent); line-height: 1; margin-bottom: 1rem; }
.notfound .btn-row { justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: .9rem; }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.site-footer a { color: var(--muted); }
