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

:root {
  --bg: #f5f5f5;
  --text: #111;
  --text-secondary: #888;
  --border: #ddd;
  --card-bg: #fff;
  --radius: 16px;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}

section[id] { scroll-margin-top: 88px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

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

/* ===== Background Patterns ===== */
.line-bg { position: relative; }
.line-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg, transparent, transparent 14px,
    rgba(0,0,0,0.03) 14px, rgba(0,0,0,0.03) 15px
  );
  pointer-events: none;
  z-index: 0;
}

.dot-bg { position: relative; }
.dot-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0, 0, 0, 0.18) 1px, transparent 1px);
  background-size: 18px 18px;
  pointer-events: none;
  z-index: 0;
}

.dot-bg-vignette::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg);
  mask-image: radial-gradient(ellipse at center, transparent 22%, black 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, transparent 22%, black 80%);
  pointer-events: none;
  z-index: 0;
}

/* ===== Navigation ===== */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  isolation: isolate;
  padding: 16px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(16px);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.site-nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.nav-logo {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.nav-logo:hover { opacity: 0.85; }

.nav-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
}

.nav-center {
  display: flex;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-pill {
  position: relative;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 100px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
}

.nav-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  width: 0;
  border-radius: 100px;
  background: var(--text);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.nav-pill a {
  position: relative;
  z-index: 1;
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.25s ease;
  color: var(--text-secondary);
  white-space: nowrap;
}

.nav-pill a:hover { color: var(--text); }

.nav-pill a.active { color: #fff; }

.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  justify-content: space-around;
  gap: 4px;
}

.mobile-nav a {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background 0.2s, color 0.2s;
}

.mobile-nav a.active {
  background: var(--text);
  color: #fff;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Language switcher */
.lang-switcher {
  position: relative;
}

.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--text);
  color: #fff;
  border: none;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.lang-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lang-chevron {
  transition: transform 0.25s ease;
}

.lang-switcher.open .lang-chevron {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 148px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 200;
}

.lang-switcher.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
}

.lang-option:hover,
.lang-option.active {
  background: var(--bg);
}

.lang-option.active {
  font-weight: 700;
}

/* ====================================================
   HERO - Flat circle follows mouse, reveals Chinese
   ==================================================== */
.hero-section,
#hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: clip;
  overflow-y: visible;
  background: var(--bg);
}

.hero-section { padding-top: 80px; }

.hero-tag {
  position: absolute;
  font-size: 13px;
  letter-spacing: 3px;
  color: rgba(0,0,0,0.1);
  font-weight: 500;
  z-index: 2;
  pointer-events: none;
}

.hero-stage {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transform-style: preserve-3d;
  will-change: transform;
  overflow: visible;
}

.hero-headline {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: min(98vw, 1120px);
  padding-inline: clamp(16px, 4vw, 40px);
  text-align: center;
  transform-style: preserve-3d;
  overflow: visible;
}

.hero-title-stack {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: visible;
  max-width: 100%;
}

.hero-title-stack > .hero-text-base,
.hero-title-stack > .hero-text-reveal,
.hero-title-stack > .hero-circle {
  grid-area: 1 / 1;
}

.hero-title-line {
  margin: 0;
  font-size: clamp(36px, 6.5vw, 88px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.08;
  white-space: nowrap;
  overflow: visible;
  padding-inline-end: 0.28em;
  box-sizing: content-box;
}

.hero-text-base .hero-title-line {
  color: var(--text);
}

.hero-text-reveal .hero-title-line {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.hero-text-base .hero-title-line em {
  font: inherit;
  font-style: normal;
  letter-spacing: inherit;
}

.hero-below {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 24px;
  text-align: center;
  pointer-events: none;
}

.hero-below .hero-subtitle {
  margin: 0;
  text-align: center;
}

.hero-below .hero-cta {
  margin-top: 28px;
}

.hero-text-base {
  position: relative;
  z-index: 1;
  width: max-content;
  max-width: 100%;
  overflow: visible;
  padding-inline: 0.12em 0.35em;
  pointer-events: none;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.hero-text-reveal {
  position: relative;
  z-index: 3;
  width: max-content;
  max-width: 100%;
  overflow: visible;
  padding-inline: 0.12em 0.35em;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.hero-text-reveal.is-revealing {
  visibility: visible;
  opacity: 1;
}

.hero-badge {
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  max-width: calc(100% - 40px);
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text);
  flex-shrink: 0;
}

.hero-below .hero-cta {
  pointer-events: auto;
}

.hero-below .hero-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  letter-spacing: 1px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: var(--text);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

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

.btn-secondary:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}


/* 实心黑球夹在英文底层与中文揭示层之间，与标题 mask 同坐标系 */
.hero-circle {
  position: absolute;
  width: var(--orb-size, 260px);
  height: var(--orb-size, 260px);
  margin: 0;
  border-radius: 50%;
  background: #111;
  z-index: 2;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  left: 50%;
  top: 50%;
  opacity: 0;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  will-change: transform, left, top, opacity;
}

.hero-circle-glow {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.1), transparent 70%);
  pointer-events: none;
}

