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

:root {
  --content-width: 960px;
  --section-padding: 48px;
}

body {
  font-family: 'Questrial', sans-serif;
  color: #393939;
}

/* ── Layout ───────────────────────────────────────────── */

.layout {
  display: flex;
  flex-direction: column;
}

.section-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 124px 0;
  text-align: center;
  width: 100%;
}

/* ── Hero ─────────────────────────────────────────────── */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: #ffffff;
  padding: 80px var(--section-padding);
  position: relative;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 auto;
  max-width: var(--content-width);
  width: 100%;
}

.hero-video {
  width: 620px;
  height: 620px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
}

.hero-video video {
  width: 100%;
  height: calc(100% + 6px);
  margin-top: -6px;
  object-fit: cover;
  display: block;
}

.hero-content {
  max-width: 340px;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-content h1 {
  font-family: 'Questrial', sans-serif;
  font-size: 36px;
  line-height: 1.2;
  font-weight: 400;
  color: #393939;
  letter-spacing: 2px;
  margin-bottom: 10px;
  white-space: nowrap;
}

.cursor {
  color: rgba(0, 0, 0, 0.3);
  animation: blink 0.7s step-end infinite;
  margin-left: 1px;
}

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

.hero-title {
  margin-bottom: 20px;
}

.hero-title s {
  display: block;
  font-size: 16px;
  color: rgba(0,0,0,0.3);
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.hero-ai {
  display: block;
  font-size: 16px;
  color: #f05b4c;
  letter-spacing: 1px;
}

.hero-bio {
  font-family: 'Raleway', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: rgba(0,0,0,0.5);
  line-height: 1.7;
  margin-bottom: 24px;
}

.hero-links-icons {
  display: flex;
  gap: 10px;
}

.hero-icon-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.2s;
}

.hero-icon-link:hover { background: rgba(0,0,0,0.12); }

.hero-icon-link img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  opacity: 0.5;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  width: 28px;
  height: 28px;
  border-right: 3px solid rgba(160, 30, 30, 0.35);
  border-bottom: 3px solid rgba(160, 30, 30, 0.35);
  transform: translateX(-50%) rotate(45deg);
  animation: bounce 1.8s ease-in-out infinite;
}

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

/* ── Portfolio ────────────────────────────────────────── */

.portfolio {
  background-color: #f05b4c;
  padding: 0 var(--section-padding);
}

.portfolio h2 {
  font-size: 48px;
  letter-spacing: 4px;
  color: #ffffff;
  margin-bottom: 48px;
}

/* ── Projects ─────────────────────────────────────────── */
.nv5-list { display: flex; flex-direction: column; gap: 12px; max-width: 640px; margin: 0 auto; }
.nv5-item { display: flex; align-items: center; gap: 28px; padding: 32px 28px; text-decoration: none; border-radius: 10px; background: rgba(255,255,255,0.12); transition: background 0.2s; }
.nv5-item:hover { background: rgba(255,255,255,0.2); }
.nv5-num { font-family: 'Raleway', sans-serif; font-size: 11px; letter-spacing: 3px; color: rgba(255,255,255,0.8); width: 24px; flex-shrink: 0; }
.nv5-logo { width: 44px; height: 44px; flex-shrink: 0; opacity: 0.85; }
.nv5-logo img { width: 100%; height: 100%; object-fit: contain; }
.nv5-text { flex: 1; text-align: left; }
.nv5-title { font-size: 26px; color: #fff; margin-bottom: 4px; }
.nv5-desc { font-family: 'Raleway', sans-serif; font-size: 13px; font-weight: 300; color: rgba(255,255,255,0.75); }
.nv5-ext { font-family: 'Raleway', sans-serif; font-size: 11px; letter-spacing: 2px; color: rgba(255,255,255,0.55); flex-shrink: 0; }


/* ── Footer ───────────────────────────────────────────── */

.footer {
  background-color: #393939;
  height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.footer h2 {
  font-size: 48px;
  color: #ffffff;
  margin-bottom: 24px;
}

.footer-links {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.footer-link {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-link:hover {
  opacity: 0.75;
}

.footer-link img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* ── Cursor trail ─────────────────────────────────────── */

.cursor-trail {
  position: fixed;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f05b4c;
  pointer-events: none;
  z-index: 9999;
  top: -3px;
  left: -3px;
  will-change: transform, opacity;
}

/* ── Scroll fade ──────────────────────────────────────── */

.scroll-fade {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.scroll-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ───────────────────────────────────────── */

/* Tablet landscape: scale video down */
@media (max-width: 1080px) {
  .hero-video {
    width: 460px;
    height: 460px;
  }
}

/* Tablet portrait: stack layout */
@media (max-width: 860px) {
  :root {
    --content-width: 600px;
    --section-padding: 40px;
  }

  .hero {
    padding: 80px var(--section-padding) 100px;
    justify-content: center;
  }

  .hero-inner {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  .hero-video {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .hero-video video {
    height: 100%;
    margin-top: 0;
  }

  .hero-content {
    max-width: 100%;
    width: 100%;
  }

  .section-content {
    padding: 80px 0;
  }
}

/* Mobile */
@media (max-width: 600px) {
  :root {
    --section-padding: 24px;
  }

  .hero {
    padding: 64px var(--section-padding) 88px;
  }

  .hero-content h1 {
    font-size: 28px;
    white-space: normal;
  }

  .section-content {
    padding: 64px 0;
  }

  .portfolio h2 {
    font-size: 36px;
    margin-bottom: 32px;
  }

  .nv5-item {
    padding: 20px 16px;
    gap: 16px;
  }

  .nv5-title {
    font-size: 20px;
  }

  .nv5-ext {
    display: none;
  }

  .footer {
    height: auto;
    padding: 48px 24px;
  }

  .footer h2 {
    font-size: 36px;
  }
}