:root {
    /* Brand Colors */
    --brand-50: #f0f4f8;
    --brand-100: #d9e2ec;
    --brand-500: #334e68;
    --brand-800: #102a43;
    --brand-900: #061727;

    /* Accent Colors */
    --accent-400: #40c3df;
    --accent-500: #2bb0ed;

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Spacing & Sizing */
    --container-max-w: 80rem;
    --content-max-w: 56rem;
    --nav-height: 5rem;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-heading {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

a:hover {
    color: var(--accent-500);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout */
.container {
    width: 100%;
    max-width: var(--container-max-w);
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

.content-container {
    max-width: var(--content-max-w);
    margin: 0 auto;
}

/* Navigation */
nav.glass-nav {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    height: var(--nav-height);
    display: flex;
    align-items: center;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.logo-box {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--brand-800), var(--accent-500));
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--brand-900);
    letter-spacing: -0.025em;
}

.nav-links {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

/* Search */
.search-container {
    position: relative;
}

.search-input {
    width: 16rem;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    background-color: var(--gray-100);
    border: 1px solid transparent;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    background-color: white;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 2px rgba(51, 78, 104, 0.1);
}

.search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--gray-400);
}

.nav-link {
    color: var(--brand-800);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--accent-500);
}

/* Hero Section */
.hero {
    position: relative;
    padding-top: 8rem;
    padding-bottom: 5rem;
    background: linear-gradient(135deg, var(--brand-50), var(--brand-100));
    text-align: center;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .hero {
        padding-top: 12rem;
        padding-bottom: 8rem;
    }
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--brand-900);
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 4.5rem;
    }
}

.text-gradient {
    background: linear-gradient(90deg, var(--brand-800), var(--accent-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 42rem;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

/* Sections */
.section-padding {
    padding: 6rem 0;
}

.bg-white {
    background-color: white;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    text-align: center;
    color: var(--brand-900);
    margin-bottom: 4rem;
}

/* Grid & Cards */
.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    border: 1px solid var(--gray-100);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-4px);
}

.card-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease;
}

.card:hover .card-icon {
    transform: scale(1.1);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-900);
    margin-bottom: 0.75rem;
}

.card-desc {
    font-size: 0.875rem;
    color: var(--gray-500);
    line-height: 1.6;
}

/* Card Icon Backgrounds */
.bg-brand-500 {
    background-color: var(--brand-500);
}

.bg-brand-800 {
    background-color: var(--brand-800);
}

.bg-accent-500 {
    background-color: var(--accent-500);
}

.bg-accent-400 {
    background-color: var(--accent-400);
}

/* Post Header */
.post-header {
    padding-top: 8rem;
    padding-bottom: 3rem;
    background-color: white;
    border-bottom: 1px solid var(--gray-50);
}

@media (min-width: 1024px) {
    .post-header {
        padding-bottom: 5rem;
    }
}

.ad-disclosure {
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background-color: var(--gray-50);
    border: 1px solid var(--gray-100);
    font-size: 10px;
    color: var(--gray-400);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-meta {
    font-size: 0.875rem;
    color: var(--gray-400);
    margin-bottom: 1.5rem;
}

.post-title-main {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--brand-900);
    line-height: 1.25;
}

@media (min-width: 768px) {
    .post-title-main {
        font-size: 3rem;
    }
}

/* Author Section */
.author-section {
    padding-top: 3rem;
    display: flex;
    gap: 1.25rem;
    margin-bottom: 4rem;
}

.author-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    border: 2px solid var(--brand-50);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.author-bubble {
    position: relative;
    background-color: var(--brand-50);
    padding: 1.5rem;
    border-radius: 1.25rem;
    border: 1px solid var(--brand-100);
}

.author-bubble-tail {
    position: absolute;
    left: 0;
    top: 1.5rem;
    transform: translateX(-100%);
    width: 0.75rem;
    height: 1rem;
    overflow: hidden;
}

.author-bubble-tail::after {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    width: 1rem;
    height: 1rem;
    background-color: var(--brand-50);
    border: 1px solid var(--brand-100);
    transform: rotate(45deg);
    transform-origin: top left;
}

.author-name {
    color: var(--brand-900);
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.author-desc {
    color: var(--brand-800);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Typography / Prose Content */
.prose {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gray-700);
}

.prose h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--brand-800);
    margin: 3.5rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--brand-50);
    line-height: 1.3;
}

