@import url('https://fonts.googleapis.com/css2?family=Anton&family=Caveat:wght@600&family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg: #0a0a0a;
  --panel: #141414;
  --red: #e0242c;
  --red-deep: #5c0d10;
  --text: #f2f0ee;
  --text-dim: #98938e;
  --line: rgba(255,255,255,0.1);
  --cream: #efe7dd;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}

.display {
  font-family: 'Anton', 'Archivo Black', Impact, sans-serif;
  font-weight: 400;
}

/* TOPBAR */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px clamp(20px, 4vw, 52px);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.topbar-left { display: flex; flex-direction: column; gap: 3px; }
.tag-red { color: var(--red); font-weight: 700; }
.tag-dim { color: var(--text-dim); }
.topbar-right { display: flex; align-items: center; gap: 8px; color: var(--text-dim); }
.spark { color: var(--red); }

.lang-toggle {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-left: 6px;
}
.lang-opt {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.lang-opt:hover { color: #fff; }
.lang-opt.active {
  background: var(--red);
  color: #fff;
}

/* HERO */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr) minmax(0, 0.7fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: end;
  height: 90vh;
  padding: 20px clamp(20px, 4vw, 52px) 26px;
  overflow: hidden;
}
.hero-bg-text {
  position: absolute;
  top: clamp(-10px, 2vw, 40px);
  left: 50%;
  transform: translateX(-50%);
  width: clamp(720px, 92vw, 1680px);
  height: auto;
  display: block;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
.hero-photo {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  align-self: stretch;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 15%;
  filter: grayscale(0.15) contrast(1.08) brightness(0.97);
  -webkit-mask-image: linear-gradient(to bottom, black 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 88%, transparent 100%);
  animation: kenburns 15s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}
@keyframes fadeIn {
  to { opacity: 1; }
}
.hero-bg-text { opacity: 0; animation: fadeIn 1.1s ease 0s forwards; }
.hero-photo { opacity: 0; animation: fadeIn 0.9s ease 0.15s forwards; }

.hero-left > *, .hero-right > * {
  opacity: 0;
  transform: translateY(16px);
  animation: heroRise 0.7s cubic-bezier(.22,.9,.32,1) forwards;
}
.hero-left > *:nth-child(1) { animation-delay: 0.15s; }
.hero-left > *:nth-child(2) { animation-delay: 0.25s; }
.hero-left > *:nth-child(3) { animation-delay: 0.35s; }
.hero-left > *:nth-child(4) { animation-delay: 0.45s; }
.hero-left > *:nth-child(5) { animation-delay: 0.55s; }
.hero-right > *:nth-child(1) { animation-delay: 0.35s; }
.hero-right > *:nth-child(2) { animation-delay: 0.5s; }
@keyframes heroRise {
  to { opacity: 1; transform: translateY(0); }
}
.hero-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  /* background: linear-gradient(200deg, rgba(224,36,44,0.22), transparent 55%, rgba(0,0,0,0.35) 100%); */
  mix-blend-mode: color;
  -webkit-mask-image: linear-gradient(to bottom, black 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 88%, transparent 100%);
}

.hero-left {
  grid-column: 1;
  z-index: 2;
  padding-bottom: clamp(6px, 1.4vh, 16px);
}
.script {
  font-family: 'Caveat', cursive;
  font-size: clamp(18px, 2vw, 26px);
  color: #fff;
  margin: 0 0 2px;
}
.hero-name {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: clamp(28px, 3.8vw, 48px);
  line-height: 1.12;
  color: #fff;
  margin: 0 0 10px;
  letter-spacing: -0.015em;
}
.hero-name span { display: block; }
.hero-name span + span { margin-top: 0.18em; }
.hero-role {
  font-family: 'Anton', 'Archivo Black', Impact, sans-serif;
  font-size: clamp(12px, 1.2vw, 15px);
  color: var(--red);
  line-height: 1.35;
  margin: 0 0 10px;
  letter-spacing: 0.01em;
}
.hero-bio {
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.55;
  max-width: 34ch;
  margin: 0 0 12px;
}
.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.hero-location svg { color: var(--red); }

.hero-right {
  grid-column: 3;
  z-index: 2;
  text-align: right;
  padding-bottom: clamp(6px, 1.4vh, 16px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
}
.hero-tagline {
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.6;
  max-width: 22ch;
  margin: 0;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.stat-block {
  border-right: 2px solid var(--red);
  padding-right: 16px;
  text-align: right;
}
.stat-block strong {
  display: block;
  font-family: 'Anton', 'Archivo Black', Impact, sans-serif;
  font-size: clamp(38px, 4vw, 54px);
  color: #fff;
  line-height: 1;
}
.stat-block > span {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-top: 4px;
}
.stat-tags {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.stat-tags span {
  font-size: 10.5px;
  border: 1px solid rgba(255,255,255,0.18);
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--text-dim);
}

/* PROJECTS */
.projects {
  padding: 70px clamp(20px, 4vw, 52px);
  border-top: 1px solid var(--line);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
  margin-bottom: 34px;
}
.section-head h3 {
  font-family: 'Anton', 'Archivo Black', Impact, sans-serif;
  font-size: clamp(22px, 2.4vw, 30px);
  margin: 0;
  color: #fff;
  letter-spacing: 0.01em;
}
.view-all {
  color: var(--text-dim);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-decoration: none;
  display: flex;
  gap: 8px;
  align-items: center;
  transition: color 0.2s ease;
}
.view-all:hover { color: var(--red); }

.slider-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}
.slider-track {
  flex: 1;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.slider-track::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 auto;
  width: clamp(240px, 27vw, 360px);
  aspect-ratio: 4/3;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  scroll-snap-align: start;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  transition: transform 0.3s cubic-bezier(.22,.9,.32,1);
  background: #111;
}
.slide:hover { transform: translateY(-6px); }
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.slide-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px 18px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.slide-overlay span {
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.7);
}
.slide-overlay strong {
  font-family: 'Anton', 'Archivo Black', Impact, sans-serif;
  font-size: clamp(16px, 1.7vw, 20px);
  color: #fff;
  letter-spacing: 0.01em;
}
.slider-arrow {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.slider-arrow:hover { background: var(--red); border-color: var(--red); }

.slider-dots {
  display: none;
  justify-content: center;
  gap: 7px;
  margin-top: 18px;
}
.slider-dots button {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255,255,255,0.22);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}
.slider-dots button.active {
  background: var(--red);
  transform: scale(1.35);
}

/* TRIPTYCH */
.triptych {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr;
  border-top: 1px solid var(--line);
}
.col { padding: 60px clamp(20px, 3.5vw, 44px); }
.edu-skills, .process { border-right: 1px solid var(--line); }
.col > h3 {
  font-family: 'Anton', 'Archivo Black', Impact, sans-serif;
  font-size: clamp(18px, 1.9vw, 22px);
  color: #fff;
  margin: 0 0 28px;
}
.edu-skills h4, .process h3 {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--red);
  margin: 0 0 16px;
  font-weight: 700;
}
.edu-item { margin-bottom: 30px; }
.edu-item strong { display: block; color: #fff; font-size: 14.5px; margin-bottom: 4px; }
.edu-item span { color: var(--text-dim); font-size: 12px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row span {
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--text-dim);
}

.process-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.process-list li { display: flex; gap: 14px; align-items: flex-start; }
.pn {
  font-family: 'Anton', 'Archivo Black', Impact, sans-serif;
  color: var(--red);
  font-size: 13px;
  border: 1px solid var(--red);
  border-radius: 50%;
  width: 30px; height: 30px;
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.process-list strong { display: block; color: #fff; font-size: 12px; letter-spacing: 0.05em; margin-bottom: 4px; }
.process-list span { color: var(--text-dim); font-size: 12px; line-height: 1.55; }

.quote-block {
  background: linear-gradient(160deg, var(--red), var(--red-deep));
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.quote-mark {
  font-family: 'Anton', 'Archivo Black', Impact, sans-serif;
  font-size: 64px;
  line-height: 1;
  color: rgba(255,255,255,0.55);
  margin-bottom: 6px;
}
.quote-text {
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.45;
  font-weight: 600;
  margin: 0 0 14px;
}
.signature { font-family: 'Caveat', cursive; font-size: 30px; margin: 0 0 34px; }
.quote-cta {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.9);
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
}

/* CONTACT FOOTER */
.contact-footer {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1fr;
  gap: 30px;
  align-items: center;
  padding: 70px clamp(20px, 4vw, 52px) 60px;
  border-top: 1px solid var(--line);
}
.footer-left h3 {
  font-family: 'Anton', 'Archivo Black', Impact, sans-serif;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.05;
  color: #fff;
  margin: 0 0 16px;
}
.footer-left p {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.6;
  max-width: 36ch;
  margin: 0 0 22px;
}
.tag-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--red);
  border: 1px solid var(--red);
  padding: 11px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  transition: background 0.2s ease, color 0.2s ease;
}
.tag-cta:hover { background: var(--red); color: #fff; }

.footer-mid { display: flex; flex-direction: column; gap: 18px; }
.contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 12.5px;
  transition: color 0.2s ease;
}
.contact-row svg { color: var(--red); flex: 0 0 auto; }
a.contact-row:hover { color: #fff; }

.footer-right { display: flex; justify-content: center; }
.laptop { width: min(280px, 90%); }
.laptop-screen {
  background: #111;
  border: 6px solid #1c1c1c;
  border-radius: 12px 12px 4px 4px;
  padding: 26px 16px 16px;
  aspect-ratio: 16/10.5;
  position: relative;
  overflow: hidden;
}
.laptop-screen::before {
  content: '';
  position: absolute;
  top: 10px; left: 14px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #3a3a3a;
  box-shadow: 12px 0 0 #3a3a3a, 24px 0 0 #3a3a3a;
}
.laptop-line {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: 13px;
  line-height: 1.35;
  color: #fff;
}
.laptop-line.l2 { color: var(--red); margin-bottom: 12px; }
.laptop-block {
  margin-top: 10px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--red), var(--red-deep));
}
.laptop-base {
  height: 10px;
  background: #1c1c1c;
  border-radius: 0 0 14px 14px;
  position: relative;
}
.laptop-base::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 56px;
  height: 4px;
  background: var(--bg);
  border-radius: 0 0 4px 4px;
}

