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

:root {
  --bg: #050505;
  --bg-elevated: rgba(18, 18, 18, 0.72);
  --text: #f4f4f4;
  --text-dim: rgba(255, 255, 255, 0.55);
  --accent: #ff5c1a;
  --accent-hot: #ff2d2d;
  --accent-glow: rgba(255, 92, 26, 0.45);
  --glass: rgba(22, 22, 22, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
  --radius-pill: 999px;
  --radius-card: 22px;
  --font-display: "Orbitron", system-ui, sans-serif;
  --font-ui: "Science Gothic", system-ui, sans-serif;
  --safe-bottom: max(1.25rem, env(safe-area-inset-bottom));
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
}

body.mode-panel .hero-title,
body.mode-panel .hero-character,
body.mode-panel .recognition,
body.mode-panel .project-card {
  opacity: 0.35;
  filter: blur(2px);
  pointer-events: none;
  transition: opacity 0.45s ease, filter 0.45s ease;
}

body:not(.mode-panel) .panel {
  display: none !important;
}

.panel {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 8rem;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(255, 60, 20, 0.08), transparent 70%);
  animation: panel-in 0.5s ease;
}

.panel h2 {
  margin: 0 0 2rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ambient {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.85;
}

.ambient--tl {
  width: min(62vw, 580px);
  height: min(62vw, 580px);
  top: -14%;
  left: -10%;
  background: radial-gradient(circle, rgba(255, 95, 35, 0.62) 0%, rgba(255, 40, 20, 0.22) 42%, transparent 72%);
}

.ambient--tr {
  width: min(40vw, 380px);
  height: min(40vw, 380px);
  top: 5%;
  right: -5%;
  background: radial-gradient(circle, rgba(255, 50, 30, 0.35) 0%, transparent 65%);
  opacity: 0.5;
}

.ambient--bl {
  width: min(78vw, 720px);
  height: min(55vw, 520px);
  bottom: -18%;
  left: -18%;
  background: radial-gradient(circle, rgba(255, 75, 28, 0.58) 0%, rgba(200, 35, 12, 0.25) 38%, transparent 70%);
}

.ambient--br {
  width: min(55vw, 500px);
  height: min(45vw, 420px);
  bottom: -10%;
  right: -12%;
  background: radial-gradient(circle, rgba(255, 45, 15, 0.45) 0%, transparent 70%);
}

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

.bokeh {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.bokeh span {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 80, 30, 0.35);
  filter: blur(1px);
}

.bokeh span:nth-child(1) {
  width: 6px;
  height: 6px;
  top: 18%;
  left: 22%;
  opacity: 0.5;
}

.bokeh span:nth-child(2) {
  width: 4px;
  height: 4px;
  top: 28%;
  left: 8%;
  opacity: 0.35;
}

.bokeh span:nth-child(3) {
  width: 8px;
  height: 8px;
  bottom: 32%;
  left: 12%;
  background: rgba(255, 50, 20, 0.45);
}

.bokeh span:nth-child(4) {
  width: 5px;
  height: 5px;
  top: 12%;
  right: 18%;
  opacity: 0.25;
}

.bokeh span:nth-child(5) {
  width: 7px;
  height: 7px;
  bottom: 22%;
  right: 28%;
  opacity: 0.4;
}

.bokeh span:nth-child(6) {
  width: 10px;
  height: 10px;
  bottom: 8%;
  right: 8%;
  filter: blur(2px);
  opacity: 0.55;
}

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: calc(max(1.35rem, env(safe-area-inset-top)) + 0.15rem) clamp(1.5rem, 5vw, 3.25rem) 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1;
  color: var(--text-dim);
  pointer-events: none;
}

.top-bar>* {
  pointer-events: auto;
}

.location {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 1.25rem;
}

.status-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 10px rgba(61, 220, 132, 0.6);
}

.est {
  margin: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: inherit;
  font-weight: 500;
  line-height: 1;
  min-height: 1.25rem;
  display: flex;
  align-items: center;
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  z-index: 2;
}

.hero-title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
}

.hero-title__word {
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: 1;
  width: max-content;
  max-width: 96vw;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.25rem, min(10.5vw, 13.5vh), 12.5rem);
  font-stretch: normal;
  font-synthesis: none;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.hero-character {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 2;
  width: clamp(380px, 58vw, 860px);
  height: min(90vh, 1180px);
  transform: translateX(-50%);
  line-height: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  pointer-events: none;
}

