:root {
  --paper: #eeefec;
  --ink: #171a18;
  --muted: #6e756f;
  --rule: #d3d7d0;
  --signal: #2f6b4f;
  --on-signal: #ffffff;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC",
    "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Mono",
    "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121513;
    --ink: #e9ebe6;
    --muted: #949b95;
    --rule: #2a2f2c;
    --signal: #74c79c;
    --on-signal: #0e1210;
  }
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--signal);
  color: var(--on-signal);
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 3px;
}

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(4rem, 14vh, 9rem) var(--gutter) 4rem;
}

/* ---------- hero ---------- */

.address {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(1.9rem, 8.5vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
  overflow-wrap: anywhere;
}

.rule {
  display: block;
  width: 100%;
  height: 30px;
  margin: 1.75rem 0 1.5rem;
  overflow: visible;
}

.rule-path {
  fill: none;
  stroke: var(--rule);
  stroke-width: 1.25;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1300;
  stroke-dashoffset: 1300;
  animation: draw 1.7s cubic-bezier(0.22, 0.61, 0.36, 1) 0.15s forwards;
}

.rule-breathe {
  transform-box: fill-box;
  transform-origin: center;
  animation: breathe 7s ease-in-out 2s infinite;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@keyframes breathe {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(1.85); }
}

.name {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin: 0 0 0.75rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.name-latin {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.tagline {
  max-width: 28rem;
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.8;
}

/* ---------- blocks ---------- */

.block { margin-top: 3.75rem; }

.label {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
  margin: 0 0 1.25rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.label-en {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.items {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.items li {
  position: relative;
  padding-left: 1.5rem;
}

.items li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 0.5rem;
  height: 1px;
  background: var(--signal);
}

/* ---------- contact ---------- */

.mail-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin: 0 0 0.5rem;
}

.mail {
  padding-bottom: 2px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: clamp(1rem, 4.4vw, 1.2rem);
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.mail:hover {
  color: var(--signal);
  border-color: var(--signal);
}

.copy {
  padding: 0.3125rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease,
    background-color 0.18s ease;
}

.copy:hover {
  color: var(--ink);
  border-color: var(--muted);
}

.copy[data-state="done"] {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--on-signal);
}

.hint {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.links a {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.links a::after {
  content: "\2197";
  color: var(--muted);
  font-size: 0.8em;
}

.links a:hover {
  color: var(--signal);
  border-color: var(--signal);
}

/* ---------- footer ---------- */

.foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

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