/* Jacob North — Personal site styles */
:root {
  --bg: #0b1020;
  --bg-elev: rgba(255, 255, 255, 0.06);
  --text: #e6e9ef;
  --muted: #a0a8b8;
  --primary: #7aa2ff;
  --accent: #64d2ff;
  --chip: rgba(255, 255, 255, 0.08);
  --card: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --header-h: 64px;
}

/* light theme removed; site locked to dark palette */

/* Fixed gradient overlay to avoid repeat seams and improve scroll performance */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
      1200px 800px at 80% -10%,
      rgba(122, 162, 255, 0.15),
      transparent 60%
    ),
    radial-gradient(
      900px 650px at 10% 12%,
      rgba(100, 210, 255, 0.16),
      transparent 60%
    );
  background-repeat: no-repeat;
  transform: translateY(calc(var(--bg-shift, 0) * 1px));
  transition: transform 0.2s linear;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --header-h: 64px;
}

/* Mobile fallback: some mobile browsers struggle with fixed backgrounds */
@media (max-width: 768px) {
  body::before {
    position: absolute;
  }
}

#bg {
  position: fixed;
  inset: 0;
  z-index: -2;
}

.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
/* scroll progress bar */
.site-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 2px;
  right: 0;
  pointer-events: none;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transform-origin: left;
  transform: scaleX(var(--scroll, 0));
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand {
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--text);
  font-size: 1.1rem;
  background: linear-gradient(120deg, var(--accent), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* offset content below fixed header */
main {
  padding-top: calc(var(--header-h) + 12px);
}

.nav {
  display: flex;
  gap: 8px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  position: relative;
}
/* keep nav link color consistent across states */
.nav a:link,
.nav a:visited {
  color: var(--text);
}
.nav a:hover {
  background: var(--chip);
  border-color: var(--border);
}
/* nav underline animation */
.nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.nav a:hover::after {
  transform: scaleX(1);
}
/* theme toggle removed */

.nav-toggle {
  display: none;
}
@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    background: var(--chip);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 10px;
  }
  .nav {
    display: none;
  }
  .nav[data-open="true"] {
    display: flex;
    position: absolute;
    right: 4%;
    top: calc(var(--header-h) + 8px);
    background: var(--card);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 12px;
    box-shadow: var(--shadow);
  }
}

.hero {
  padding: 84px 0 28px;
}
.hero-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.hero h1 {
  font-size: clamp(2.25rem, 3.6vw + 0.5rem, 3.25rem);
  margin: 0;
  letter-spacing: 0.2px;
}
.roles {
  color: var(--muted);
  margin: 0;
  font-size: 1.05rem;
}
.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip-group {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.03)
  );
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow);
}

@media (min-width: 900px) {
  .hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 24px;
  }
  .hero-header {
    margin-bottom: 0;
  }
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--chip);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}
/* keep chip link color consistent across states */
.chip:link,
.chip:visited {
  color: var(--text);
}
.chip:hover {
  transform: translateY(-1px);
}
/* chip sheen */
.chip {
  overflow: hidden;
}
.chip::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 999px;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.18),
    transparent
  );
  transform: translateX(-120%);
}
.chip:hover::before {
  animation: sheen 0.9s ease;
}

@keyframes sheen {
  to {
    transform: translateX(120%);
  }
}
.chip svg {
  width: 16px;
  height: 16px;
  opacity: 0.9;
}
.chip:hover svg {
  color: var(--accent);
}
/* Font Awesome icon sizing inside chips */
.chip i {
  font-size: 14px;
  opacity: 0.95;
}
.chip.action i {
  font-size: 15px;
}

.card {
  background: linear-gradient(180deg, var(--card), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 22px;
  margin: 18px 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}
.card h2 {
  margin-top: 0;
  margin-bottom: 10px;
  position: relative;
}
/* animated underline on reveal */
.reveal.visible .card h2::after,
.card.reveal.visible h2::after,
.card .reveal.visible h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 3px;
  width: 120px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  animation: underline 0.6s ease both;
}
@keyframes underline {
  from {
    transform: scaleX(0);
    transform-origin: left;
  }
  to {
    transform: scaleX(1);
  }
}

/* card hover lift */
.card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--border), var(--accent) 35%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.job header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.job .meta {
  color: var(--muted);
  font-size: 0.95rem;
}
.job-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 8px 0;
}
.job ul {
  margin: 0;
  padding-left: 18px;
}
.stack {
  color: var(--muted);
}

/* Professional Experience: divider between roles */
#experience .job + .job {
  position: relative;
  margin-top: 18px; /* space above next role */
  padding-top: 24px; /* space below divider */
}
#experience .job + .job::before {
  content: "";
  position: absolute;
  top: 0;
  left: -22px; /* extend to card padding edge */
  right: -22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
#experience .stack {
  margin-top: 8px;
}

/* Role chip groups */
.chip-group.role {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip-group.role .chip.label {
  font-weight: 600;
  opacity: 0.95;
  letter-spacing: 0.2px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.06)
  );
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.chip-group.role .chip {
  white-space: nowrap;
}
.chip.action {
  cursor: pointer;
  font-weight: 600;
}
.chip.action i {
  width: 16px;
  height: 16px;
}
.job > .chip-group.role + .chip-group.role {
  margin-top: 6px;
}
.job > header + .chip-group.role {
  margin-top: 12px;
}
.job .stack {
  margin-top: 14px;
}

.grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 900px) {
  .job-columns,
  .grid.two {
    grid-template-columns: 1fr;
  }
}

/* Certifications spacing & bullet alignment */
#certs .grid.two {
  gap: 8px 28px;
}
#certs .grid.two {
  padding-left: 18px;
}
#certs .grid.two li {
  margin: 4px 0;
}
@media (max-width: 700px) {
  #certs .grid.two {
    grid-template-columns: 1fr;
  }
}

/* Technical Expertise spacing and typography */
#skills .grid.two {
  gap: 22px 28px;
}
#skills h4 {
  margin: 0 0 6px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
#skills p {
  margin: 0;
  color: var(--muted);
}

/* Leadership & Management spacing and typography */
#leadership .grid.two {
  gap: 22px 28px;
}
#leadership h4 {
  margin: 0 0 6px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
#leadership p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  color: var(--muted);
  padding: 30px 0 60px;
}
.site-footer a {
  color: inherit;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Prefer reduced motion: soften or remove non-essential animations */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  body::before {
    transform: none !important;
  }
  .site-header::before {
    display: none !important;
  }
}

/* Print styles for resume submission */
@media print {
  :root {
    --bg: #fff;
    --text: #000;
    --muted: #333;
    --border: #ccc;
    --card: #fff;
  }
  body {
    background: #fff;
  }
  .site-header,
  #bg,
  .nav-toggle {
    display: none !important;
  }
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
