/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 
        /* macOS & iOS */
        "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", 
        /* Windows & Android */
        "Noto Sans", "Noto Sans CJK JP", "Noto Sans JP",
        /* Fallbacks */
        "Yu Gothic", "Meiryo", "MS Gothic", "MS PGothic", 
        sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #ffffff;
}

/* Color Variables */
:root {
    --primary-bg: #ffffff;
    --secondary-bg: #f8f9fa;
    --primary-text: #1a1a1a;
    --secondary-text: #6b7280;
    --hover-bg: #e5e7eb;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}


/* Utility Classes */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-grow { flex-grow: 1; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.space-y-12 > * + * { margin-top: 3rem; }
.space-y-tight > * + * { margin-top: 0.125rem; }

.min-h-screen { min-height: 100vh; }
.min-h-16 { min-height: 4rem; }
.w-full { width: 100%; }
.w-32 { width: 8rem; }
.h-32 { height: 8rem; }
.max-w-screen-xl { max-width: 80rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-none { max-width: none; }

.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

.mx-auto { margin-left: auto; margin-right: auto; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-8 { margin-top: 2rem; }

.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }

.fixed { position: fixed; }
.relative { position: relative; }
.z-50 { z-index: 50; }

.pt-16 { padding-top: 4rem; }

.border-t { border-top-width: 1px; border-top-color: var(--border-color); }

/* Grid */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.gap-4 { gap: 1rem; }

/* Responsive Design */
@media (min-width: 768px) {
    .md\\:flex-row { flex-direction: row; }
    .md\\:justify-between { justify-content: space-between; }
    .md\\:items-start { align-items: flex-start; }
    .md\\:mt-0 { margin-top: 0; }
    .md\\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}



/* Color Classes */
.bg-primary-bg { background-color: var(--primary-bg); }
.bg-secondary-bg { background-color: var(--secondary-bg); }
.bg-hover-bg { background-color: var(--hover-bg); }

.text-primary-text { color: var(--primary-text); }
.text-secondary-text { color: var(--secondary-text); }
.text-hover-text { color: var(--hover-bg); }

/* Header Styles */
header {
    backdrop-filter: blur(10px);
    background-color: rgba(248, 249, 250, 0.8);
    border-bottom: 1px solid var(--border-color);
}


/* Button Styles */
button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: var(--hover-bg);
}

/* Link Styles */
a {
    color: inherit;
    text-decoration: underline;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-text);
}

/* Prose Styles */
.prose {
    max-width: 65ch;
}

.prose-lg {
    font-size: 1.125rem;
    line-height: 1.7;
}

.prose p {
    margin-bottom: 1.5rem;
}

/* Card Styles */
.card {
    background-color: var(--primary-bg);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* List Styles */
ul {
    list-style: none;
}

li {
    margin-bottom: 0;
}

/* Tight spacing for specific lists */
.space-y-tight li {
    margin-bottom: 0.125rem;
}

.space-y-tight li:last-child {
    margin-bottom: 0;
}

/* Image Styles */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Social Icons */
.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: var(--secondary-bg);
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--hover-bg);
    transform: translateY(-2px);
}

/* Section Spacing */
section {
    scroll-margin-top: 5rem;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
}



/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Print Styles */
@media print {
    header, footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .bg-primary-bg, .bg-secondary-bg {
        background: white !important;
    }
    
    .text-primary-text, .text-secondary-text {
        color: black !important;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus Styles */
a:focus,
button:focus {
    outline: 2px solid var(--primary-text);
    outline-offset: 2px;
}


/* Border colors for different roles */
.border-blue-500 { border-color: #3b82f6; }
.border-green-500 { border-color: #10b981; }
.border-purple-500 { border-color: #8b5cf6; }
.border-orange-500 { border-color: #f59e0b; }
.border-indigo-500 { border-color: #6366f1; }

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-text: #000000;
        --secondary-text: #333333;
        --border-color: #000000;
    }
    
}
