:root {
  --bg: #0b1020;
  --bg-soft: rgba(255, 255, 255, 0.04);
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f5f7ff;
  --text-soft: rgba(245, 247, 255, 0.78);
  --text-faint: rgba(245, 247, 255, 0.58);
  --accent: #9fb8ff;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --max-width: 960px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  background: #0b1020;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(76, 112, 255, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(110, 221, 255, 0.12), transparent 26%),
    linear-gradient(180deg, #0b1020 0%, #0f1630 100%);
  line-height: 1.6;
  background-color: #0b1020;
}

.container {
  width: min(calc(100% - 24px), var(--max-width));
  margin: 40px auto;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.footer {
  padding-left: 8px;
}

.bg-orb {
  position: fixed;
  inset: auto auto 15% -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140, 176, 255, 0.18), transparent 65%);
  filter: blur(12px);
  pointer-events: none;
  z-index: 0;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), var(--max-width));
  margin: 40px auto;
}

.glass-panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.05));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.hero-card {
  padding: 28px;
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hero-top {
  display: flex;
  align-items: center;
  gap: 20px;
}

.avatar-ring {
  width: 88px;
  height: 88px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(159, 184, 255, 0.95), rgba(110, 221, 255, 0.95));
  display: grid;
  place-items: center;
  box-shadow: 0 12px 32px rgba(70, 108, 255, 0.35);
  flex-shrink: 0;
}

.avatar-ring span {
  font-size: 2rem;
  font-weight: 700;
  color: #09111d;
  letter-spacing: 0.03em;
}

.profile-text {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-card h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.lead {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 1rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  font-size: 0.84rem;
}

.links-section {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.links-block {
  margin-top: 40px;
}

.link-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 18px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  min-height: 108px;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(159, 184, 255, 0.45);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.06));
}

.link-card:focus-visible {
  outline: 2px solid rgba(159, 184, 255, 0.9);
  outline-offset: 3px;
}

.link-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  overflow: hidden;
  padding: 8px;
}

.link-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.note .link-icon img { width: 56px; height: 56px; }
.qiita .link-icon img { width: 28px; height: 28px; }
.zenn .link-icon img { width: 28px; height: 28px; }
.x .link-icon img { width: 24px; height: 24px; }
.gh .link-icon img { width: 26px; height: 26px; }

.link-body {
  min-width: 0;
  flex: 1;
}

.link-body h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  line-height: 1.2;
}

.link-body p {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.92rem;
}

.arrow {
  font-size: 1.1rem;
  color: var(--text-faint);
  flex-shrink: 0;
}

/* サービスごとの微調整 */
.note .link-icon img {
  width: 56px;
  height: 56px;
  transform: translateY(-10px);
}

.qiita .link-icon img {
  width: 60px;
  height: 60px;
  transform: translateY(-10px);
}

.zenn .link-icon img {
  width: 56px;
  height: 56px;
  transform: translateY(-10px);
}

.x .link-icon img {
  width: 32px;
  height: 32px;
  transform: translateY(-2px);
}

.gh .link-icon img {
  width: 60px;
  height: 60px;
  transform: translateY(-10px);
}

.about-card {
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 24px 24px 22px;
  background: rgba(255, 255, 255, 0.05);
}

.about-card h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.about-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.8;
}

.site-footer {
  margin-top: 24px;
  padding: 8px 4px 0;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.88rem;
}

/* work section add */
.work-section {
  margin-top: 26px;
}

.section-heading {
  margin: 0 0 18px;
  padding: 0 2px 14px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.section-heading p {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.92rem;
}

.work-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.work-card {
  display: block;
  padding: 18px 18px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  min-height: 108px;
}

.work-card:hover {
  transform: translateY(-2px);
  border-color: rgba(159, 184, 255, 0.45);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.06));
}

.work-card:focus-visible {
  outline: 2px solid rgba(159, 184, 255, 0.9);
  outline-offset: 3px;
}

.work-body h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  line-height: 1.25;
}

.work-body p {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* - - - - */

/* where i write */
.write-heading {
  margin-top: 30px;
}
/* --------- */

/* section h2 edit */
.section-heading h2 {
  display: inline-flex;
  align-items: center;
  margin: 0 0 10px;
  padding: 7px 13px;
  font-size: 0.96rem;
  line-height: 1.2;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
/* */

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--max-width));
    margin: 20px auto 28px;
  }

  .container {
    width: min(calc(100% - 24px), var(--max-width));
    margin: 20px auto 28px;
  }
  
  .hero-card {
    padding: 22px 18px;
    border-radius: 24px;
  }

  .hero-top {
    align-items: flex-start;
  }

  .avatar-ring {
    width: 72px;
    height: 72px;
    border-radius: 22px;
  }

  .avatar-ring span {
    font-size: 1.65rem;
  }

  .links-section {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .link-card {
    min-height: 96px;
    padding: 16px;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  
  .work-card {
    min-height: 96px;
    padding: 16px;
  }

  .about-card {
    padding: 20px 18px;
    border-radius: 20px;
  }
}
