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

:root {
    --bg-color: #030308;
    --text-main: #f0f0f5;
    --text-muted: #9ba0af;
    --accent-cyan: #00f0ff;
    --accent-purple: #8a2be2;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* Header */
.glass-header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background: rgba(3, 3, 8, 0.6);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}
.header-container {
    max-width: 1200px; margin: 0 auto; padding: 1.2rem 2rem;
    display: flex; justify-content: space-between; align-items: center;
}
.logo {
    font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; font-weight: 700; letter-spacing: 2px;
    background: linear-gradient(90deg, var(--text-main), var(--accent-cyan));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.nav-links { list-style: none; display: flex; gap: 2rem; }
.nav-links a { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); transition: color 0.3s ease; }
.nav-links a:hover { color: var(--accent-cyan); }

/* Layout Utilities */
.section-container { max-width: 1200px; margin: 0 auto; padding: 6rem 2rem; }
.section-header { margin-bottom: 4rem; text-align: center; }
.section-title {
    font-family: 'Space Grotesk', sans-serif; font-size: 2.5rem; margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #fff, var(--text-muted));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.section-desc { color: var(--accent-cyan); font-size: 0.95rem; letter-spacing: 1px; }

/* Note-style Card UI */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 2.5rem; }
.note-card {
    background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px;
    overflow: hidden; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative;
    height: 100%; display: flex; flex-direction: column;
}
.note-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
    opacity: 0; transition: opacity 0.4s ease; z-index: 1; pointer-events: none;
}
.note-card:hover {
    transform: translateY(-8px); border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 240, 255, 0.1);
}
.note-card:hover::before { opacity: 1; }
.card-image { width: 100%; height: 200px; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.note-card:hover .card-image img { transform: scale(1.05); }
.card-content { padding: 1.8rem; position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; }
.card-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; font-size: 0.85rem; }
.category { padding: 0.3rem 0.8rem; border-radius: 20px; font-weight: 600; font-size: 0.75rem; letter-spacing: 0.5px; }
.category.mindset { background: rgba(0, 240, 255, 0.1); color: var(--accent-cyan); border: 1px solid rgba(0, 240, 255, 0.2); }
.category.career { background: rgba(138, 43, 226, 0.1); color: #d084ff; border: 1px solid rgba(138, 43, 226, 0.2); }
.category.society { background: rgba(255, 165, 0, 0.1); color: #ffb84d; border: 1px solid rgba(255, 165, 0, 0.2); }
.card-title { font-size: 1.3rem; font-weight: 700; line-height: 1.5; margin-bottom: 1rem; color: var(--text-main); }
.card-excerpt { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 1.5rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.card-author { display: flex; align-items: center; gap: 10px; padding-top: 1.2rem; border-top: 1px solid var(--card-border); }
.author-avatar {
    width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: bold; color: #fff;
}
.author-name { font-size: 0.85rem; color: var(--text-muted); }

/* Markdown Body */
.markdown-body h2 { font-size: 1.8rem; margin: 3rem 0 1.5rem; color: #fff; padding-bottom: 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.markdown-body p { margin-bottom: 1.5rem; }
.markdown-body ul, .markdown-body ol { margin-bottom: 1.5rem; padding-left: 2rem; }
.markdown-body li { margin-bottom: 0.5rem; }
.markdown-body strong { color: var(--accent-cyan); }

/* Footer & Substack */
footer { padding: 3rem 2rem; text-align: center; background: #010103; border-top: 1px solid rgba(255,255,255,0.05); }
.newsletter-section { background: linear-gradient(to right, rgba(3, 3, 8, 1), rgba(11, 11, 26, 1)); border-top: 1px solid rgba(255,255,255,0.05); padding: 6rem 2rem; }
.newsletter-container { max-width: 1000px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 4rem; flex-wrap: wrap; }
.newsletter-text { flex: 1; min-width: 300px; }
.newsletter-text h2 { font-family: 'Space Grotesk', sans-serif; font-size: 2.5rem; margin-bottom: 1rem; }
.newsletter-text p { color: var(--text-muted); font-size: 1.1rem; line-height: 1.6; }
.newsletter-form-wrapper { flex: 1; min-width: 300px; max-width: 480px; width: 100%; }

/* Animations */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 768px) {
    .newsletter-container { flex-direction: column; text-align: center; }
    .nav-links { display: none; }
}
