/* ============================================
   AI Efficiency Lab — Premium Design System
   ============================================ */

/* --- CSS Variables --- */
:root {
  /* Colors */
  --bg-primary: #050508;
  --bg-secondary: #0a0a12;
  --bg-card: rgba(20, 20, 35, 0.6);
  --bg-card-hover: rgba(30, 30, 50, 0.8);
  
  --text-primary: #ffffff;
  --text-secondary: #b4b4c8;
  --text-muted: #707085;
  
  --accent: #7D5FFF;
  --accent-light: #B4A0FF;
  --accent-cyan: #00E5FF;
  --accent-glow: rgba(125, 95, 255, 0.4);
  
  --gradient-main: linear-gradient(135deg, #7D5FFF 0%, #00E5FF 100%);
  --gradient-text: linear-gradient(to right, #B4A0FF, #00E5FF);
  --gradient-dark: linear-gradient(to bottom, #050508, #0a0a12);
  
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.15);
  
  /* Typography */
  --font-sans: 'Inter', 'Noto Sans JP', sans-serif;
  
  /* Spacing & Sizes */
  --max-width: 1200px;
  --header-height: 70px;
  --radius-md: 12px;
  --radius-lg: 24px;
  
  /* Effects */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 40px -5px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(125, 95, 255, 0.15);
  
  --glass: blur(12px) saturate(180%);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(125, 95, 255, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(0, 229, 255, 0.08), transparent 25%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; transition: 0.3s; }
img { max-width: 100%; display: block; }

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: var(--glass);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.logo-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-links a:hover {
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  padding: 8rem 2rem 6rem;
  text-align: center;
  background-image: 
    linear-gradient(rgba(5, 5, 8, 0) 0%, var(--bg-primary) 100%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232a2a35' fill-opacity='0.2'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hero-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Posts Grid --- */
.posts-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 2rem 8rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

/* --- Card Design --- */
.post-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
}

.post-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), transparent);
  opacity: 0;
  transition: 0.4s;
}

.post-card:hover {
  transform: translateY(-8px);
  background: var(--bg-card-hover);
  border-color: rgba(125, 95, 255, 0.3);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.post-card:hover::before { opacity: 1; }

.post-card-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  z-index: 1;
}

.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.tag {
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--accent-cyan);
  font-weight: 500;
}

.post-card-title {
  font-size: 1.5rem;
  line-height: 1.35;
  margin-bottom: 1rem;
}

.post-card-title a:hover {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.post-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.read-more {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--accent-light);
}

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

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

/* --- Single Post Page --- */
.post {
  max-width: 800px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.post-header { margin-bottom: 4rem; text-align: center; }

.post-meta {
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.post-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: linear-gradient(to bottom, #fff, #a29bfe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.post-content { font-size: 1.1rem; color: #d0d0e0; }
.post-content h2 { font-size: 1.8rem; margin: 3rem 0 1.5rem; color: #fff; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.post-content h3 { font-size: 1.4rem; margin: 2.5rem 0 1rem; color: #fff; }
.post-content p { margin-bottom: 1.5rem; }
.post-content li { margin-bottom: 0.75rem; }

.post-content strong {
  color: var(--accent-cyan);
  font-weight: 600;
}

.post-footer {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.back-link {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--border);
  border-radius: 50px;
  font-weight: 600;
  transition: 0.3s;
}

.back-link:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  background: #020205;
  padding: 4rem 2rem;
  text-align: center;
}

/* Mobile */
@media (max-width: 768px) {
  .nav-links { display: none; }
}
