/* phillipdwhite.com — one stylesheet, no dependencies */

:root {
  color-scheme: dark;
  --bg: #0e0a14;
  --panel: rgba(12, 9, 19, 0.86);
  --bar: rgba(9, 7, 14, 0.82);
  --surface: #1a1426;
  --border: #2e2640;
  --text: #e8e4ef;
  --muted: #aaa2b8;
  --accent: #7dd3a8;
  --accent-strong: #a7e8c7;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --measure: 46rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  /* Static fallback; the WebGL canvas (bg.js) draws over it when available */
  background:
    radial-gradient(ellipse at 25% 15%, #24153a 0%, transparent 60%),
    radial-gradient(ellipse at 80% 85%, #0c261d 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

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

.skip-link {
  position: absolute;
  left: -999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: var(--surface);
  padding: 0.5rem 0.75rem;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1rem;
}

/* PS1-style background canvas (see bg.js) */

#bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  /* Largest viewport height, so mobile toolbars sliding in and out don't resize it */
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  pointer-events: none;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  opacity: 0;
  transition: opacity 0.8s ease;
}

#bg.ready {
  opacity: 1;
}

/* Header and footer */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bar);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.site-name {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
}

.site-name span {
  color: var(--accent);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

main {
  padding: 3rem 0 4rem;
}

/* Content sits on a dark panel so the moving background never hurts readability */
main > .wrap {
  max-width: calc(var(--measure) + 2rem);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem 2rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bar);
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer .wrap {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.site-footer p {
  margin: 0;
}

/* Type */

h1,
h2,
h3 {
  line-height: 1.25;
  font-weight: 650;
}

h1 {
  font-size: 2.25rem;
  margin: 0 0 0.25rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.25rem;
  margin: 3rem 0 1rem;
}

h3 {
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.lede {
  font-size: 1.2rem;
  color: var(--text);
  margin: 1.25rem 0;
}

.muted {
  color: var(--muted);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.05em 0.35em;
}

/* Home */

/* "$ whoami" hover box (whoami.js). Only enabled on desktop, once the script is ready. */
.whoami {
  position: relative;
  display: inline-block;
}

#whoami.is-ready {
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 0.25em;
}

.whoareu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  z-index: 10;
  width: max-content;
  min-width: 18rem;
  max-width: min(32rem, calc(100vw - 2rem));
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text);
}

.whoareu-title {
  margin: 0 0 0.5rem;
  color: var(--accent);
}

.whoareu dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.15rem 1rem;
  margin: 0;
}

.whoareu dt {
  color: var(--muted);
}

.whoareu dd {
  margin: 0;
  overflow-wrap: anywhere;
}


.role {
  color: var(--muted);
  font-size: 1.15rem;
  margin: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0;
  margin: 1.5rem 0 0;
  list-style: none;
}

.button {
  display: inline-block;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  text-decoration: none;
}

.button:hover {
  border-color: var(--accent);
  color: var(--text);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b0e11;
  font-weight: 600;
}

.button.primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #0b0e11;
}

/* Tools strip: two rows scrolling in opposite directions (pure CSS) */