.hero-section.sleeping .hero-badge-dot {
  background: #b0b0b0;
  animation: hero-dot-pulse 2.2s ease-in-out infinite;
}

.hero-section.awake .hero-badge-dot.is-live {
  background: #10b981;
  animation: none;
}

@keyframes hero-dot-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.82); }
  50% { opacity: 1; transform: scale(1); }
}

.hero-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: var(--text-secondary);
  z-index: 8;
  pointer-events: none;
}

/* ===== Shared Section Header ===== */
.section-header { margin-bottom: 60px; }

.section-header h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900;
}

.section-header-line {
  width: 60px;
  height: 4px;
  background: var(--text);
  border-radius: 2px;
  margin-top: 16px;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 500px;
}

.section-hint {
  font-size: 13px;
  color: #bbb;
  margin-top: 10px;
}

.section-eyebrow {
  display: block;
  font-family: "SF Mono", "Fira Code", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 12px;
}

.section-eyebrow-light { color: rgba(255, 255, 255, 0.45); }

/* ===== PRODUCTS Section ===== */
#products { padding: 100px 0; }

.products-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px;
  position: relative;
  z-index: 1;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Border beam (reference site) */
@keyframes beam-spin {
  to { offset-distance: 100%; }
}

.border-beam-card {
  position: relative;
  --beam-size: 120px;
  --beam-duration: 6s;
  --beam-delay: 0s;
}

.border-beam {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 12;
  border-radius: inherit;
  border: 1px solid transparent;
  -webkit-mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0) border-box;
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0) border-box;
  mask-composite: exclude;
}

.border-beam::after {
  content: '';
  position: absolute;
  width: var(--beam-size);
  aspect-ratio: 1;
  background: linear-gradient(to left, #111, transparent 50%);
  opacity: 0.55;
  animation: beam-spin var(--beam-duration) linear infinite;
  animation-delay: var(--beam-delay);
  offset-path: rect(0 auto auto 0 round var(--beam-size));
  offset-anchor: 90% 50%;
  offset-distance: 0%;
}

/* Flip cards — uniform size, hover to reveal intro */
.flip-card {
  height: 230px;
  perspective: 1000px;
  border-radius: var(--radius);
}

/* reveal 的 translateY 会破坏 preserve-3d，导致背面镜像 */
.flip-card.reveal {
  opacity: 0;
  transform: none;
  transition: opacity 0.6s ease;
}

.flip-card.reveal.visible {
  opacity: 1;
  transform: none;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}

.flip-card-front {
  background: var(--card-bg);
  transform: rotateY(0deg);
  z-index: 2;
}

.flip-card:hover .flip-card-front {
  border-color: transparent;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.flip-card-back {
  background: #111;
  border-color: rgba(255, 255, 255, 0.08);
  transform: rotateY(180deg);
  justify-content: space-between;
  z-index: 1;
}

.flip-card:hover .flip-card-back {
  border-color: transparent;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.25);
}

.flip-card-back p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
}

.flip-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  transition: gap 0.2s, opacity 0.2s;
}

.flip-card-link:hover {
  gap: 10px;
  opacity: 0.85;
}

.product-card-number {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 52px;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.05);
  line-height: 1;
  pointer-events: none;
}

.product-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.product-tags span {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  background: var(--text);
  color: #fff;
  border-radius: 100px;
}

.product-tag-accent {
  background: #fff;
  color: var(--text);
  border: 1.5px solid var(--text);
}

.product-card-icon {
  width: 44px;
  height: 44px;
  background: #222;
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.flip-card-front h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
  line-height: 1.3;
}

.flip-card-front .product-domain {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: "SF Mono", "Fira Code", monospace;
}

/* ===== PROJECTS Section ===== */
.projects-header-bar {
  background: #111;
  color: #fff;
  padding: 80px 48px 60px;
  text-align: center;
}

.projects-header-bar h2 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 900;
}

.projects-header-line {
  width: 60px;
  height: 4px;
  background: #fff;
  border-radius: 2px;
  margin: 16px auto 0;
}

.projects-header-desc {
  margin: 16px auto 0;
  max-width: 520px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.7;
}

#projects { padding: 0 0 100px; }

.projects-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 48px 0;
  position: relative;
  z-index: 1;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  margin-bottom: 20px;
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
  transform-style: preserve-3d;
  will-change: transform;
  cursor: default;
}

.project-card.border-beam-card {
  overflow: hidden;
  --beam-size: 140px;
  --beam-duration: 7s;
}

.flip-card.border-beam-card:nth-child(3n+1) { --beam-delay: 0s; }
.flip-card.border-beam-card:nth-child(3n+2) { --beam-delay: 1.2s; }
.flip-card.border-beam-card:nth-child(3n) { --beam-delay: 2.4s; }

.contact-item:nth-child(1) { --beam-delay: 0s; }
.contact-item:nth-child(2) { --beam-delay: 1.5s; }

.hero-section.sleeping {
  cursor: pointer;
}

