:root {
    --tpl-bg: #0f172a;
    --tpl-bg-alt: #0b1220;
    --tpl-surface: #ffffff;
    --tpl-surface-soft: #f3f4ff;
    --tpl-border-soft: #e2e8f0;
    --tpl-accent: #4f46e5;
    --tpl-accent-soft: #6366f1;
    --tpl-accent-sub: #f97316;
    --tpl-text-main: #0f172a;
    --tpl-text-muted: #6b7280;
    --tpl-radius-lg: 18px;
    --tpl-radius-md: 12px;
    --tpl-shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.18);
    --tpl-max-width: 1120px;
  }
  
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  
  html,
  body {
    margin: 0;
    padding: 0;
  }
  
  body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
      "Hiragino Sans", "Noto Sans JP", sans-serif;
    color: var(--tpl-text-main);
    background: radial-gradient(circle at top left, #e0f2fe 0, #eef2ff 38%, #ffffff 100%);
    -webkit-font-smoothing: antialiased;
  }
  
  /* Utility */
  .tpl-container {
    width: 100%;
    max-width: var(--tpl-max-width);
    margin: 0 auto;
    padding: 0 20px;
  }
  
  .sp-only {
    display: none;
  }
  
  @media (max-width: 640px) {
    .sp-only {
      display: inline;
    }
  }
  
  /* Header */
  .tpl-header {
    position: sticky;
    top: 0;
    z-index: 20;
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    background: linear-gradient(
      to bottom,
      rgba(248, 250, 252, 0.92),
      rgba(248, 250, 252, 0.75),
      transparent
    );
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  }
  
  .tpl-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
  }
  
  .tpl-logo {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .tpl-logo-mark {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 20%, #a5b4fc, #4f46e5 40%, #0f172a 100%);
    color: #ffffff;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
  }
  
  .tpl-logo-text {
    font-weight: 600;
    letter-spacing: 0.04em;
    font-size: 14px;
  }
  
  .tpl-nav {
    display: flex;
    gap: 18px;
    font-size: 14px;
  }
  
  .tpl-nav a {
    text-decoration: none;
    color: var(--tpl-text-muted);
    padding: 4px 0;
    position: relative;
  }
  
  .tpl-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(to right, #4f46e5, #f97316);
    transition: width 0.2s ease;
  }
  
  .tpl-nav a:hover {
    color: var(--tpl-text-main);
  }
  
  .tpl-nav a:hover::after {
    width: 100%;
  }
  
  @media (max-width: 768px) {
    .tpl-header-inner {
      justify-content: space-between;
    }
    .tpl-nav {
      display: none; /* とりあえずPCのみ表示でOK。必要ならハンバーガーに。 */
    }
  }
  
  /* Hero */
  .tpl-hero {
    padding: 64px 0 72px;
  }
  
  .tpl-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
  }
  
  .tpl-hero-tagline {
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--tpl-accent-soft);
    font-weight: 600;
    margin: 0 0 12px;
  }
  
  .tpl-hero h1 {
    font-size: 40px;
    line-height: 1.2;
    margin: 0 0 16px;
  }
  
  .tpl-hero-sub {
    margin: 0 0 24px;
    color: var(--tpl-text-muted);
    font-size: 15px;
    line-height: 1.8;
  }
  
  .tpl-hero-highlight {
    font-weight: 600;
    color: var(--tpl-accent);
  }
  
  .tpl-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .tpl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease,
      border-color 0.15s ease, color 0.15s ease;
  }
  
  .tpl-btn-primary {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #ffffff;
    box-shadow: 0 14px 32px rgba(79, 70, 229, 0.35);
  }
  
  .tpl-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(79, 70, 229, 0.4);
  }
  
  .tpl-btn-ghost {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(148, 163, 184, 0.5);
    color: var(--tpl-text-main);
  }
  
  .tpl-btn-ghost:hover {
    background: #ffffff;
    border-color: var(--tpl-accent-soft);
  }
  
  .tpl-hero-visual {
    position: relative;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .tpl-hero-card {
    position: relative;
    z-index: 2;
    background: rgba(15, 23, 42, 0.94);
    border-radius: 24px;
    padding: 20px 22px;
    box-shadow: var(--tpl-shadow-soft);
    color: #e5e7eb;
    max-width: 320px;
  }
  
  .tpl-hero-card-title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    color: #e5e7ff;
  }
  
  .tpl-hero-card-text {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.7;
    color: #cbd5f5;
  }
  
  .tpl-hero-card-link {
    font-size: 13px;
    text-decoration: none;
    color: #bfdbfe;
  }
  
  .tpl-hero-card-link:hover {
    color: #e5e7ff;
  }
  
  /* 背景の「軌道」っぽいオブジェクト */
  .tpl-hero-orbit {
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(129, 140, 248, 0.45);
  }
  
  .orbit-1 {
    width: 260px;
    height: 260px;
    animation: tpl-orbit 18s linear infinite;
  }
  
  .orbit-2 {
    width: 340px;
    height: 340px;
    border-color: rgba(251, 146, 60, 0.35);
    animation: tpl-orbit 26s linear infinite reverse;
  }
  
  @keyframes tpl-orbit {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }
  
  @media (max-width: 960px) {
    .tpl-hero-inner {
      grid-template-columns: minmax(0, 1fr);
    }
    .tpl-hero-visual {
      order: -1;
    }
    .tpl-hero {
      padding-top: 40px;
    }
  }
  
  @media (max-width: 640px) {
    .tpl-hero h1 {
      font-size: 30px;
    }
  }
  
  /* Sections */
  .tpl-section {
    padding: 56px 0;
  }
  
  .tpl-section-alt {
    padding: 56px 0;
    background: rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
  
  .tpl-section-title {
    font-size: 24px;
    margin: 0 0 12px;
  }
  
  .tpl-section-lead {
    margin: 0 0 26px;
    color: var(--tpl-text-muted);
    font-size: 15px;
    line-height: 1.8;
  }
  
  /* Projects cards */
  .tpl-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  
  @media (max-width: 768px) {
    .tpl-card-grid {
      grid-template-columns: minmax(0, 1fr);
    }
  }
  
  .tpl-card {
    background: #ffffff;
    border-radius: var(--tpl-radius-lg);
    padding: 20px 20px 18px;
    border: 1px solid var(--tpl-border-soft);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  }
  
  .tpl-card-muted {
    background: linear-gradient(135deg, #f9fafb, #eef2ff);
  }
  
  .tpl-card-title {
    margin: 0 0 4px;
    font-size: 18px;
  }
  
  .tpl-card-tag {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--tpl-accent-soft);
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  
  .tpl-card-text {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--tpl-text-muted);
    line-height: 1.8;
  }
  
  .tpl-card-link {
    font-size: 14px;
    text-decoration: none;
    color: var(--tpl-accent);
  }
  
  .tpl-card-link:hover {
    text-decoration: underline;
  }
  
  .tpl-card-coming {
    font-size: 13px;
    color: var(--tpl-text-muted);
    font-style: italic;
  }
  
  /* About */
  .tpl-about {
    max-width: 880px;
  }
  
  /* News */
  .tpl-news-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: var(--tpl-radius-md);
    background: #ffffff;
    border: 1px solid var(--tpl-border-soft);
  }
  
  .tpl-news-item {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  }
  
  .tpl-news-item:last-child {
    border-bottom: none;
  }
  
  .tpl-news-date {
    min-width: 90px;
    font-feature-settings: "tnum";
    color: var(--tpl-text-muted);
  }
  
  .tpl-news-text {
    flex: 1;
  }
  
  /* Contact */
  .tpl-contact {
    max-width: 720px;
  }
  
  .tpl-contact-mail {
    margin-top: 16px;
    font-weight: 500;
  }
  
  .tpl-contact-mail a {
    color: var(--tpl-accent);
    text-decoration: none;
  }
  
  .tpl-contact-mail a:hover {
    text-decoration: underline;
  }
  
  /* Footer */
  .tpl-footer {
    padding: 18px 0 26px;
    border-top: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(248, 250, 252, 0.9);
    backdrop-filter: blur(10px);
  }
  
  .tpl-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--tpl-text-muted);
  }
  
  .tpl-footer-links {
    display: flex;
    gap: 14px;
  }
  
  .tpl-footer-links a {
    color: var(--tpl-text-muted);
    text-decoration: none;
  }
  
  .tpl-footer-links a:hover {
    text-decoration: underline;
  }
  
  @media (max-width: 640px) {
    .tpl-footer-inner {
      flex-direction: column;
      gap: 8px;
      align-items: flex-start;
    }
  }
  
  /* スクロール時ふわっと出すアニメーション用 */
  .js-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  
  .js-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
  