/* ================================================================
   Design tokens — monochrome base + single accent.
   Change --accent to restyle the whole site.
   ================================================================ */
:root {
  --bg: #0a0a0a;
  --bg-alt: #141414;
  --fg: #f5f5f2;
  --fg-muted: #9a9a95;
  --accent: #ff3b3b;
  --accent-contrast: #f5f5f2;
  --border: rgba(245, 245, 242, 0.14);
  --border-strong: rgba(245, 245, 242, 0.28);

  --font-display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1400px;
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
video {
  max-width: 100%;
  display: block;
}

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

ul {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.75rem 1.25rem;
  z-index: 200;
  font-weight: 700;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ---- Reveal-on-scroll --------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Header --------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(10, 10, 10, 0.85), transparent);
}

.site-nav {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-nav__brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  border: 2px solid var(--fg);
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.site-nav__brand:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.site-nav__links {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-nav__links a {
  position: relative;
  padding-bottom: 0.2rem;
}
.site-nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transition: right 0.3s var(--ease);
}
.site-nav__links a:hover::after,
.site-nav__links a:focus-visible::after {
  right: 0;
}

/* ---- Hero ------------------------------------------------------ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 0 clamp(1.25rem, 6vw, 5rem);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 85% 15%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
}

.hero__inner {
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}

.hero__eyebrow {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 1.5rem;
  transition-delay: 0.05s;
}

.hero__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 9vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  word-break: break-word;
  transition-delay: 0.15s;
}

.hero__tagline {
  margin-top: 1.75rem;
  max-width: 42ch;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  color: var(--fg-muted);
  transition-delay: 0.25s;
}

.hero__cta {
  margin-top: 3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1rem 1.75rem;
  border: 2px solid var(--fg);
  border-radius: 999px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
  transition-delay: 0.35s;
}
.hero__cta:hover,
.hero__cta:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
  transform: translateY(-2px);
}
.hero__cta-icon {
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ---- Section shell --------------------------------------------- */
section {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 7rem) clamp(1.25rem, 6vw, 3rem);
}

.section-head {
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.25rem);
  letter-spacing: -0.01em;
}

.section-head p {
  color: var(--fg-muted);
  font-size: 1rem;
}

/* ---- Work grid --------------------------------------------------- */
.work__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
}

.work-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  cursor: pointer;
  aspect-ratio: 4 / 5;
  transition: transform 0.45s var(--ease), border-color 0.45s var(--ease);
}
.work-item:nth-child(3n+1) {
  aspect-ratio: 4 / 5;
}
@media (min-width: 720px) {
  .work-item:first-child {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: 1 / 1;
  }
}

.work-item:hover,
.work-item:focus-visible {
  transform: translateY(-6px);
  border-color: var(--border-strong);
}

.work-item__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.work-item:hover .work-item__media {
  transform: scale(1.05);
}

.work-item__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.15) 55%, transparent 100%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.work-item:hover .work-item__overlay,
.work-item:focus-visible .work-item__overlay {
  opacity: 1;
}

.work-item__type {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(6px);
}
.work-item__type svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--fg);
}

.work-item__title {
  font-weight: 700;
  font-size: 1.05rem;
}

.work-item__caption {
  color: var(--fg-muted);
  font-size: 0.875rem;
  margin-top: 0.2rem;
}

.work-item__missing {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--fg-muted);
  background: repeating-linear-gradient(
    135deg,
    var(--bg-alt),
    var(--bg-alt) 10px,
    #191919 10px,
    #191919 20px
  );
}
.work-item.is-missing .work-item__missing {
  display: flex;
}
.work-item.is-missing .work-item__media {
  visibility: hidden;
}

/* ---- Resume ------------------------------------------------------- */
.resume__panel {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(1.75rem, 4vw, 3rem);
  background: var(--bg-alt);
}

.resume__summary {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  max-width: 65ch;
  color: var(--fg);
}

.resume__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
  margin-top: 2.5rem;
}

.resume__experience h3,
.resume__skills h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.resume__list li {
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  justify-content: space-between;
}
.resume__list li:last-child {
  border-bottom: 1px solid var(--border);
}

.resume__role {
  font-weight: 700;
}
.resume__org,
.resume__period {
  color: var(--fg-muted);
  font-size: 0.9rem;
}

.resume__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.resume__pills li {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

.resume__download {
  margin-top: 2.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 800;
  padding: 1rem 1.75rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.resume__download:hover,
.resume__download:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--accent) 60%, transparent);
}

/* ---- Footer --------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: clamp(3rem, 8vw, 5rem) clamp(1.25rem, 6vw, 3rem);
  text-align: center;
}

.site-footer__inner {
  max-width: var(--container);
  margin: 0 auto;
}

.site-footer__cta {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 5vw, 3rem);
  margin-bottom: 1.25rem;
}

.site-footer__email {
  display: inline-block;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--accent);
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.site-footer__email:hover,
.site-footer__email:focus-visible {
  border-color: var(--accent);
}

.site-footer__socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0;
  flex-wrap: wrap;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.site-footer__socials a {
  color: var(--fg-muted);
  transition: color 0.25s var(--ease);
}
.site-footer__socials a:hover,
.site-footer__socials a:focus-visible {
  color: var(--fg);
}

.site-footer__legal {
  color: var(--fg-muted);
  font-size: 0.8rem;
  margin-top: 2rem;
}

/* ---- Lightbox ----------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(6, 6, 6, 0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 5vw, 3rem);
}
.lightbox[hidden] {
  display: none;
}

.lightbox__stage {
  max-width: min(1100px, 92vw);
  max-height: 78vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__stage img,
.lightbox__stage video {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 10px;
  object-fit: contain;
}
.lightbox__stage iframe {
  width: min(900px, 90vw);
  height: 78vh;
  border: none;
  border-radius: 10px;
  background: #fff;
}
.lightbox__stage iframe.lightbox__stage-video {
  background: #000;
}

.lightbox__caption {
  margin-top: 1.25rem;
  color: var(--fg-muted);
  text-align: center;
  max-width: 60ch;
}

.lightbox__close {
  position: absolute;
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  font-size: 2.25rem;
  line-height: 1;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.25s var(--ease);
}
.lightbox__close:hover,
.lightbox__close:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s var(--ease);
}
.lightbox__nav:hover,
.lightbox__nav:focus-visible {
  background: rgba(255, 255, 255, 0.1);
}
.lightbox__nav--prev {
  left: clamp(0.5rem, 3vw, 2rem);
}
.lightbox__nav--next {
  right: clamp(0.5rem, 3vw, 2rem);
}

@media (max-width: 640px) {
  .site-nav__links {
    gap: 1rem;
    font-size: 0.75rem;
  }
}