.prose h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-500);
    margin: 2.5rem 0 1.25rem;
    display: flex;
    align-items: center;
}

.prose h3::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 24px;
    background: var(--accent-500);
    margin-right: 0.75rem;
    border-radius: 4px;
}

.prose p {
    margin-bottom: 1.5rem;
}

.prose ul,
.prose ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose strong {
    color: var(--brand-900);
    font-weight: 700;
}

.prose a {
    color: var(--accent-500);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.prose a:hover {
    color: var(--brand-800);
    text-decoration-color: var(--brand-800);
    background-color: var(--brand-50);
    border-radius: 4px;
}

/* Table Style */
.prose table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    font-size: 0.95rem;
}

.prose th {
    background-color: var(--gray-50);
    color: var(--brand-900);
    font-weight: 700;
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

.prose td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    color: var(--brand-800);
    background-color: white;
}

.prose tr:last-child td {
    border-bottom: none;
}

.prose tr:nth-child(even) td {
    background-color: #fbfbfc;
}

/* Affiliate Card */
.affiliate-card {
    margin-top: 5rem;
    padding: 2.5rem;
    background-color: var(--brand-50);
    border-radius: 2rem;
    border: 1px solid var(--brand-100);
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .affiliate-card {
        flex-direction: row;
        align-items: center;
    }
}

.aff-content {
    flex: 1;
}

.aff-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brand-900);
    margin-bottom: 0.75rem;
}

.aff-desc {
    font-size: 0.875rem;
    color: var(--brand-800);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.aff-btn {
    display: inline-block;
    background-color: white;
    padding: 0.875rem 1.75rem;
    border-radius: 9999px;
    color: var(--brand-900);
    font-weight: 700;
    font-size: 0.875rem;
    border: 1px solid var(--brand-200);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.aff-btn:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    background-color: var(--gray-50);
}

.aff-image-container {
    flex-shrink: 0;
}

.aff-img {
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.4s;
}

.aff-img:hover {
    transform: rotate(1deg) scale(1.05);
}

/* Footer & Other */
.main-footer {
    background-color: var(--brand-900);
    color: white;
    padding: 5rem 0 3rem;
}

.footer-copy {
    color: var(--gray-500);
    font-size: 0.875rem;
    text-align: center;
}

.sub-footer {
    padding: 3rem 0;
    background-color: var(--gray-50);
    border-top: 1px solid var(--gray-100);
}

.sub-footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.25rem;
}

.sub-footer-link {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.sub-footer-link:hover {
    color: var(--brand-500);
}

.sub-footer-copy {
    text-align: center;
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    margin-bottom: 2rem;
    list-style: none;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--gray-400);
}

.breadcrumb-link:hover {
    color: var(--gray-500);
}

.breadcrumb-separator {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--gray-300);
}

/* Category/Search Header */
.page-header-alt {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.header-accent {
    width: 0.5rem;
    height: 2.5rem;
    background-color: var(--accent-500);
    border-radius: 9999px;
}

/* Article Card (List view) */
.article-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .article-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.article-card {
    background: white;
    border-radius: 1.5rem;
    border: 1px solid var(--gray-100);
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.article-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.article-card-body {
    padding: 2rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.category-badge {
    padding: 0.25rem 0.75rem;
    background-color: var(--brand-50);
    color: var(--brand-500);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-date {
    font-size: 0.875rem;
    color: var(--gray-400);
}

.article-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-900);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-card:hover .article-title {
    color: var(--accent-500);
}

.article-desc {
    font-size: 1rem;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    display: flex;
    align-items: center;
    color: var(--accent-500);
    font-weight: 700;
    font-size: 1rem;
}

.read-more svg {
    width: 1.25rem;
    height: 1.25rem;
    margin-left: 0.5rem;
    transition: transform 0.3s;
}

.article-card:hover .read-more svg {
    transform: translateX(4px);
}

/* Empty State */
.empty-state {
    background-color: white;
    padding: 5rem 2rem;
    text-align: center;
    border-radius: 2rem;
    border: 1px dashed var(--gray-200);
}

.empty-icon-box {
    width: 5rem;
    height: 5rem;
    background-color: var(--gray-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.empty-icon {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--gray-300);
}

.empty-text {
    color: var(--gray-500);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: var(--brand-800);
    color: white;
    font-weight: 600;
    border-radius: 9999px;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: var(--brand-900);
}

/* Utils */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

::selection {
    background: var(--accent-500);
    color: white;
}