/* Personal voice, shared spacing, and lightweight interactions. */
[hidden] { display: none !important; }
textarea { font: inherit; }
h1, h2, h3 { text-wrap: balance; }

.hero h1 { font-size: clamp(80px, 9.6vw, 124px); line-height: 1.12; letter-spacing: -.045em; white-space: nowrap; }
.hero-name { font-weight: 750; letter-spacing: -.06em; }
.hero-period { color: var(--blue); }
.hero-motto { display: flex; justify-content: center; margin-top: 24px; font-size: clamp(26px, 3vw, 36px); font-weight: 550; line-height: 1.5; letter-spacing: -.015em; }
.motto-piece { display: inline-block; white-space: nowrap; }
.hero-sub { max-width: 540px; margin-top: 22px; font-size: 16px; line-height: 1.9; color: #5d5247; }
.hero-socials { display: flex; justify-content: center; flex-wrap: wrap; gap: 32px; margin-top: 24px; }
.social-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 22px; min-width: 126px; min-height: 46px; padding: 10px 17px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-size: 16px; font-weight: 650; line-height: 1.5; transition: transform .25s var(--ease), border-color .25s, color .25s; }
.social-link > span { color: var(--muted); font-size: 18px; line-height: 1; }
.social-link:is(:hover, :focus-visible) { transform: translateY(-2px); border-color: var(--blue); color: var(--blue); }
.social-link:is(:hover, :focus-visible) > span { color: inherit; }
.face-orbit { right: 2%; top: 0; width: 66px; height: 66px; }
.micro-card { right: -72px; top: 96px; left: auto; bottom: auto; width: 132px; padding: 14px 15px; }
.micro-card strong { font-size: 17px; }
.hero-accent::after { bottom: 0; height: 5px; }
.word-rail-track { gap: 0; }
.rail-group { display: flex; flex: 0 0 auto; align-items: center; gap: 14px; padding-right: 14px; }
.rail-chip.neutral { background: #fff; }
.word-rail:hover .word-rail-track { animation-play-state: paused; }

.skill-card { container-type: inline-size; }
.skill-card h3 { font-size: clamp(28px, 10.5cqi, 46px); line-height: 1.18; letter-spacing: -.035em; }
.skill-card p { font-size: 16px; }
.skill-card:is(:hover, :focus-visible, .is-engaged) { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(112, 74, 45, .12); border-color: var(--accent); }
.skill-card:is(:hover, :focus-visible, .is-engaged)::before { width: 100%; }
.skill-card { display: flex; flex-direction: column; min-height: 340px; }
.skill-card-body { margin-top: 34px; margin-bottom: 26px; }
.skill-card-footer { position: static; margin-top: auto; }
.skill-card:is(:hover, :focus-visible, .is-engaged) .copy-hint::before { background: #fff; }
.skill-card:is(:hover, :focus-visible, .is-engaged) .skill-card-body p { opacity: 0; }
.skill-card:is(:hover, :focus-visible, .is-engaged) .arrow { transform: translate(3px, -3px); }
.code-layer { position: absolute; z-index: 6; left: 26px; right: 26px; bottom: 58px; padding: 15px 17px; border-radius: 16px; background: #241f1b; color: #f3f3f3; box-shadow: 0 14px 28px rgba(60, 40, 25, .2); opacity: 0; transform: translateY(10px); transition: opacity .22s, transform .35s var(--ease); pointer-events: none; }
.skill-card:is(:hover, :focus-visible, .is-engaged) .code-layer { opacity: 1; transform: none; }
.code-top { display: flex; gap: 5px; margin-bottom: 9px; }
.code-top i { width: 7px; height: 7px; border-radius: 50%; background: #ff5f57; }
.code-top i:nth-child(2) { background: #febc2e; }
.code-top i:nth-child(3) { background: #28c840; }
.code-layer code { display: block; font: 500 11px/1.62 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.code-dim { color: #8a8a8a; }
.code-blue { color: #bda6ff; }
.code-green { color: #8fe3b4; }

.coffee-chat { background: rgba(255,255,255,.55); }
.chat-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(32px, 4vw, 56px); align-items: start; }
.chat-intro { min-width: 0; padding-top: 10px; container-type: inline-size; }
.chat-intro h2 { font-size: clamp(30px, 13cqi, 58px); line-height: 1.23; letter-spacing: -.035em; }
.chat-intro h2 span { display: block; white-space: nowrap; }
.chat-description { margin-top: 24px; max-width: 26em; color: #5d5247; font-size: 16px; line-height: 1.85; }
.chat-motif { display: flex; align-items: center; gap: 12px; margin-top: 42px; }
.chat-motif span { display: grid; place-items: center; width: 72px; height: 64px; border-radius: 22px; font-size: 32px; font-weight: 650; }
.chat-motif span:first-child { width: 110px; background: var(--pink); font: 600 24px/1 ui-monospace, SFMono-Regular, Menlo, monospace; transform: rotate(-5deg); }
.chat-motif span:nth-child(2) { background: var(--yellow); transform: rotate(4deg); }
.chat-motif span:last-child { background: var(--blue); color: #fff; transform: rotate(-3deg); }
.chat-panel { min-width: 0; padding: 32px; border: 1px solid #eadbca; border-radius: 28px; background: #fff; }
.form-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 26px; font-size: 20px; font-weight: 650; line-height: 1.5; }
.form-heading span { color: var(--muted); font-size: 12px; font-weight: 400; white-space: nowrap; }
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.field input, .field textarea { display: block; width: 100%; min-width: 0; padding: 13px 14px; border: 1px solid #e5d5c2; border-radius: 12px; background: #faf5ec; color: var(--ink); font-size: 16px; line-height: 1.6; transition: border-color .2s, background .2s; }
.field textarea { min-height: 112px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #9a8b7c; opacity: 1; }
.field input:focus, .field textarea:focus { border-color: var(--blue); background: #fff; outline: 3px solid rgba(124, 92, 255, .16); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: #b8374d; }
.form-error { margin-bottom: 16px; color: #a72e43; font-size: 14px; line-height: 1.7; }
.form-error:empty { display: none; }
.submit-btn { display: flex; width: 100%; min-height: 54px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 20px; border: 0; border-radius: 999px; background: var(--blue); color: #fff; font-size: 16px; font-weight: 600; cursor: pointer; transition: background .2s, transform .3s var(--ease); }
.submit-btn span { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--blue); font-size: 22px; }
.submit-btn:hover:not(:disabled) { background: #6a4be8; transform: translateY(-2px); }
.submit-btn:disabled { cursor: wait; opacity: .65; }
.form-note { margin-top: 14px; color: var(--muted); font-size: 12px; line-height: 1.75; }
.chat-success { padding: 20px 0; }
.success-mark { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 24px; border-radius: 19px; background: var(--blue); color: #fff; font-size: 30px; }
.chat-success h3 { margin-bottom: 16px; font-size: 30px; line-height: 1.25; letter-spacing: -.035em; }
.chat-success > p { color: #5d5247; font-size: 16px; line-height: 1.8; }
.intro-preview { margin: 24px 0; padding: 20px; border-radius: 16px; background: #f7f0e4; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.9; }
.background-code { position: fixed; inset: 0; z-index: 35; width: 100%; height: 100%; pointer-events: none; }

@media (max-width: 900px) {
  .hero h1 { font-size: clamp(76px, 11vw, 100px); }
  .hero .section-inner { min-height: 600px; }
  .face-orbit { top: -20px; right: 2%; width: 56px; height: 56px; }
  .micro-card { display: none; }
  .chat-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .chat-intro { padding-top: 0; }
  .chat-intro h2 { font-size: clamp(38px, 7vw, 54px); }
  .chat-motif { margin-top: 26px; }
  .skill-card h3 { font-size: clamp(26px, 11.5cqi, 40px); }
}

@media (max-width: 640px) {
  .hero .section-inner { min-height: 550px; }
  .hero h1 { font-size: clamp(52px, 15.5vw, 86px); line-height: 1.15; }
  .hero-motto { margin-top: 20px; font-size: clamp(21px, 5.6vw, 30px); line-height: 1.5; }
  .hero-sub { font-size: 16px; line-height: 1.85; margin-top: 22px; max-width: 25em; }
  .hero-sub br { display: none; }
  .hero-socials { gap: 24px; margin-top: 20px; }
  .social-link { min-width: 118px; gap: 16px; padding-inline: 15px; }
  .face-orbit { top: -54px; right: 12px; width: 44px; height: 44px; font-size: 18px; }
  .chat-intro h2 { font-size: clamp(30px, 9vw, 44px); }
  .chat-panel { padding: 24px 20px; border-radius: 22px; }
  .chat-motif span { width: 56px; height: 52px; border-radius: 17px; font-size: 26px; }
  .chat-motif span:first-child { width: 92px; font-size: 21px; }
  .skill-card h3 { font-size: clamp(25px, 11.5cqi, 38px); }
  .code-layer { left: 20px; right: 20px; }
  .form-heading { font-size: 18px; }
  .contact-card { column-gap: 12px; }
  .contact-card strong { font-size: clamp(19px, 5.8vw, 25px); }
}

@media (hover: none), (pointer: coarse) {
  .background-code { display: none; }
  .skill-card:not(.is-engaged):not(:focus-visible)::before { width: 9px; }
  .skill-card:not(.is-engaged):not(:focus-visible) .code-layer { opacity: 0; transform: translateY(10px); }
  .skill-card:not(.is-engaged):not(:focus-visible) .skill-card-body p { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .background-code { display: none; }
  .submit-btn, .field input, .field textarea, .code-layer { transition: none; }
  .social-link { transition: none; }
  .social-link:is(:hover, :focus-visible) { transform: none; }
}
