:root {
    /* Color Palette - Premium Tech */
    --color-bg-body: #f8fafc;
    --color-bg-card: rgba(255, 255, 255, 0.7);
    --color-bg-card-hover: rgba(255, 255, 255, 0.9);
    --color-text-main: #0f172a;
    --color-text-muted: #64748b;
    --color-primary: #3b82f6;
    --color-primary-dark: #2563eb;
    --color-accent-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);

    /* Typography */
    --font-sans: 'Inter', 'Noto Sans JP', sans-serif;

    /* Spacing & Layout */
    --container-width: 1100px;
    --header-height: 70px;
    --radius-lg: 16px;
    --radius-md: 12px;

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.5);
    --glass-blur: blur(12px);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header - Glassmorphism */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: var(--glass-border);
    display: flex;
    align-items: center;
}

.site-header .container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-icon {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 8px;
}

.site-brand:hover .site-icon {
    transform: rotate(10deg) scale(1.1);
}

.site-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--color-accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: 4rem;
    overflow: hidden;
    background-color: #0f172a;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('https://res.cloudinary.com/dd2ivyxwt/image/upload/w_800,f_auto,q_auto/v1763648355/hero-bg_t9dyuh.png');
    background-size: cover;
    background-position: center;
    opacity: 0.6;
    transform: scale(1.05);
    animation: zoomSlow 10s infinite alternate;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.3), rgba(15, 23, 42, 0.8));
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    padding: 2rem;
    animation: slideUpFade 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.03em;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    font-weight: 500;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    background: var(--color-accent-gradient);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04), var(--shadow-glow);
}

/* Post Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 5rem;
}

.post-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.post-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    border: var(--glass-border);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card-link:hover .post-card {
    transform: translateY(-4px);
    background: var(--color-bg-card-hover);
    box-shadow: var(--shadow-lg);
    border-color: rgba(59, 130, 246, 0.3);
}

.post-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-date {
    font-size: 0.875rem;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--color-text-main);
}

.post-card-link:hover .post-title {
    color: var(--color-primary-dark);
}

.post-excerpt {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.read-more {
    align-self: flex-start;
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more::after {
    content: '→';
    transition: transform 0.2s;
}

.post-card-link:hover .read-more::after {
    transform: translateX(4px);
}

/* Article Detail */
article {
    background: white;
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 4rem;
}

article h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

article .post-date {
    display: block;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

article p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #334155;
}

article h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 1rem 0 1.5rem;
    padding-left: 1rem;
    border-left: 4px solid var(--color-primary);
}

article ul,
article ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    background: #f1f5f9;
    padding: 2rem 2rem 2rem 3rem;
    border-radius: var(--radius-md);
}

article li {
    margin-bottom: 0.75rem;
}

article img {
    display: block;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

article a {
    color: var(--color-primary);
    text-decoration: underline;
    transition: color 0.2s;
}

article a:hover {
    color: var(--color-primary-dark);
}

article pre {
    background-color: #f1f5f9;
    padding: 0.5rem;
    margin-bottom: 1rem;
}

article hr {
    margin-bottom: 2rem;
}

/* Footer */
.site-footer {
    background: white;
    padding: 4rem 0;
    text-align: center;
    color: var(--color-text-muted);
    border-top: 1px solid #e2e8f0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 4rem;
    margin-bottom: 2rem;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    height: 2.75rem;
    padding: 0 0.875rem;
    background: var(--color-bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 10px;
    color: var(--color-text-main);
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.pagination-link:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(59, 130, 246, 0.3);
}

.pagination-link.active {
    background: var(--color-accent-gradient);
    color: white;
    pointer-events: none;
    box-shadow: var(--shadow-md), var(--shadow-glow);
    border-color: transparent;
}

.pagination-arrow {
    font-size: 1.25rem;
    min-width: 2.75rem;
    font-weight: 400;
}

.pagination-arrow:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-3px) scale(1.05);
}

/* Animations */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomSlow {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .hero {
        min-height: 50vh;
        border-radius: 0;
    }

    .hero h2 {
        font-size: 2.25rem;
    }

    article {
        padding: 1.5rem;
    }

    .pagination {
        gap: 0.5rem;
        margin-top: 3rem;
    }

    .pagination-link {
        min-width: 2.5rem;
        height: 2.5rem;
        font-size: 0.875rem;
    }
}