/* ===================== TOKENS ===================== */
:root {
  --bg: #0d0d10;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-bright: rgba(255, 255, 255, 0.16);
  --text: #f6f6f4;
  --text-dim: #9d9da5;
  --accent-1: #e8677a;
  --accent-2: #57c2b3;
  --accent-3: #e8c07a;
  --display: 'Sora', sans-serif;
  --body: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===================== AMBIENT BACKGROUND ===================== */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.28;
  will-change: transform;
}

.blob-1 {
  width: 480px;
  height: 480px;
  top: -10%;
  left: -8%;
  background: radial-gradient(circle, var(--accent-1), transparent 70%);
  animation: drift1 22s ease-in-out infinite;
}

.blob-2 {
  width: 420px;
  height: 420px;
  bottom: -12%;
  right: -6%;
  background: radial-gradient(circle, var(--accent-2), transparent 70%);
  animation: drift2 26s ease-in-out infinite;
}

.blob-3 {
  width: 360px;
  height: 360px;
  top: 40%;
  left: 60%;
  background: radial-gradient(circle, var(--accent-3), transparent 70%);
  opacity: 0.18;
  animation: drift3 30s ease-in-out infinite;
}

@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.1); }
}

@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, -30px) scale(1.08); }
}

@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 50px) scale(0.95); }
}

/* ===================== LAYOUT ===================== */
.container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

/* ===================== AVATAR ===================== */
.avatar-halo {
  position: relative;
  width: 132px;
  height: 132px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
  perspective: 600px;
}

.avatar-halo.visible {
  transform: scale(1);
}

.avatar-halo.tilt-ready {
  transition: transform 0.15s ease-out, opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.avatar-halo.visible {
  opacity: 1;
  transform: scale(1);
}

.halo-ring {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent-1), var(--accent-2), var(--accent-3), var(--accent-1));
  filter: blur(18px);
  animation: rotate-halo 7s ease-in-out infinite;
}

@keyframes rotate-halo {
  0%   { transform: rotate(0deg) scale(1);    opacity: 0.5;  }
  50%  { transform: rotate(180deg) scale(1.1); opacity: 0.72; }
  100% { transform: rotate(360deg) scale(1);   opacity: 0.5;  }
}

.avatar {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--surface);
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* ===================== NAME ===================== */
.name {
  font-family: var(--display);
  font-size: clamp(2.3rem, 6.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
  min-height: 1.2em;
  background: linear-gradient(110deg, var(--text) 20%, var(--accent-1) 40%, var(--accent-3) 50%, var(--accent-2) 60%, var(--text) 80%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -50% 0; }
}

.name .cursor {
  display: inline-block;
  width: 3px;
  background: var(--accent-1);
  margin-left: 3px;
  animation: blink 1s step-end infinite;
}

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

/* ===================== BIO ===================== */
.bio {
  max-width: 440px;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-dim);
  margin-bottom: 36px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.bio.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================== BUTTONS ===================== */
.buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.buttons.visible {
  opacity: 1;
  transform: translateY(0);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 100px;
  font-size: 0.98rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, background 0.35s ease, border-color 0.35s ease;
}

.btn-icon {
  width: 17px;
  height: 17px;
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  color: #1a1410;
  font-weight: 600;
  box-shadow: 0 8px 28px rgba(217, 131, 106, 0.25);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(217, 131, 106, 0.4);
}

.btn-primary:active {
  transform: translateY(-1px) scale(0.97);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-bright);
  transform: translateY(-3px);
}

.btn-secondary:active {
  transform: translateY(-1px) scale(0.97);
  background: var(--surface-hover);
}

/* ===================== FAQ ===================== */
.faq {
  width: 100%;
  max-width: 640px;
  padding: 70px 20px 120px;
}

.faq-title {
  text-align: center;
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 40px;
  background: linear-gradient(120deg, var(--text), var(--accent-1));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease, border-color 0.3s ease, background 0.3s ease;
}