/* Scroll-triggered reveal */
.reveal-init { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(.22,.9,.32,1), transform 0.7s cubic-bezier(.22,.9,.32,1); }
.reveal-in { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 980px) {
  .hero {
    display: block;
    position: relative;
    height: auto;
    min-height: unset;
    padding: 16px 20px 28px;
    text-align: center;
    overflow: hidden;
  }
  /* Text and photo overlap like the desktop hero: text sits behind, photo layers on top,
     with the text peeking out above AND below the photo (~1.2x its height). */
  .hero-bg-text {
    position: absolute;
    top: 0;
    left: 50%;
    grid-row: auto;
    grid-column: auto;
    transform: translateX(-50%);
    width: 185vw;
    max-width: none;
    height: auto;
    margin: 0;
    z-index: 0;
  }
  .hero-photo {
    position: absolute;
    top: clamp(38px, 11vw, 60px);
    left: 50%;
    grid-row: auto;
    grid-column: auto;
    transform: translateX(-50%);
    width: min(280px, 74vw);
    height: auto;
    margin: 0;
    z-index: 1;
  }
  .hero-photo img { height: auto; aspect-ratio: 3/4; object-position: center 18%; }
  .hero-left {
    position: relative;
    z-index: 2;
    grid-row: auto;
    grid-column: auto;
    margin-top: clamp(430px, 124vw, 500px);
    text-align: center;
  }
  .hero-right {
    position: relative;
    z-index: 2;
    grid-row: auto;
    grid-column: auto;
    text-align: center;
    align-items: center;
    margin-top: 22px;
  }
  .stat-block, .hero-tagline { text-align: center; }
  .stat-block { border-right: none; border-top: 2px solid var(--red); padding-right: 0; padding-top: 14px; }
  .stat-tags { align-items: center; }
  .hero-tagline { justify-content: center; }
  .hero-location { justify-content: center; }
  .hero-bio { margin-left: auto; margin-right: auto; }

  .slide { width: min(340px, 78vw); }
  .slider-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "track track"
      "prev next";
    row-gap: 18px;
  }
  .slider-track { grid-area: track; }
  .slider-arrow.prev { grid-area: prev; justify-self: start; }
  .slider-arrow.next { grid-area: next; justify-self: end; }
  .slider-dots { display: flex; }

  .triptych { grid-template-columns: 1fr; }
  .edu-skills, .process { border-right: none; border-bottom: 1px solid var(--line); }
  .contact-footer { grid-template-columns: 1fr; text-align: center; }
  .footer-left p { margin-left: auto; margin-right: auto; }
  .contact-row { justify-content: center; }
}

@media (max-width: 480px) {
  .topbar { padding: 12px 16px; }
  .topbar-left { gap: 1px; }
  .topbar-left span { font-size: 9px; }
  .topbar-right { gap: 6px; }
  .topbar-right > span:not(.spark) { display: none; }
  .topbar-right .spark { display: none; }
}