.project-card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.project-index {
  font-family: "SF Mono", "Fira Code", ui-monospace, monospace;
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}

.project-year {
  font-family: "SF Mono", "Fira Code", ui-monospace, monospace;
  font-size: 13px;
  color: #bbb;
}

.project-card-divider {
  display: none;
}

.project-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-card h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 12px;
}

.project-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 0;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.project-tags span {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  background: #f5f5f5;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 100px;
}

@media (min-width: 768px) {
  .project-card {
    flex-direction: row;
    align-items: stretch;
    gap: 32px;
    padding: 40px 36px;
  }

  .project-card-meta {
    flex-direction: column;
    justify-content: flex-start;
    width: 88px;
    flex-shrink: 0;
  }

  .project-card-divider {
    display: block;
    width: 1px;
    align-self: stretch;
    background: var(--border);
    flex-shrink: 0;
  }
}

/* ===== CONTACT Section (reference layout) ===== */
.contact-section {
  position: relative;
  overflow: hidden;
  padding: 96px 0 72px;
  background: #fff;
}

.contact-bg-dot {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0, 0, 0, 0.18) 1px, transparent 1px);
  background-size: 18px 18px;
}

.contact-bg-mask {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: #fff;
  mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, transparent 0%, #000 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, transparent 0%, #000 70%);
}

.contact-bg-glow {
  pointer-events: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(640px, 90vw);
  height: min(640px, 90vw);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.07), transparent 70%);
  filter: blur(24px);
}

.contact-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.contact-headline {
  margin-top: 16px;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.contact-lead {
  margin: 20px auto 0;
  max-width: 36rem;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.65;
  color: var(--text-secondary);
}

.contact-cta-wrap {
  margin-top: 40px;
}

.contact-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  background: var(--text);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 48px -8px rgba(0, 0, 0, 0.5);
}

.contact-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  text-align: left;
}

.contact-item {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  --beam-size: 100px;
  --beam-duration: 5s;
}

.contact-item-body {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}

.contact-item-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f5f5f5;
  color: #444;
}

.contact-item-text {
  min-width: 0;
  flex: 1;
}

.contact-item-label {
  display: block;
  font-family: "SF Mono", "Fira Code", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 4px;
}

.contact-item-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.contact-item-value:hover {
  text-decoration: underline;
}

.contact-item-copy {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #888;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.contact-item-copy:hover {
  background: #f0f0f0;
  color: var(--text);
}

.toast {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: 12px 20px;
  background: var(--text);
  color: #fff;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 300;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--border);
  background: #fff;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 48px;
  text-align: center;
}

.footer-slogan {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.footer-links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text); }

footer p:last-child {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  html,
  body {
    overflow-x: hidden;
    max-width: 100%;
    overscroll-behavior-x: none;
  }

  body {
    padding-bottom: 72px;
    touch-action: pan-y;
    position: relative;
  }

  section,
  .hero-section,
  #hero,
  .dot-bg {
    max-width: 100%;
    overflow-x: hidden;
  }

  .site-nav {
    padding: 14px 16px;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }

  .nav-center { display: none; }
  .nav-logo span { display: none; }
  .mobile-nav { display: flex; }
  .lang-trigger { padding: 8px 14px; }
  .lang-menu { min-width: 0; max-width: calc(100vw - 32px); }
  .lang-current { max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .hero-section,
  #hero {
    overflow: hidden;
  }

  .hero-stage {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    padding-inline: 0;
  }

  .hero-headline {
    width: 100%;
    max-width: 100%;
    padding-inline: 16px;
    box-sizing: border-box;
    overflow: hidden;
  }

  .hero-title-stack,
  .hero-text-base,
  .hero-text-reveal {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding-inline: 0;
    box-sizing: border-box;
  }

  .hero-title-line {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: clamp(24px, 7vw, 40px);
    line-height: 1.12;
    padding-inline-end: 0;
    letter-spacing: -0.03em;
  }

  .hero-badge {
    top: 88px;
    font-size: 11px;
    padding: 6px 12px;
    max-width: calc(100vw - 24px);
    white-space: normal;
    line-height: 1.45;
    text-align: center;
  }

  .hero-tag {
    font-size: 11px;
    letter-spacing: 2px;
  }

  .hero-below {
    width: 100%;
    max-width: 100%;
    padding-inline: 16px;
    box-sizing: border-box;
  }

  .hero-subtitle {
    font-size: 14px;
    line-height: 1.5;
  }

  .hero-cta {
    margin-top: 24px;
    width: 100%;
    max-width: 100%;
    justify-content: center;
    gap: 10px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 13px;
    max-width: 100%;
  }

  .products-container,
  .projects-body {
    padding: 0 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .contact-inner {
    padding: 0 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { padding: 32px 16px; }
  .projects-header-bar { padding: 60px 16px 40px; }
  .products-grid { grid-template-columns: 1fr; }
  .flip-card { height: 210px; }
  .hero-circle { --orb-size: 200px; }
  .toast { bottom: 80px; }

  .project-card:hover {
    transform: none;
    box-shadow: none;
  }
}