.faq-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.faq-item:hover {
  background: var(--surface-hover);
  border-color: var(--border-bright);
  transform: translateY(-3px);
}

.faq-item.open {
  transform: rotate(-0.35deg) translateY(-2px);
  border-color: var(--border-bright);
}

.faq-item.pulse {
  animation: faq-pulse 0.32s ease;
}

@keyframes faq-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(0.965) rotate(-0.35deg); }
  100% { transform: scale(1) rotate(-0.35deg); }
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.03rem;
  -webkit-tap-highlight-color: transparent;
}

.faq-question:active {
  background: var(--surface-hover);
}

.faq-icon {
  position: relative;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--accent-1);
  transform: translate(-50%, -50%);
  transition: transform 0.35s ease;
}

.faq-icon::before { width: 12px; height: 2px; }
.faq-icon::after { width: 2px; height: 12px; }

.faq-item.open .faq-icon::after { transform: translate(-50%, -50%) rotate(90deg) scaleY(0); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s ease;
}

.faq-item.open .faq-answer { max-height: 260px; }

.faq-answer-inner {
  padding: 0 22px 22px;
  color: var(--text-dim);
  line-height: 1.6;
  font-size: 0.98rem;
}

.faq-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 11px 24px;
  border-radius: 100px;
  background: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  color: #1a1410;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.faq-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(217, 131, 106, 0.35);
}

.faq-cta svg {
  width: 15px;
  height: 15px;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .avatar-halo { width: 108px; height: 108px; }
  .name { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .bio { font-size: 0.98rem; max-width: 92%; }
  .faq { padding: 56px 16px 90px; }
  .blob { filter: blur(50px); opacity: 0.2; }
  .blob-3 { display: none; }
  .scroll-cue { margin-top: 36px; }
}

@media (max-width: 420px) {
  .buttons { flex-direction: column; width: 100%; max-width: 280px; }
  .btn { width: 100%; justify-content: center; }
}

/* ===================== SCROLL PROGRESS ===================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-3), var(--accent-2));
  z-index: 50;
  transition: width 0.1s ease-out;
}

/* ===================== SCROLL CUE ===================== */
.scroll-cue {
  margin-top: 56px;
  color: var(--text-dim);
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
  animation: bounce-cue 2.2s ease-in-out infinite;
}

.scroll-cue.visible {
  opacity: 0.55;
}

.scroll-cue:hover {
  color: var(--accent-1);
  opacity: 1 !important;
}

.scroll-cue svg {
  width: 20px;
  height: 20px;
}

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

/* ===================== SITE FOOTER / UPTIME ===================== */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px 56px;
  font-size: 0.82rem;
  color: var(--text-dim);
  letter-spacing: 0.01em;
}

.footer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 8px var(--accent-2);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ===================== FILM GRAIN ===================== */
.grain {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 120px 120px;
}

/* ===================== PROJECTS ===================== */
.projects {
  width: 100%;
  max-width: 640px;
  padding: 70px 20px 20px;
}

.projects-title {
  text-align: center;
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 32px;
  background: linear-gradient(120deg, var(--text), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  text-decoration: none;
  color: var(--text);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease,
              border-color 0.3s ease, background 0.3s ease;
}

.project-card.visible {
  opacity: 1;
  transform: translateY(0);
}

a.project-card:hover {
  background: var(--surface-hover);
  border-color: var(--accent-2);
  transform: translateY(-3px);
}

.project-info h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.project-info p {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.project-arrow {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--accent-2);
  transition: transform 0.3s ease;
}

a.project-card:hover .project-arrow {
  transform: translate(2px, -2px);
}

.projects-more {
  text-align: center;
  margin-top: 22px;
  font-size: 0.88rem;
  color: var(--text-dim);
  opacity: 0;
  transition: opacity 0.7s ease;
}

.projects-more.visible {
  opacity: 1;
}

@media (max-width: 768px) {
  .projects { padding: 56px 16px 10px; }
  .project-card { padding: 18px 20px; }
}
