:root {
  --bg: #000000;
  --accent: #ff2b2b;
  --text: #f4f4f4;
  --muted: #9a9a9a;
  --stroke: #1d1d1d;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --photo: clamp(148px, 34vw, 280px);
  --btn: clamp(48px, 7.4vw, 62px);
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Outfit, system-ui, sans-serif;
}

body {
  min-height: 100dvh;
  cursor: none;
  overflow-x: hidden;
}

@media (pointer: coarse) {
  body { cursor: auto; }
  .cursor { display: none !important; }
  .btn { cursor: pointer; }
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#grid {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 38%, rgba(0,0,0,.78) 100%),
    radial-gradient(circle at 16% 10%, rgba(255,43,43,.1), transparent 28%),
    radial-gradient(circle at 84% 90%, rgba(255,43,43,.08), transparent 32%);
}

.cursor {
  position: fixed;
  width: 18px;
  height: 18px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 50;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  transition: width .18s ease, height .18s ease, background .18s ease;
}

.cursor.hot {
  width: 42px;
  height: 42px;
  background: rgba(255, 43, 43, 0.12);
}

.stage {
  position: relative;
  z-index: 3;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(28px + var(--safe-top)) 20px calc(28px + var(--safe-bottom));
  gap: clamp(18px, 3.4vh, 32px);
}

.intro {
  text-align: center;
  max-width: 90vw;
}

h1 {
  font-family: Syne, sans-serif;
  font-size: clamp(28px, 6.4vw, 56px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.role {
  margin-top: 10px;
  color: var(--accent);
  font-size: clamp(13px, 2.4vw, 16px);
  letter-spacing: 0.04em;
  font-weight: 400;
}

.portrait-wrap {
  position: relative;
  width: var(--photo);
  height: var(--photo);
  flex: 0 0 auto;
  border-radius: 50%;
}

.portrait {
  width: var(--photo);
  height: var(--photo);
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  display: block;
  position: relative;
  z-index: 2;
  border: 2px solid var(--accent);
  box-shadow:
    0 0 0 8px rgba(255, 43, 43, 0.08),
    0 0 42px rgba(255, 43, 43, 0.28);
  background: #050505;
  image-rendering: auto;
}

.ring,
.ring.delay {
  position: absolute;
  inset: -14px;
  border: 1px solid rgba(255, 43, 43, 0.28);
  border-radius: 50%;
  animation: pulse 3.4s ease-out infinite;
}

.ring.delay { animation-delay: 1.1s; }

@keyframes pulse {
  0% { transform: scale(.92); opacity: .55; }
  100% { transform: scale(1.18); opacity: 0; }
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(8px, 1.4vw, 12px);
  width: min(640px, 100%);
}

.btn {
  width: var(--btn);
  height: var(--btn);
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  background: #0a0a0a;
  border: 1px solid var(--stroke);
  color: var(--accent);
  text-decoration: none;
  border-radius: 16px;
  cursor: none;
  font: inherit;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn svg {
  width: 46%;
  height: 46%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn:hover,
.btn:focus-visible {
  border-color: var(--accent);
  background: #160909;
  box-shadow: 0 0 0 1px rgba(255,43,43,.18), 0 8px 24px rgba(255,43,43,.08);
  transform: translateY(-2px);
  outline: none;
}

.mail-out {
  min-height: 1.2em;
  font-size: clamp(13px, 2.2vw, 15px);
  letter-spacing: 0.02em;
}

.mail-out a {
  color: var(--accent);
  text-decoration: none;
}

.mail-out a:hover,
.mail-out a:focus-visible {
  text-decoration: underline;
  outline: none;
}

.mail-out[hidden] {
  visibility: hidden;
}

.stage > * {
  opacity: 0;
  transform: translateY(10px);
  animation: rise .7s ease forwards;
}

.intro { animation-delay: .05s; }
.portrait-wrap { animation-delay: .16s; }
.links { animation-delay: .28s; }
.mail-out { animation-delay: .36s; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

@media (max-width: 480px) {
  .links {
    max-width: 320px;
  }
  .btn {
    border-radius: 14px;
  }
}

@media (max-height: 640px) {
  .stage {
    gap: 14px;
  }
  :root {
    --photo: clamp(120px, 24vh, 168px);
    --btn: 48px;
  }
}

@media (min-width: 1100px) {
  :root {
    --photo: 280px;
    --btn: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .stage > * { opacity: 1; transform: none; }
  body { cursor: auto; }
  .cursor { display: none; }
}
