/* mazemaze personal hub · style.css
   Mobile-first, industrial minimal, dark mode only */

/* TOKENS */
:root {
  --bg:      #0d0d0d;
  --surface: #1d1d1d;
  --surface-strong: #242424;
  --text:    #f5f5f5;
  --muted:   #a7a7a7;
  --soft:    #d3d3d3;
  --border:  #3a3a3a;
  --accent-hover: #888;
  --accent-border: #444;

  --font-mono:    'Space Mono', ui-monospace, monospace;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Noto Sans TC', system-ui, sans-serif;

  --max-w:       480px;
  --px:          1rem;
  --card-radius: 4px;
  --t-fast:      160ms ease;
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 2px;
}

/* LAYOUT */
.hub {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 2.5rem var(--px) 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

/* PROFILE HEADER */
.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  padding-bottom: 1.5rem;
}

.profile__avatar-wrap {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.profile__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile__name {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
}

.profile__tagline {
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 34ch;
  line-height: 1.55;
}

.profile__socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  transition: color var(--t-fast), border-color var(--t-fast);
}

.social-icon:hover {
  color: var(--text);
  border-color: #555;
}

/* SECTION DIVIDER */
.section-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-block: 0.5rem;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.section-divider span {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
}

/* IDENTITY CARD */
.identity-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent, #555);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: 0 12px 30px rgb(0 0 0 / 0.18);
  transition: transform var(--t-fast), border-color var(--t-fast), border-left-color var(--t-fast);
}

.identity-card:hover {
  transform: translateX(4px);
  border-color: #4a4a4a;
  border-left-color: var(--accent-hover);
}

.identity-card--nsr {
  --accent: #d0021b;
  --accent-hover: #de4e5f;
  --accent-border: #7e212f;
}

.identity-card--bext {
  --accent: #00aeef;
  --accent-hover: #4dc6f4;
  --accent-border: #207c9f;
}

.identity-card--kanade {
  --accent: #cccccc;
  --accent-hover: #dbdbdb;
  --accent-border: #7e7e7e;
}

.identity-card--carrot {
  --accent: #c9920a;
  --accent-hover: #d9b354;
  --accent-border: #7a6230;
}

.identity-card--maze-coder {
  --accent: #8f7aff;
  --accent-hover: #b3a7ff;
  --accent-border: #5d529f;
}

@supports (color: color-mix(in srgb, black, white)) {
  .identity-card {
    --accent-hover: color-mix(in srgb, var(--accent, #555) 70%, white 30%);
    --accent-border: color-mix(in srgb, var(--accent, #555) 45%, var(--border));
  }
}

.identity-card__inner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
}

.identity-card__logo-wrap {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-strong);
  border: 1px solid var(--accent-border);
  border-radius: 2px;
  overflow: hidden;
}

.identity-card__logo-wrap--rounded {
  border-radius: 50%;
}

.identity-card__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.identity-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.identity-card__header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.identity-card__role {
  align-self: flex-start;
  color: var(--accent-hover);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.identity-card__name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--text);
  overflow-wrap: break-word;
}

.identity-card__desc {
  font-size: 0.875rem;
  color: var(--soft);
  line-height: 1.55;
}

.identity-card__facts {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.identity-card__fact {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr);
  gap: 0.5rem;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.identity-card__fact dt {
  color: #8f8f8f;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  white-space: nowrap;
}

.identity-card__fact dd {
  color: #c2c2c2;
}

.identity-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* LINK PILLS */
.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 2px;
  min-height: 2.25rem;
  transition: color var(--t-fast), border-color var(--t-fast);
}

.link-pill:hover {
  color: var(--text);
  border-color: #555;
}

/* SUB-BRANDS */
.sub-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem 0.65rem 1.25rem;
  border-top: 1px solid var(--border);
  border-left: 2px solid var(--sub-accent, #444);
  background: #141414;
  transition: transform var(--t-fast);
}

.sub-brand:hover {
  transform: translateX(3px);
}

.sub-brand--silent {
  --sub-accent: #8b0000;
}

.sub-brand--azure {
  --sub-accent: #00bcd4;
}

.sub-brand__logo-wrap {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.sub-brand__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sub-brand__body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.sub-brand__name {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1.1;
}

.sub-brand__desc {
  font-size: 0.75rem;
  color: var(--muted);
}

/* FOOTER */
.hub-footer {
  margin-top: 0.75rem;
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.hub-footer__copy {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* ANIMATION - fadeInUp */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  opacity: 1;
  transform: none;
}

.js .fade-in-up {
  opacity: 0;
  transform: translateY(8px);
}

.js .fade-in-up.is-visible {
  animation: fadeInUp 0.28s ease forwards;
}

.js .fade-in-up.is-visible:nth-child(2) { animation-delay: 0.02s; }
.js .fade-in-up.is-visible:nth-child(3) { animation-delay: 0.04s; }
.js .fade-in-up.is-visible:nth-child(4) { animation-delay: 0.06s; }
.js .fade-in-up.is-visible:nth-child(5) { animation-delay: 0.08s; }
.js .fade-in-up.is-visible:nth-child(6) { animation-delay: 0.10s; }
.js .fade-in-up.is-visible:nth-child(7) { animation-delay: 0.12s; }
.js .fade-in-up.is-visible:nth-child(8) { animation-delay: 0.14s; }

/* RESPONSIVE */
@media (min-width: 520px) {
  :root { --px: 1.5rem; }
  .hub { padding-top: 3.5rem; gap: 1rem; }
  .identity-card__name { font-size: 1.35rem; }
}

@media (max-width: 375px) {
  .hub { padding-inline: 0.75rem; }
  .identity-card__inner { gap: 0.75rem; padding: 0.875rem; }
  .identity-card__logo-wrap { width: 52px; height: 52px; }
}
