/* johnsevoro.com — static version. One stylesheet, no build step. */

:root {
  --background: 225 14% 9%;
  --foreground: 38 100% 92%;
  --card: 228 12% 15%;
  --primary: 15 100% 50%;
  --primary-deep: 15 90% 41%;
  --muted-foreground: 38 20% 75%;
  --border: 228 10% 22%;
  --radius: 0.875rem;
  --gradient-brand: linear-gradient(135deg, hsl(15 100% 50%), hsl(15 90% 41%));
  --gradient-card: linear-gradient(145deg, hsl(228 12% 17%), hsl(228 12% 12%));
  --shadow-glow: 0 20px 60px -20px hsl(15 100% 50% / 0.45);
  --shadow-card: 0 10px 30px -12px hsl(0 0% 0% / 0.6);
  --transition-smooth: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Base */
*,
::before,
::after {
  box-sizing: border-box;
  border: 0 solid hsl(var(--border));
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
p,
dl,
dd {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-size: inherit;
  font-weight: inherit;
}

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

hr {
  height: 0;
  color: inherit;
  border-top-width: 1px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

button {
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  text-transform: none;
  -webkit-appearance: button;
  background-color: transparent;
  background-image: none;
  cursor: pointer;
}

[hidden] {
  display: none;
}

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

svg {
  display: block;
  vertical-align: middle;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-feature-settings: normal;
  font-variation-settings: normal;
  font-size: 1em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Page layout */
.page {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  min-height: 100svh;
  padding: 4rem 1.5rem;
}

@media (min-width: 640px) {
  .page {
    gap: 3.5rem;
    padding: 5rem 1.5rem;
  }

  .page-404 {
    gap: 3rem;
  }
}

/* Logo and the big 404 share the float and the warm glow */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.logo {
  width: 100%;
  max-width: min(85vw, 520px);
  height: auto;
}

.logo,
.code {
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 12px 40px hsl(15 100% 50% / 0.25));
}

/* Link cards */
.links {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 28rem;
}

@media (min-width: 640px) {
  .links {
    flex-direction: row;
    gap: 1rem;
    max-width: none;
  }
}

.card {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-width: 180px;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius);
  background: var(--gradient-card);
  color: hsl(var(--foreground));
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-card), inset 0 0 0 1px hsl(var(--border));
  transition: var(--transition-smooth);
  overflow: hidden;
  isolation: isolate;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, hsl(15 100% 50% / 0.6), transparent 50%, hsl(15 100% 60% / 0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: 1;
}

.card::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: var(--gradient-brand);
  opacity: 0;
  filter: blur(20px);
  transition: var(--transition-smooth);
  z-index: -1;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-2px);
  color: hsl(var(--foreground));
  box-shadow: var(--shadow-glow), inset 0 0 0 1px hsl(var(--border));
}

.card:hover::before,
.card:focus-visible::before {
  opacity: 1;
}

.card:hover::after,
.card:focus-visible::after {
  opacity: 0.5;
}

.card svg {
  transition: var(--transition-smooth);
}

.card:hover svg {
  transform: scale(1.1);
}

