/* ================================================================
   Jacob Dreyer — portfolio
   Hardware meets software: dark schematic surfaces, electric blue
   signal lines, terminal-green status marks, monospace throughout.
   ================================================================ */

:root {
  --bg-900: #0d1117;
  --bg-800: #12171f;
  --bg-700: #171e27;
  --bg-600: #1f2833;
  --line: #2b3542;
  --line-bright: #3d4a5c;
  --accent: #4db8ff;
  --accent-hover: #7ccbff;
  --accent-glow: rgba(77, 184, 255, .14);
  --green: #56d364;
  --text: #dbe4ee;
  --text-dim: #93a1b3;
  --font-display: "Space Mono", "IBM Plex Mono", "Courier New", monospace;
  --font-body: "IBM Plex Mono", "Consolas", "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; color-scheme: dark; }

body {
  background-color: var(--bg-900);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

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

::selection { background: var(--accent); color: #0d1117; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }

/* shared bits ---------------------------------------------------- */
.prompt { color: var(--green); font-weight: 700; }

.led {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(86, 211, 100, .8);
  animation: led-pulse 2.4s ease-in-out infinite;
}

@keyframes led-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

/* scroll progress ------------------------------------------------ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--green));
  z-index: 300;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* reveal-on-scroll ----------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .led { animation: none; }
  .brand-cursor, .type-caret { animation: none !important; }
}

/* ================= NAV ================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.brand-cursor {
  display: inline-block;
  width: 9px;
  height: 1.15em;
  background: var(--green);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  0%, 55% { opacity: 1; }
  56%, 100% { opacity: 0; }
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-menu a {
  display: block;
  padding: 10px 11px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: .84rem;
  transition: color .2s;
}

.nav-num { color: var(--accent); font-size: .74rem; margin-right: 3px; }

.nav-menu a:hover, .nav-menu a.active { color: var(--text); }

.nav-menu a.active .nav-num,
.nav-menu a:hover .nav-num { color: var(--accent-hover); }

.nav-menu a.nav-resume {
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  margin-left: 10px;
  padding: 7px 16px;
  transition: background .2s, box-shadow .2s, color .2s;
}

.nav-menu a.nav-resume:hover {
  background: var(--accent-glow);
  box-shadow: 0 0 14px var(--accent-glow);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================= HERO ================= */
.hero {
  position: relative;
  overflow: hidden;
  padding: 110px 0 100px;
  background:
    radial-gradient(ellipse 60% 50% at 70% 20%, var(--accent-glow), transparent 70%),
    linear-gradient(rgba(77, 184, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 184, 255, .035) 1px, transparent 1px),
    var(--bg-800);
  background-size: auto, 42px 42px, 42px 42px, auto;
  border-bottom: 1px solid var(--line);
}

.hero-traces {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--accent);
  opacity: .14;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .85rem;
  color: var(--text-dim);
  margin-bottom: 22px;
}

.hero-name {
  font-size: clamp(3rem, 7.5vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -.02em;
}

.hero-name .accent {
  color: var(--accent);
  text-shadow: 0 0 30px var(--accent-glow);
}

.hero-typed {
  margin-top: 22px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
  min-height: 1.8em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.type-caret {
  display: inline-block;
  width: 10px;
  height: 1.2em;
  background: var(--green);
  animation: blink 1.1s steps(1) infinite;
}

.hero-bio {
  margin-top: 18px;
  max-width: 520px;
  color: var(--text-dim);
}

.hero-loc {
  margin-top: 14px;
  font-size: .85rem;
  color: var(--green);
  opacity: .85;
}

.hero-cta { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }

/* photo */
.hero-photo-wrap { display: flex; justify-content: center; }

.hero-photo {
  position: relative;
  width: min(290px, 70vw);
  aspect-ratio: 1;
  border-radius: 10px;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  border: 1px solid var(--line-bright);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .5), 0 0 40px var(--accent-glow);
  position: relative;
  z-index: 1;
}

/* corner brackets, like silkscreen fiducial marks */
.hero-photo::before,
.hero-photo::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border: 2px solid var(--accent);
  z-index: 2;
}

.hero-photo::before {
  top: -12px;
  left: -12px;
  border-right: 0;
  border-bottom: 0;
}

.hero-photo::after {
  bottom: -12px;
  right: -12px;
  border-left: 0;
  border-top: 0;
}

/* ---------------- buttons ---------------- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .88rem;
  letter-spacing: .02em;
  text-decoration: none;
  border-radius: 6px;
  cursor: pointer;
  transition: transform .15s, background .2s, border-color .2s, color .2s, box-shadow .2s;
}

.btn-primary {
  background: var(--accent);
  color: #0d1117;
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-bright);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-2px);
}

/* ================= SECTIONS ================= */
.section { padding: 96px 0; scroll-margin-top: 72px; }

.section-alt {
  background: var(--bg-800);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
}

.section-index {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  font-size: 1rem;
}

.section-index::before { content: "/"; opacity: .5; margin-right: 2px; }

.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); white-space: nowrap; }

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-bright), var(--line) 70%, transparent);
  position: relative;
}

