/* ============================================================
   Daniel Dover — Resume
   Plain CSS. No frameworks, no build step.
   ============================================================ */

:root {
  --bg:        #0f0f0f;
  --bg-soft:   #161616;
  --bg-card:   #1a1a1a;
  --line:      #262626;
  --text:      #e6e6e6;
  --text-dim:  #9a9a9a;
  --text-mute: #6a6a6a;
  --accent:    #56ccbb;
  --accent-dim: rgba(86, 204, 187, 0.12);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;

  --maxw: 1000px;
  --nav-h: 70px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

a { color: inherit; text-decoration: none; }

ul, ol { margin: 0; padding: 0; list-style: none; }

/* ---------- Subtle background glow ---------- */
body::before {
  content: "";
  position: fixed;
  top: -20vh;
  left: 50%;
  transform: translateX(-50%);
  width: 80vw;
  height: 60vh;
  background: radial-gradient(ellipse at center, rgba(86, 204, 187, 0.06), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  background: rgba(15, 15, 15, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.nav.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(15, 15, 15, 0.85);
}

.nav__brand {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.nav__cursor { animation: blink 1.1s steps(1) infinite; }

.nav__links {
  margin-left: auto;
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
}

.nav__links a {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.nav__links a::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav__links a:hover { color: var(--accent); }
.nav__links a:hover::before { width: 100%; }

.nav__pdf { font-size: 0.8rem; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.7rem 1.2rem;
  border-radius: 6px;
  border: 1px solid var(--accent);
  color: var(--accent);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn:hover { background: var(--accent-dim); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--accent {
  background: var(--accent);
  color: #07120f;
  font-weight: 600;
}
.btn--accent:hover { box-shadow: 0 8px 24px rgba(86, 204, 187, 0.25); background: var(--accent); }

.btn--ghost { background: transparent; }

/* ============================================================
   Layout / sections
   ============================================================ */
main { position: relative; z-index: 1; }

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) clamp(1.25rem, 5vw, 3rem);
}

.section__title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 2.5rem;
  white-space: nowrap;
}

.section__title::after {
  content: "";
  height: 1px;
  width: 100%;
  max-width: 320px;
  margin-left: 0.5rem;
  background: var(--line);
}

.section__num {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--accent);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem clamp(1.25rem, 5vw, 3rem) 4rem;
  position: relative;
}

.hero__greeting {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: clamp(0.85rem, 2vw, 1rem);
  margin: 0 0 1.2rem;
}

.hero__name {
  font-size: clamp(2.6rem, 9vw, 5rem);
  line-height: 1.05;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.hero__tagline {
  font-size: clamp(1.6rem, 6vw, 3.2rem);
  line-height: 1.1;
  margin: 0.4rem 0 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-dim);
  min-height: 1.2em;
}

.hero__typed { color: var(--text-dim); }

.hero__caret {
  display: inline-block;
  width: 3px;
  height: 0.95em;
  margin-left: 4px;
  background: var(--accent);
  transform: translateY(0.12em);
  animation: blink 1.05s steps(1) infinite;
}

.hero__blurb {
  max-width: 560px;
  color: var(--text-dim);
  margin: 1.8rem 0 0;
  font-size: clamp(1rem, 2.5vw, 1.1rem);
}

.hero__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.hero__contact a {
  color: var(--text);
  position: relative;
  transition: color 0.2s ease;
}
.hero__contact a:hover { color: var(--accent); }

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid var(--text-mute);
  border-radius: 14px;
}
.hero__scroll span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollWheel 1.8s ease-in-out infinite;
}

/* ============================================================
   Education
   ============================================================ */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.6rem 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.edu-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.edu-card__school { margin: 0; font-size: 1.2rem; color: #fff; }
.edu-card__degree { margin: 0.4rem 0 0; color: var(--text-dim); }
.edu-card__date {
  margin: 0.8rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}

/* ============================================================
   Experience / timeline
   ============================================================ */
.timeline {
  position: relative;
  padding-left: 1.75rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line);
}

.job { position: relative; border-bottom: 1px solid var(--line); }
.job:last-child { border-bottom: none; }

.job__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.4rem 0;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.job__dot {
  position: absolute;
  left: -1.75rem;
  top: 1.9rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--text-mute);
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.job.is-open .job__dot,
.job__head:hover .job__dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.job__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.7rem;
}

.job__title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
}
.job.is-open .job__title { color: var(--accent); }

.job__company { color: var(--text-dim); font-size: 0.98rem; }

.job__badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  align-self: center;
}

.job__meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.job__date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-mute);
  white-space: nowrap;
}

.job__chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--text-mute);
  border-bottom: 2px solid var(--text-mute);
  transform: rotate(45deg);
  transition: transform 0.3s ease, border-color 0.2s ease;
}
.job__head:hover .job__chevron { border-color: var(--accent); }
.job.is-open .job__chevron { transform: rotate(-135deg); border-color: var(--accent); }

/* Collapsible body via max-height */
.job__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
}
.job.is-open .job__body {
  max-height: 420px;
  opacity: 1;
}

.job__body ul {
  padding: 0 0 1.5rem 0.2rem;
}
.job__body li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.6rem;
  color: var(--text-dim);
}
.job__body li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ============================================================
   Skills
   ============================================================ */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.pill {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, background 0.2s ease;
  cursor: default;
}
.pill:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

/* ============================================================
   Contact
   ============================================================ */
.section--contact {
  text-align: center;
  max-width: 640px;
}
.section--contact .section__num {
  display: block;
  margin-bottom: 1rem;
}
.contact__title {
  font-size: clamp(2rem, 7vw, 3.2rem);
  margin: 0 0 1.2rem;
  color: #fff;
  font-weight: 800;
}
.contact__text {
  color: var(--text-dim);
  margin: 0 auto 2.5rem;
}
.contact__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  text-align: center;
  padding: 2.5rem 1.25rem 3rem;
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.footer p { margin: 0.3rem 0; }
.footer__contact a { transition: color 0.2s ease; }
.footer__contact a:hover { color: var(--accent); }

/* ============================================================
   Reveal-on-scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   Keyframes
   ============================================================ */
@keyframes blink {
  0%, 50%  { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

@keyframes scrollWheel {
  0%   { opacity: 0; transform: translateY(0); }
  30%  { opacity: 1; }
  60%  { opacity: 1; transform: translateY(12px); }
  100% { opacity: 0; transform: translateY(12px); }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 640px) {
  body { font-size: 16px; }

  .nav { gap: 0.75rem; padding: 0 1.1rem; }
  .nav__links {
    gap: 0.9rem;
    font-size: 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav__links::-webkit-scrollbar { display: none; }
  .nav__links a { font-size: 0.75rem; }
  .nav__pdf { display: none; }        /* PDF lives in the contact/footer on mobile */

  .job__head { flex-wrap: wrap; gap: 0.4rem 1rem; }
  .job__meta { margin-left: 0; width: 100%; justify-content: space-between; }
  .job.is-open .job__body { max-height: 600px; }

  .hero__scroll { display: none; }
  .section__title::after { display: none; }
}
