/* ==========================================================================
   Design tokens
   Concept: a booklet of admission tickets / boarding passes — grounded in
   Andrew's flagship work building an event-ticketing platform. Each resume
   section is a torn ticket: a main panel + a perforated stub carrying the
   "metadata" (dates, location, serial number).
   ========================================================================== */

:root {
  --bg: #f4f5f1;
  --surface: #ffffff;
  --surface-stub: #eceee8;
  --ink: #14181a;
  --ink-muted: #5b6460;
  --accent: #0f7d78;
  --accent-strong: #0b5f5b;
  --on-accent: #f4f5f1;
  --line: #cfd4cb;
  --line-strong: #9aa39c;
  --shadow: 0 1px 2px rgba(20, 24, 26, 0.06), 0 8px 24px rgba(20, 24, 26, 0.05);

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Menlo", "Cascadia Mono", Consolas, monospace;

  --measure: 62ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1210;
    --surface: #161b19;
    --surface-stub: #10201d;
    --ink: #eef1ec;
    --ink-muted: #93a29b;
    --accent: #2bbdb3;
    --accent-strong: #57d6cd;
    --on-accent: #0e1210;
    --line: #2a322e;
    --line-strong: #3d4844;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.35);
  }
}

:root[data-theme="dark"] {
  --bg: #0e1210;
  --surface: #161b19;
  --surface-stub: #10201d;
  --ink: #eef1ec;
  --ink-muted: #93a29b;
  --accent: #2bbdb3;
  --accent-strong: #57d6cd;
  --on-accent: #0e1210;
  --line: #2a322e;
  --line-strong: #3d4844;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.35);
}

:root[data-theme="light"] {
  --bg: #f4f5f1;
  --surface: #ffffff;
  --surface-stub: #eceee8;
  --ink: #14181a;
  --ink-muted: #5b6460;
  --accent: #0f7d78;
  --accent-strong: #0b5f5b;
  --on-accent: #f4f5f1;
  --line: #cfd4cb;
  --line-strong: #9aa39c;
  --shadow: 0 1px 2px rgba(20, 24, 26, 0.06), 0 8px 24px rgba(20, 24, 26, 0.05);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-strong);
}

@media (prefers-color-scheme: dark) {
  a { color: var(--accent); }
}
:root[data-theme="dark"] a { color: var(--accent); }
:root[data-theme="light"] a { color: var(--accent-strong); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* --------------------------------------------------------------------- */
/* Ticket shell shared by hero + sections                                  */
/* --------------------------------------------------------------------- */

.ticket {
  display: grid;
  grid-template-columns: 1fr 200px;
  background: var(--surface);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.ticket-main {
  padding: 2.25rem 2.25rem 2rem;
  min-width: 0;
}

.ticket-stub {
  background: var(--surface-stub);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  justify-content: center;
  position: relative;
}

/* perforation seam between main + stub */
.ticket-stub::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-left: 2px dashed var(--line-strong);
}
.ticket-stub::after,
.ticket::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  left: -11px;
  z-index: 2;
}
.ticket::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  left: -11px;
  top: -11px;
  z-index: 2;
}
.ticket::after {
  top: auto;
  bottom: -11px;
}
.ticket-stub::before { display: none; } /* replaced by dashed border below */

.ticket-stub {
  border-left: 2px dashed var(--line-strong);
}

.stub-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stub-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.stub-value {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.stub-value a {
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-strong);
  display: block;
  margin-bottom: 0.75rem;
}
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--accent); } }
:root[data-theme="dark"] .eyebrow { color: var(--accent); }
:root[data-theme="light"] .eyebrow { color: var(--accent-strong); }

/* --------------------------------------------------------------------- */
/* Hero                                                                     */
/* --------------------------------------------------------------------- */

.hero .ticket-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
  line-height: 1.05;
}

.hero .role {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink-muted);
  max-width: var(--measure);
}

.hero .bio {
  margin: 0.25rem 0 0;
  max-width: var(--measure);
  color: var(--ink);
}

/* --------------------------------------------------------------------- */
/* Section headings (non-ticket)                                           */
/* --------------------------------------------------------------------- */

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 1rem 0 -0.25rem;
}

.section-heading .no {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
}

.section-heading h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------- */
/* Body content inside tickets                                             */
/* --------------------------------------------------------------------- */

.ticket-main h3 {
  margin: 0 0 0.15rem;
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.org {
  margin: 0 0 1rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.ticket-main ul {
  margin: 0 0 1.1rem;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: var(--measure);
}

.ticket-main li {
  padding-left: 0.15rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-stub);
  border: 1px solid var(--line);
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------- */
/* Skills ticket — grouped tag lists instead of prose                      */
/* --------------------------------------------------------------------- */

.skill-group {
  margin-bottom: 1.1rem;
}

.skill-group:last-child {
  margin-bottom: 0;
}

.skill-group h4 {
  margin: 0 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
}

/* --------------------------------------------------------------------- */
/* Education coursework                                                    */
/* --------------------------------------------------------------------- */

.coursework {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

/* --------------------------------------------------------------------- */
/* Footer                                                                   */
/* --------------------------------------------------------------------- */

footer {
  text-align: center;
  padding-top: 1rem;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

footer a {
  color: inherit;
}

/* --------------------------------------------------------------------- */
/* Responsive                                                               */
/* --------------------------------------------------------------------- */

@media (max-width: 640px) {
  .ticket {
    grid-template-columns: 1fr;
  }

  .ticket-stub {
    border-left: none;
    border-top: 2px dashed var(--line-strong);
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
  }

  .ticket::before,
  .ticket::after {
    left: 50%;
    transform: translateX(-50%);
    top: -11px;
    bottom: auto;
  }

  .ticket::after {
    top: auto;
    bottom: -11px;
  }

  .ticket-main {
    padding: 1.75rem 1.5rem 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
