/* ---------------------------------------------------------------------------
   nickdagosto.com — phosphor terminal, refined
   --------------------------------------------------------------------------- */

:root {
  --bg: #0b0e0c;
  --bg-raised: #10140f;
  --border: #212922;
  --border-soft: #181e18;
  --text: #e7ece6;
  --text-muted: #a3ada1;
  --text-faint: #6d776c;
  --accent: #5ce087;
  --accent-soft: rgba(92, 224, 135, 0.1);
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --container: 740px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

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

/* Faint phosphor glow behind the hero */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 45% at 50% -10%, rgba(92, 224, 135, 0.07), transparent 70%);
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--text);
  text-decoration-color: var(--text-faint);
  text-underline-offset: 3px;
}

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

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

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* --- Skip link ------------------------------------------------------------ */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  border-radius: 6px;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* --- Header ---------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.75rem;
}

.logotype {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.logotype-cursor {
  color: var(--accent);
  margin-left: 2px;
  animation: blink 1.2s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a:not(.button) {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
}

.nav-links a:not(.button):hover {
  color: var(--text);
}

/* --- Buttons ---------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-raised);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.button:hover {
  border-color: var(--text-faint);
  transform: translateY(-1px);
}

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

.button-primary:hover {
  background: #74e89a;
  border-color: #74e89a;
}

.button-small {
  padding: 0.4rem 0.85rem;
  font-size: 0.8125rem;
}

.social-pair {
  display: inline-flex;
  gap: 0.25rem;
}

.icon-link {
  display: inline-flex;
  padding: 0.5rem;
  color: var(--text-muted);
  border-radius: 8px;
  transition: color 0.15s ease;
}

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

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

.hero {
  padding-top: 5.5rem;
  padding-bottom: 5rem;
}

.hero > * {
  animation: rise 0.5s ease both;
}

.hero > *:nth-child(2) { animation-delay: 0.06s; }
.hero > *:nth-child(3) { animation-delay: 0.12s; }
.hero > *:nth-child(4) { animation-delay: 0.18s; }
.hero > *:nth-child(5) { animation-delay: 0.24s; }
.hero > *:nth-child(6) { animation-delay: 0.3s; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.avatar {
  display: block;
  image-rendering: pixelated;
  margin-bottom: 1.75rem;
}

.prompt {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.5rem, 7vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.hero-lede {
  max-width: 34em;
  font-size: 1.1875rem;
  color: var(--text-muted);
  margin-bottom: 0.875rem;
}

.hero-meta {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-faint);
  margin-bottom: 2.25rem;
}

.hero-meta-link {
  color: var(--text-faint);
  text-decoration-color: var(--border);
}

.hero-meta-link:hover {
  color: var(--text-muted);
  text-decoration-color: var(--text-faint);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* --- Sections ----------------------------------------------------------------- */

.section {
  padding-block: 3.5rem;
  border-top: 1px solid var(--border-soft);
}

h2 {
  margin: 0 0 2.25rem;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
}

.section-path {
  color: var(--accent);
}

/* --- Work list ------------------------------------------------------------------ */

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

.work-item {
  padding: 1.75rem 1.5rem;
  margin-inline: -1.5rem;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.work-item:hover {
  background: var(--bg-raised);
}

.work-item + .work-item {
  margin-top: 0.5rem;
}

.work-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.work-index {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
}

.work-item h3 {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.work-item p {
  color: var(--text-muted);
  font-size: 0.9844rem;
}

.work-outcome {
  color: var(--text) !important;
  font-weight: 500;
  font-size: 0.9375rem !important;
  padding-left: 0.875rem;
  border-left: 2px solid var(--accent);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 99px;
}

/* --- Experience ----------------------------------------------------------------- */

.role + .role {
  margin-top: 2.75rem;
}

.role-head {
  margin-bottom: 0.875rem;
}

.role h3 {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.role-dates {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-faint);
  margin: 0;
}

.inline-link {
  color: var(--text-muted);
}

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

.role-bullets li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.6rem;
  color: var(--text-muted);
  font-size: 0.9844rem;
}

.role-bullets li::before {
  content: "›";
  position: absolute;
  left: 0.25rem;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* --- Skills ------------------------------------------------------------------------ */

.skills {
  margin-top: 3.25rem;
}

.skills-title {
  margin: 0 0 1.25rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.skills-grid {
  margin: 0;
  border-top: 1px solid var(--border-soft);
}

.skills-row {
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  gap: 1rem;
  padding-block: 0.8rem;
  border-bottom: 1px solid var(--border-soft);
}

.skills-row dt {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-faint);
  padding-top: 0.1rem;
}

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

/* --- Contact ------------------------------------------------------------------------- */

.section-contact {
  padding-bottom: 5.5rem;
}

.contact-lede {
  max-width: 36em;
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

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

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding-block: 1.75rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-footer p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}

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

@media (max-width: 640px) {
  .hero {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .nav-links {
    gap: 1rem;
  }

  /* Keep header compact: résumé button + contact carry the load on mobile */
  .nav-links li:nth-child(2) {
    display: none;
  }

  .logotype {
    font-size: 0.8125rem;
  }
}

@media (max-width: 420px) {
  .nav-links li:nth-child(1) {
    display: none;
  }

  .work-item {
    padding-inline: 1rem;
    margin-inline: -1rem;
  }

  .work-head {
    flex-direction: column;
    gap: 0.25rem;
  }

  .skills-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* --- Reduced motion ------------------------------------------------------------------------ */

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

  .hero > * {
    animation: none;
  }

  .logotype-cursor {
    animation: none;
  }

  .button:hover {
    transform: none;
  }
}