.section-line::after {
  content: "";
  position: absolute;
  right: 18%;
  top: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-bright);
}

.section-sub, .courses-lead {
  color: var(--text-dim);
  font-size: .85rem;
  margin-bottom: 22px;
}

.section-sub::before, .courses-lead::before {
  content: "// ";
  color: var(--green);
  opacity: .85;
}

/* ================= ABOUT ================= */
.about-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 28px;
  align-items: start;
}

.about-card {
  background: var(--bg-700);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 30px 34px;
  transition: border-color .25s;
}

.about-card:hover { border-color: var(--line-bright); }

.about-card p + p { margin-top: 16px; }

.about-card strong { color: var(--accent); font-weight: 600; }

/* terminal-style facts card */
.about-specs {
  background: var(--bg-700);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  font-size: .86rem;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  background: var(--bg-600);
  border-bottom: 1px solid var(--line);
}

.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-bright);
}

.term-dot:nth-child(1) { background: #e5605c; }
.term-dot:nth-child(2) { background: #e0b02e; }
.term-dot:nth-child(3) { background: #56d364; }

.term-title {
  margin-left: auto;
  color: var(--text-dim);
  font-size: .78rem;
}

.term-body { list-style: none; padding: 16px 20px; }

.term-body li {
  display: flex;
  gap: 8px;
  padding: 5px 0;
}

.term-body .key { color: var(--accent); flex-shrink: 0; }

.term-body .key::after { content: ":"; color: var(--text-dim); }

.term-body .val { color: var(--text); }

/* ================= SKILLS ================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tool-panel {
  background: var(--bg-700);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 24px;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}

.tool-panel:hover {
  border-color: var(--line-bright);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}

.tool-panel-wide { grid-column: 1 / -1; }

.tool-panel h3 { font-size: 1.02rem; margin-bottom: 14px; }

.h3-mark { color: var(--green); margin-right: 6px; }

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags li {
  background: var(--bg-600);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 11px;
  font-size: .8rem;
  color: var(--text);
  transition: border-color .2s, color .2s;
}

.tags li:hover { border-color: var(--accent); color: var(--accent); }

.tags-code li { border-left: 3px solid var(--accent); }

.tags-code em {
  font-style: normal;
  color: var(--text-dim);
  font-size: .74rem;
  margin-left: 6px;
}

.tags-specialty li { border-left: 3px solid var(--green); font-weight: 600; }

/* ================= EXPANDABLE CARDS ================= */
.workorder {
  background: var(--bg-700);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 14px;
  overflow: hidden;
  transition: border-color .25s, box-shadow .25s;
}

.workorder:hover {
  border-color: var(--line-bright);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
}

.wo-head {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 18px 22px;
  background: transparent;
  border: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  transition: background .2s;
}

.wo-head:hover { background: rgba(77, 184, 255, .04); }

.wo-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.wo-title { flex: 1; display: flex; flex-direction: column; gap: 2px; }

.wo-title strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
}

.wo-company { color: var(--text-dim); font-size: .82rem; }

.wo-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.wo-dates { color: var(--text-dim); font-size: .8rem; }

.wo-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .72rem;
  letter-spacing: .04em;
  padding: 2px 10px;
  border-radius: 20px;
  border: 1px solid rgba(86, 211, 100, .45);
  color: var(--green);
}

.wo-status .led { width: 6px; height: 6px; }

.wo-chevron {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-dim);
  font-size: 1.25rem;
  line-height: 1;
  transition: transform .3s, color .3s;
}