.marquee {
  overflow: hidden;
  margin: 0 -2rem;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

.marquee + .marquee {
  margin-top: 0.5rem;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 50s linear infinite;
}

.marquee-reverse .marquee-track {
  animation-direction: reverse;
  animation-duration: 56s;
}

.marquee:focus-within .marquee-track {
  animation-play-state: paused;
}

/* Pause on hover only with a real pointer; on touchscreens a tap "sticks"
   as hover and would freeze the strip */
@media (hover: hover) and (pointer: fine) {
  .marquee:hover .marquee-track {
    animation-play-state: paused;
  }
}

.marquee ul {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  margin: 0;
  /* Trailing space equal to the gap keeps the loop seamless */
  padding: 0.6rem 2.25rem 0.6rem 0;
  list-style: none;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

.tool {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.tool:hover {
  color: var(--text);
}

.tool-icon {
  flex: none;
  width: 1.35rem;
  height: 1.35rem;
  background-color: currentColor;
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
  transition: background-color 0.2s ease;
}

.tool:hover .tool-icon {
  background-color: var(--brand, currentColor);
}

/* Logos from Simple Icons (CC0); brand colors shown on hover */
.tool-okta { --logo: url("/logos/okta.svg"); --brand: #007dc1; }
.tool-pagerduty { --logo: url("/logos/pagerduty.svg"); --brand: #06ac38; }
.tool-googleworkspace { --logo: url("/logos/google.svg"); --brand: #4285f4; }
.tool-googlecloud { --logo: url("/logos/googlecloud.svg"); --brand: #4285f4; }
.tool-kubernetes { --logo: url("/logos/kubernetes.svg"); --brand: #326ce5; }
.tool-docker { --logo: url("/logos/docker.svg"); --brand: #2496ed; }
.tool-terraform { --logo: url("/logos/terraform.svg"); --brand: #844fba; }
.tool-github { --logo: url("/logos/github.svg"); --brand: var(--text); }
.tool-snowflake { --logo: url("/logos/snowflake.svg"); --brand: #29b5e8; }
.tool-python { --logo: url("/logos/python.svg"); --brand: #3776ab; }
.tool-n8n { --logo: url("/logos/n8n.svg"); --brand: #ea4b71; }
.tool-zapier { --logo: url("/logos/zapier.svg"); --brand: #ff4f00; }
.tool-anthropic { --logo: url("/logos/anthropic.svg"); --brand: #d97757; }
.tool-atlassian { --logo: url("/logos/atlassian.svg"); --brand: #2684ff; }

/* Other sources: Iconify sets (CC0, MIT, Apache 2.0, CC BY 4.0), Wikimedia Commons
   (CC BY-SA 4.0) and vendor sites; see README for details */
.tool-aws { --logo: url("/logos/aws.svg"); --brand: #ff9900; }
.tool-azure { --logo: url("/logos/azure.svg"); --brand: #0089d6; }
.tool-dbt { --logo: url("/logos/dbt.svg"); --brand: #ff694a; }
.tool-incidentio { --logo: url("/logos/incidentio.svg"); --brand: #f25533; }
.tool-openai { --logo: url("/logos/openai.svg"); --brand: var(--text); }
.tool-twingate { --logo: url("/logos/twingate.svg"); --brand: var(--text); }
.tool-conductorone { --logo: url("/logos/conductorone.svg"); --brand: var(--text); }
.tool-jamf { --logo: url("/logos/jamf.svg"); --brand: var(--text); }
.tool-wiz { --logo: url("/logos/wiz.svg"); --brand: var(--text); }
.tool-intruder { --logo: url("/logos/intruder.svg"); --brand: #fec400; }

/* Wordmark logos need a wider slot */
.tool-aws .tool-icon { width: 2.2rem; }
.tool-wiz .tool-icon { width: 2.7rem; }

.fine-print {
  margin: 2.5rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

/* Reduced motion and print: a static, wrapped list */
@media (prefers-reduced-motion: reduce) {
  .marquee {
    margin: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .marquee-track {
    width: auto;
    animation: none;
  }

  .marquee ul {
    flex-wrap: wrap;
    row-gap: 0.75rem;
    padding-right: 0;
  }

  .marquee ul[aria-hidden="true"] {
    display: none;
  }
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.timeline li:last-child {
  border-bottom: 0;
}

.timeline .when {
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

/* Resume */

.resume-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.resume-header .contact {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.skills {
  margin: 0;
}

.skills div {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.skills div:last-child {
  border-bottom: 0;
}

.skills dt {
  font-weight: 600;
}

.skills dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.job {
  margin: 0 0 2.5rem;
}

.job-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 1rem;
  margin-bottom: 0.25rem;
}

.job-head h3 {
  margin: 0;
}

.job-role {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.job-role .when,
.job-head .when {
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.job h4 {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 1.5rem 0 0.5rem;
}

.job ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.job li {
  margin: 0.35rem 0;
}

.job li::marker {
  color: var(--muted);
}

/* About this site */

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.checklist li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.checklist li:last-child {
  border-bottom: 0;
}

.checklist strong {
  display: block;
}

.checklist span {
  color: var(--muted);
  font-size: 0.95rem;
}

/* 404 */

.not-found {
  text-align: left;
}

.not-found .code {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

/* Small screens */

@media (max-width: 30rem) {
  body {
    font-size: 1rem;
  }

  h1 {
    font-size: 1.9rem;
  }

  main {
    padding: 1rem 0 2rem;
  }

  .marquee {
    margin: 0 -1rem;
  }

  main > .wrap {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding: 2rem 1rem;
  }
}

/* Print: the resume page prints on white paper */

@media print {
  :root {
    --bg: #fff;
    --surface: #fff;
    --border: #ccc;
    --text: #000;
    --muted: #333;
    --accent: #000;
  }

  body {
    font-size: 10.5pt;
    line-height: 1.4;
  }

  .site-header,
  .site-footer,
  .no-print,
  .whoareu,
  #bg {
    display: none;
  }

  body {
    background: #fff;
  }

  main {
    padding: 0;
  }

  main > .wrap {
    border: 0;
    padding: 0;
    background: none;
  }

  .marquee {
    margin: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .marquee-track {
    width: auto;
    animation: none;
  }

  .marquee ul {
    flex-wrap: wrap;
    padding-right: 0;
  }

  .marquee ul[aria-hidden="true"] {
    display: none;
  }

  a {
    text-decoration: none;
  }

  .job {
    break-inside: avoid-page;
  }

  h2 {
    margin-top: 1.5rem;
  }
}
