/* ===========================
   TechPulse - Base Styles
   Apple-inspired minimal design
=========================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #000;
  --bg2: #0a0a0a;
  --bg3: #111;
  --bg4: #1c1c1e;
  --border: rgba(255,255,255,0.08);
  --text: #f5f5f7;
  --text-sub: #86868b;
  --accent: #2997ff;
  --accent-hover: #0077ed;
  --tag-ai: #30d158;
  --tag-sec: #ff453a;
  --tag-dev: #ffd60a;
  --tag-tech: #2997ff;
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===========================
   Navigation
=========================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-size: 0.85rem;
  color: var(--text-sub);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

/* ===========================
   Hero
=========================== */

.hero {
  background: var(--bg);
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(ellipse at center,
    rgba(41, 151, 255, 0.12) 0%,
    rgba(41, 151, 255, 0.04) 40%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 720px;
}

.hero-tag {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-sub);
  margin-bottom: 36px;
  letter-spacing: -0.01em;
}

.hero-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 980px;
  transition: background 0.2s, transform 0.2s;
}

.hero-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.03);
}

/* ===========================
   Articles Section
=========================== */

.articles {
  padding: 80px 0 120px;
  background: var(--bg2);
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 40px;
  color: var(--text);
}

.article-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ===========================
   Cards
=========================== */

.card {
  display: block;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: background 0.25s, transform 0.25s, border-color 0.25s;
  cursor: pointer;
}

.card:hover {
  background: #242426;
  border-color: rgba(255,255,255,0.14);
  transform: translateY(-3px);
}

.card-featured {
  grid-column: 1 / -1;
  padding: 36px;
  background: linear-gradient(135deg, #0e1a2b 0%, #1a1a2e 100%);
  border-color: rgba(41, 151, 255, 0.2);
}

.card-featured:hover {
  border-color: rgba(41, 151, 255, 0.4);
  background: linear-gradient(135deg, #0e1e33 0%, #1d1d35 100%);
}

.card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 14px;
  background: rgba(255,255,255,0.08);
  color: var(--text-sub);
}

.card[href*='qiita.com/NF0000'] .card-tag,
.card[href*='aeyesec'] .card-tag {
  background: rgba(255, 69, 58, 0.15);
  color: var(--tag-sec);
}

.card[href*='ntaka329'] .card-tag,
.card[href*='nogataka'] .card-tag {
  background: rgba(48, 209, 88, 0.12);
  color: var(--tag-ai);
}

.card[href*='astra_et_luna'] .card-tag {
  background: rgba(255, 214, 10, 0.12);
  color: var(--tag-dev);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.45;
  margin-bottom: 12px;
  color: var(--text);
}

.card-featured .card-title {
  font-size: 1.3rem;
}

.card-desc {
  font-size: 0.875rem;
  color: var(--text-sub);
  line-height: 1.65;
  margin-bottom: 16px;
}

.card-more {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  transition: color 0.2s;
}

.card:hover .card-more {
  color: #61afff;
}

/* ===========================
   Footer
=========================== */

.footer {
  background: var(--bg3);
  border-top: 1px solid var(--border);
  padding: 48px 0;
  text-align: center;
}

.footer-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-sub);
}

/* ===========================
   Responsive
=========================== */

@media (max-width: 640px) {
  .article-grid {
    grid-template-columns: 1fr;
  }

  .card-featured {
    grid-column: auto;
  }

  .nav-links {
    display: none;
  }

  .hero-title {
    font-size: 2.2rem;
  }
}