.hero-character img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  display: block;
  filter: drop-shadow(0 0 80px rgba(255, 50, 20, 0.25));
  -webkit-mask-image:
    linear-gradient(to bottom, #000 0%, #000 42%, rgba(0, 0, 0, 0.92) 58%, transparent 88%),
    linear-gradient(to right, transparent 0%, #000 9%, #000 91%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, #000 0%, #000 42%, rgba(0, 0, 0, 0.92) 58%, transparent 88%),
    linear-gradient(to right, transparent 0%, #000 9%, #000 91%, transparent 100%);
  mask-composite: intersect;
}

.recognition {
  position: fixed;
  left: clamp(1.25rem, 4vw, 2.75rem);
  top: 50%;
  transform: translateY(-35%);
  z-index: 25;
  max-width: 140px;
}

.recognition__label {
  margin: 0 0 1rem;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
}

.recognition__badges {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.badge {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 0.75rem;
  border-radius: 8px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: 1px solid var(--glass-border);
  background: linear-gradient(145deg, rgba(40, 40, 40, 0.9), rgba(12, 12, 12, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.badge--ultra {
  background: linear-gradient(145deg, #1a1a1a, #0a0a0a);
}

.badge--apex {
  opacity: 0.85;
}

.badge--edge {
  opacity: 0.7;
  font-size: 0.55rem;
}

.cta-talk {
  position: fixed;
  left: clamp(1.25rem, 4vw, 2.5rem);
  bottom: calc(var(--safe-bottom) + 4.5rem);
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1.1rem 0.55rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.25s, transform 0.25s;
}

.cta-talk:hover {
  background: rgba(35, 35, 35, 0.85);
  transform: translateY(-2px);
}

.cta-talk__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-hot));
  color: #0a0a0a;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.project-card {
  position: fixed;
  right: clamp(1rem, 3vw, 2.5rem);
  bottom: calc(var(--safe-bottom) + 4.5rem);
  z-index: 40;
  width: min(280px, 42vw);
  padding: 1rem;
  border-radius: var(--radius-card);
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.project-card__header {
  margin-bottom: 0.75rem;
}

.project-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
}

.project-card__subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.6875rem;
  color: var(--text-dim);
}

.project-card__media {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #111;
}

.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: transform 0.5s ease, opacity 0.35s ease;
}

.project-card__view {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 0.45rem 1.25rem;
  border: none;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
}

.project-card__media:hover .project-card__view {
  opacity: 1;
}

.project-card__media:hover img {
  transform: scale(1.05);
}

.project-card__nav {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.project-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s;
}

.project-nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.dock {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 0.75rem);
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.35rem;
  border-radius: var(--radius-pill);
  background: var(--glass);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.dock__link {
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.dock__link:hover {
  color: var(--text);
}

.dock__link.is-active {
  background: #fff;
  color: #0a0a0a;
}

.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 480px;
  width: 100%;
}

.service-list li {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--glass-border);
  font-size: 1.05rem;
}

.service-list li span {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  max-width: 900px;
  width: 100%;
}

.work-tile {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--glass);
}

.work-tile img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.work-tile p {
  margin: 0;
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
}

.about-copy,
.contact-copy {
  max-width: 520px;
  text-align: center;
  line-height: 1.65;
  color: var(--text-dim);
  font-size: 1.05rem;
}

.contact-mail {
  margin-top: 1.5rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
}

.contact-mail:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .recognition {
    display: none;
  }

  .hero-character {
    width: min(94vw, 560px);
    height: min(86vh, 820px);
  }

  .hero-character img {
    object-fit: contain;
    object-position: center bottom;
    -webkit-mask-image:
      linear-gradient(to bottom, #000 0%, #000 38%, transparent 86%),
      linear-gradient(to right, transparent 0%, #000 7%, #000 93%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(to bottom, #000 0%, #000 38%, transparent 86%),
      linear-gradient(to right, transparent 0%, #000 7%, #000 93%, transparent 100%);
    mask-composite: intersect;
  }

  .hero-title__word {
    font-size: clamp(2.75rem, min(14vw, 11vh), 5.25rem);
    letter-spacing: 0.04em;
  }

  .project-card {
    width: min(240px, 52vw);
    padding: 0.75rem;
  }

  .cta-talk span:last-child {
    display: none;
  }

  .dock {
    max-width: calc(100vw - 1.5rem);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .dock__link {
    padding: 0.5rem 0.85rem;
    font-size: 0.75rem;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .hero-character {
    width: 100vw;
    height: min(82vh, 700px);
  }

  .hero-character img {
    object-fit: contain;
    object-position: center bottom;
  }

  .hero-title__word {
    font-size: clamp(2.25rem, min(13vw, 10vh), 3.75rem);
    top: 44%;
  }

  .project-card {
    right: 0.75rem;
    bottom: calc(var(--safe-bottom) + 5.25rem);
  }

  .cta-talk {
    bottom: calc(var(--safe-bottom) + 5.25rem);
  }
}

@media (min-width: 1200px) {
  .hero-character {
    width: clamp(600px, 50vw, 900px);
    height: min(92vh, 1240px);
  }

  .hero-character img {
    object-fit: contain;
    object-position: center bottom;
  }
}