.wo-head[aria-expanded="true"] .wo-chevron {
  transform: rotate(45deg);
  color: var(--accent);
}

.wo-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .45s cubic-bezier(.4, 0, .2, 1);
  background: var(--bg-800);
  border-top: 1px solid var(--line);
}

.wo-inner { padding: 22px 26px; }

.wo-list { list-style: none; }

.wo-list li {
  position: relative;
  padding: 6px 0 6px 22px;
  font-size: .92rem;
}

.wo-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 6px;
  color: var(--accent);
}

.wo-tags { margin-top: 16px; }

.wo-tags li { font-size: .74rem; padding: 3px 10px; }

/* ================= PROJECTS ================= */
.bay-grid { display: grid; gap: 14px; }

/* ================= EDUCATION ================= */
.degree-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
  background: var(--bg-700);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px 32px;
  margin-bottom: 32px;
  transition: border-color .25s;
}

.degree-card:hover { border-color: var(--line-bright); }

.degree-main h3 { font-size: 1.25rem; }

.degree-school { color: var(--text-dim); margin-top: 6px; font-size: .88rem; }

.degree-badge {
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 7px 16px;
  white-space: nowrap;
  background: var(--accent-glow);
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.course { margin-bottom: 0; align-self: start; }

.course .wo-head { padding: 14px 18px; }

.course .wo-title strong { font-size: .95rem; }

.course .wo-inner { padding: 16px 20px; color: var(--text-dim); font-size: .88rem; }

/* ================= RESUME ================= */
.resume-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.resume-frame {
  max-width: 880px;
  background: var(--bg-700);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
}

.resume-viewer iframe {
  border: 0;
  border-radius: 6px;
  display: block;
  background: #fff;
  width: 100%;
  height: 800px;
}

.resume-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 64px 24px;
  border: 1px dashed var(--line-bright);
  border-radius: 6px;
  text-align: center;
}

.file-line { font-size: .9rem; }

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

.file-meta { color: var(--text-dim); font-size: .8rem; }

.resume-fallback {
  padding: 12px 4px 0;
  color: var(--text-dim);
  font-size: .8rem;
}

/* ================= CONTACT ================= */
.contact-lead { color: var(--text-dim); margin-bottom: 30px; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-700);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px 20px;
  text-decoration: none;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}

.contact-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow), 0 10px 24px rgba(0, 0, 0, .35);
}

.contact-label { color: var(--accent); font-size: .8rem; font-weight: 600; }

.contact-label::before { content: "> "; color: var(--green); }

.contact-value {
  color: var(--text-dim);
  font-size: .82rem;
  word-break: break-all;
  transition: color .2s;
}

.contact-card:hover .contact-value { color: var(--text); }

/* ================= FOOTER ================= */
.footer { background: var(--bg-900); }

.footer-trace {
  height: 24px;
  color: var(--accent);
  opacity: .25;
}

.footer-trace svg { width: 100%; height: 100%; display: block; }

.footer-inner {
  padding: 22px 24px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: .8rem;
}

.eof { color: var(--green); opacity: .7; }

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-photo-wrap { order: -1; }
  .hero-photo { width: min(210px, 60vw); }
  .hero { padding: 70px 0 76px; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .nav-toggle { display: flex; }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(13, 17, 23, .97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--accent);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .6);
    display: none;
  }

  .nav-menu.open { display: flex; }

  .nav-menu a { padding: 15px 24px; border-bottom: 1px solid var(--line); }

  .nav-menu a.nav-resume { margin: 10px 24px 16px; text-align: center; }

  .skills-grid { grid-template-columns: 1fr; }

  .course-grid { grid-template-columns: 1fr; }

  .wo-head { flex-wrap: wrap; gap: 10px; }

  .wo-meta { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }

  .contact-grid { grid-template-columns: 1fr; }

  .section { padding: 64px 0; }

  .section-head h2 { white-space: normal; }

  .footer-inner { justify-content: center; }
}
