:root {
    /* Color Palette - Cyber Defense Theme */
    --primary-color: #dc2626;
    --secondary-color: #1e1e2e;
    --accent-color: #ef4444;
    --text-primary: #1a1a1a;
    --text-secondary: #4a5568;
    --bg-light: #fef2f2;
    --bg-white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    --gradient-dark: linear-gradient(135deg, #1e1e2e 0%, #0f0f23 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 4px;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 1px;
  transition: all var(--transition-speed);
}

.hamburger-inner {
  position: relative;
}

.hamburger-inner::before,
.hamburger-inner::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger-inner::before {
  top: -8px;
}

.hamburger-inner::after {
  top: 8px;
}

.hamburger.active .hamburger-inner {
  background-color: transparent;
}

.hamburger.active .hamburger-inner::before {
  transform: rotate(45deg);
  top: 0;
}

.hamburger.active .hamburger-inner::after {
  transform: rotate(-45deg);
  top: 0;
}

/* Hero Section */
.hero {
  position: relative;
  height: 60vh;
  min-height: 500px;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-background::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-hero);
  z-index: -1;
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  z-index: 1;
}

.hero-text {
  color: white;
  max-width: 600px;
}

.hero-text h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.keyword-tag {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Main Content Layout */
.main-container {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
}

.main-content {
  background-color: var(--surface-color);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px var(--shadow-color);
}

.main-content section {
  margin-bottom: 3rem;
}

.main-content section:last-child {
  margin-bottom: 0;
}

.main-content p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

/* News Grid */
.news-grid {
  display: grid;
  gap: 2rem;
}

.news-item {
  background-color: var(--background-color);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

.news-item h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* CTA Section */
.cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.cta-card {
  background: var(--gradient-primary);
  color: white;
  padding: 2rem;
  border-radius: 8px;
  text-decoration: none;
  transition: transform var(--transition-speed);
}

.cta-card:hover {
  transform: translateY(-2px);
  color: white;
}

.cta-card h3 {
  color: white;
  margin-bottom: 1rem;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-section {
  background-color: var(--surface-color);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px var(--shadow-color);
}

.sidebar-section h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.toc,
.related-sites {
  list-style: none;
}

.toc li,
.related-sites li {
  margin-bottom: 0.5rem;
}

.toc a,
.related-sites a {
  display: block;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color var(--transition-speed);
}

.toc a:hover,
.related-sites a:hover {
  background-color: var(--background-color);
}

.ad-space {
  background: var(--gradient-primary);
  color: white;
  padding: 1.5rem;
  border-radius: 6px;
  text-align: center;
}

/* Footer */
.footer {
  background-color: var(--secondary-color);
  color: white;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  padding: 3rem 0;
}

.footer-section h4 {
  color: white;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: #cbd5e1;
}

.footer-section a:hover {
  color: white;
}

.footer-links {
  padding: 1.5rem 0;
  border-top: 1px solid #374151;
}

.footer-links ul {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links ul li {
  margin: 0;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding: 1.5rem 0;
  text-align: center;
  color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    flex-direction: column;
    padding: 1rem 0;
    box-shadow: 0 2px 10px var(--shadow-color);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .content-wrapper {
    grid-template-columns: 1fr;
  }

  .main-content {
    padding: 1.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .cta-grid {
    grid-template-columns: 1fr;
  }

  .hero-keywords {
    justify-content: center;
  }

  .keyword-tag {
    font-size: 0.8rem;
  }

  .footer-links ul {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero-text h1 {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .main-content {
    padding: 1rem;
  }

  .sidebar-section {
    padding: 1rem;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
a:focus,
button:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}