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

body {
  font-family: 'Source Code Pro', monospace;
  color: #333;
}

/* ── Hero ── */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero__video-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
}

/* Video fills the section as a background */
.hero__video-wrap video,
.hero__video-wrap iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 177.78vh; /* 16/9 * 100vh */
  height: 56.25vw; /* 9/16 * 100vw */
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  border: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
}

.hero__titles {
  position: relative;
  height: clamp(3rem, 7vw, 6rem);
}

.hero__title {
  position: absolute;
  left: 0;
  right: 0;
  font-family: 'Source Code Pro', monospace;
  font-size: clamp(1.2rem, 4vw, 5rem);
  font-weight: 400;
  color: #fff;
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-align: center;
  opacity: 0;
}

.hero__title::after {
  content: '|';
  animation: cursor-blink 0.7s step-end infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero__title--1 { animation: title-1 60s linear infinite; }
.hero__title--2 { animation: title-2 60s linear infinite; }
.hero__title--3 { animation: title-3 60s linear infinite; }
.hero__title--4 { animation: title-4 60s linear infinite; }
.hero__title--5 { animation: title-5 60s linear infinite; }

/* Each title occupies a 20% window (12s) of the 60s cycle */
@keyframes title-1 {
  0%    { opacity: 0; transform: translateY(-200px); }
  2.2%  { opacity: 1; transform: translateY(0); }
  15%   { opacity: 1; transform: translateY(0); }
  18%   { opacity: 0; transform: translateY(0); }
  100%  { opacity: 0; transform: translateY(0); }
}

@keyframes title-2 {
  0%    { opacity: 0; transform: translateY(0); }
  19.9% { opacity: 0; transform: translateY(-200px); }
  22.2% { opacity: 1; transform: translateY(0); }
  25%   { opacity: 0; transform: translateY(0); }
  27%   { opacity: 1; transform: translateY(0); }
  29%   { opacity: 0; transform: translateY(0); }
  31%   { opacity: 1; transform: translateY(0); }
  33%   { opacity: 0; transform: translateY(0); }
  35%   { opacity: 1; transform: translateY(0); }
  38%   { opacity: 0; transform: translateY(0); }
  100%  { opacity: 0; transform: translateY(0); }
}

@keyframes title-3 {
  0%    { opacity: 0; transform: translateY(0); }
  39.9% { opacity: 0; transform: translateY(-200px); }
  42.2% { opacity: 1; transform: translateY(0); }
  55%   { opacity: 1; transform: translateY(0); }
  58%   { opacity: 0; transform: translateY(0); }
  100%  { opacity: 0; transform: translateY(0); }
}

@keyframes title-4 {
  0%    { opacity: 0; transform: translateY(0); }
  59.9% { opacity: 0; transform: translateY(-200px); }
  62.2% { opacity: 1; transform: translateY(0); }
  75%   { opacity: 1; transform: translateY(0); }
  78%   { opacity: 0; transform: translateY(0); }
  100%  { opacity: 0; transform: translateY(0); }
}

@keyframes title-5 {
  0%    { opacity: 0; transform: translateY(0); }
  79.9% { opacity: 0; transform: translateY(-200px); }
  82.2% { opacity: 1; transform: translateY(0); }
  95%   { opacity: 1; transform: translateY(0); }
  98%   { opacity: 0; transform: translateY(0); }
  100%  { opacity: 0; transform: translateY(0); }
}

.hero__arrow {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  animation: bounce 1.5s ease-in-out infinite;
  cursor: pointer;
}

.hero__arrow svg { fill: #fff; }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ── Full-width image dividers ── */
.img-divider {
  height: 20vh;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

/* ── Tech Stack ── */
.tech {
  padding: 40px 20px 40px;
}

.tech__heading {
  color: #0418b3;
  font-size: 42px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 30px;
}

.tech__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.tech__tile {
  aspect-ratio: 1.618 / 1;
  padding: 1%;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tech__tile:hover {
  transform: scale(1.04);
  z-index: 1;
}

.tech__img-wrap {
  width: 100%;
  height: 100%;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

@media (max-width: 1200px) {
  .tech__tile { padding: 6%; }
}

@media (max-width: 960px) {
  .tech__grid { grid-template-columns: repeat(2, 1fr); }
  .tech { padding-bottom: 80px; }
}

/* ── Contact ── */
.contact {
  background-color: #111;
  border-top: 4px solid #0418b3;
  padding: 150px 20px;
  text-align: center;
}

.contact__title {
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 1rem;
}

.contact__email {
  color: #fff;
  font-size: 22px;
  text-decoration: none;
}

.contact__email:hover {
  text-decoration: underline;
}