/* 404 page */
.stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.code {
  -webkit-user-select: none;
          user-select: none;
  background-image: linear-gradient(to bottom right, hsl(var(--primary)), hsl(var(--primary)), hsl(var(--primary-deep)));
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  font-size: clamp(7rem, 28vw, 16rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
}

.eyebrow {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  line-height: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: hsl(var(--primary) / 0.8);
}

.headline {
  margin-top: 1.5rem;
  max-width: 36rem;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.lede {
  margin-top: 0.75rem;
  max-width: 28rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: hsl(var(--muted-foreground));
}

.path {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid hsl(var(--border) / 0.6);
  border-radius: calc(var(--radius) - 2px);
  background-color: hsl(var(--card) / 0.6);
  font-size: 0.75rem;
  line-height: 1rem;
  color: hsl(var(--muted-foreground));
}

.path[hidden] {
  display: none;
}

@media (min-width: 640px) {
  .headline {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }

  .lede {
    font-size: 1rem;
    line-height: 1.5rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .logo,
  .code {
    animation: none;
  }

  .card::after {
    display: none;
  }

  .card:hover,
  .card:focus-visible {
    transform: none;
    box-shadow: var(--shadow-card), inset 0 0 0 1px hsl(var(--border));
  }

  .card:hover svg {
    transform: none;
  }
}

/* CV page (/cv/) */

.cv-page {
  min-height: 100svh;
  padding: 2.5rem 1rem 3.5rem;
}

.cv-column {
  max-width: 680px;
  margin: 0 auto;
}

.cv-langs {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.875rem;
}

.cv-seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: hsl(var(--card) / 0.6);
  box-shadow: inset 0 0 0 1px hsl(var(--border));
}

.cv-seg button {
  appearance: none;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-family: inherit;
  font-size: 0.8125rem;
  line-height: 1;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  -webkit-tap-highlight-color: transparent;
}

.cv-seg button:hover {
  color: hsl(var(--foreground));
}

.cv-seg button[aria-checked="true"] {
  background: hsl(var(--primary) / 0.16);
  color: hsl(var(--primary));
  font-weight: 600;
}

.cv-seg button:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 1px;
}

.cv-card {
  --cv-pad: 1.5rem;
  background: var(--gradient-card);
  border-radius: 1.25rem;
  box-shadow: var(--shadow-card), inset 0 0 0 1px hsl(var(--border));
  color: hsl(var(--foreground));
  font-size: 0.9375rem;
  line-height: 1.5rem;
}

.cv-block {
  padding: 1.375rem var(--cv-pad) 0;
}

.cv-block:last-child {
  padding-bottom: 1.375rem;
}

.cv-rule {
  height: 0;
  margin: 1.375rem var(--cv-pad) 0;
  border: 0;
  border-top: 1px solid hsl(var(--border) / 0.6);
}

.cv-eyebrow {
  margin: 0;
  font-size: 0.6875rem;
  line-height: 1rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.cv-eyebrow--tint {
  color: hsl(var(--primary) / 0.8);
}

.cv-card a {
  color: hsl(var(--primary));
  text-decoration: underline;
  text-decoration-color: hsl(var(--primary) / 0.35);
  text-underline-offset: 3px;
  transition: var(--transition-smooth);
}

.cv-card a:hover {
  text-decoration-color: currentColor;
}

.cv-head {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.cv-head-text {
  flex: 1;
  min-width: 0;
}

.cv-name {
  margin: 0.5rem 0 0;
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.cv-role-line {
  margin: 0.25rem 0 0;
  font-size: 1.0625rem;
  line-height: 1.5rem;
  color: hsl(var(--muted-foreground));
}

.cv-photo {
  flex: none;
  width: 96px;
  height: 96px;
  padding: 3px;
  border-radius: 50%;
  background: hsl(var(--card));
  box-shadow: inset 0 0 0 1px hsl(var(--border));
}

.cv-photo img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.cv-contact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 1.125rem;
  margin: 0;
}

.cv-contact div {
  min-width: 0;
}

.cv-contact dd {
  margin: 0.3125rem 0 0;
  overflow-wrap: anywhere;
}

.cv-section-title {
  margin-bottom: 0.25rem;
}

.cv-lede {
  margin: 0.625rem 0 0;
}

.cv-rows {
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
}

.cv-rows li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.6875rem 0;
}

.cv-rows li + li {
  border-top: 1px solid hsl(var(--border) / 0.6);
}

.cv-rows li:last-child {
  padding-bottom: 0;
}

.cv-value {
  color: hsl(var(--muted-foreground));
  text-align: right;
}

.cv-entry {
  padding-top: 1rem;
}

.cv-entry + .cv-entry {
  margin-top: 1.125rem;
  padding-top: 1.125rem;
  border-top: 1px solid hsl(var(--border) / 0.6);
}

.cv-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  break-after: avoid;
}

.cv-org {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.cv-dates {
  flex: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.75rem;
  line-height: 1rem;
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
}

.cv-role {
  margin-top: 0.625rem;
  padding-left: 0.875rem;
  border-left: 2px solid hsl(var(--primary) / 0.3);
  break-inside: avoid;
}

.cv-role + .cv-role {
  margin-top: 0.875rem;
}

.cv-role-title {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.3125rem;
  font-weight: 600;
}

.cv-meta {
  margin: 0.125rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.125rem;
  color: hsl(var(--muted-foreground));
}

.cv-text {
  margin: 0.375rem 0 0;
}

.cv-footer {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

@media (max-width: 560px) {
  .cv-page {
    padding: 1rem 0.75rem 2.5rem;
  }

  .cv-card {
    --cv-pad: 1.125rem;
  }

  .cv-langs {
    justify-content: center;
    margin-bottom: 0.75rem;
  }

  .cv-seg button {
    padding: 0 12px;
  }

  .cv-name {
    font-size: 1.5rem;
    line-height: 2rem;
  }

  .cv-photo {
    width: 76px;
    height: 76px;
  }

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

  .cv-contact div + div {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid hsl(var(--border) / 0.6);
  }

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

  .cv-org {
    font-size: 1.0625rem;
    line-height: 1.5rem;
  }
}

/* Printed, the CV goes on white with dark ink and without the site chrome. */
@media print {
  @page {
    margin: 12mm 14mm;
  }

  body:has(.cv-page) {
    --background: 0 0% 100%;
    --foreground: 24 14% 10%;
    --muted-foreground: 30 9% 36%;
    --card: 0 0% 100%;
    --border: 30 5% 55%;
    --primary: 15 100% 37%;
  }

  .cv-page {
    min-height: 0;
    padding: 0;
  }

  .cv-column {
    max-width: none;
  }

  .cv-langs,
  .cv-footer {
    display: none;
  }

  .cv-card {
    background: none;
    box-shadow: none;
    border-radius: 0;
    font-size: 13.5px;
    line-height: 20px;
  }

  .cv-card a {
    color: inherit;
    text-decoration: none;
  }

  .cv-block {
    padding-top: 1rem;
  }

  .cv-rule {
    margin-top: 1rem;
  }

  .cv-entry {
    padding-top: 0.75rem;
  }

  .cv-entry + .cv-entry {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
  }

  .cv-role {
    margin-top: 0.375rem;
  }

  .cv-role + .cv-role {
    margin-top: 0.625rem;
  }

  .cv-rows li {
    padding: 0.4375rem 0;
  }

  .cv-section-title {
    break-after: avoid;
  }
}
