/* ===========================================
   RE:DO NETWORK - Interior Pages CSS
   Y2K Aesthetic / Japanese Minimalism
   =========================================== */

@import url('https://fonts.googleapis.com/css2?family=M+PLUS+1:wght@300;400;500;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg-primary: #0a0a0a;
  --bg-card: rgba(20, 20, 25, 0.85);
  --bg-card-hover: rgba(30, 30, 38, 0.9);
  --text-primary: #e8e8e8;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-muted: rgba(255, 255, 255, 0.35);
  --accent: #ff3366;
  --accent-alt: #00ccff;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --radius: 16px;
  --radius-lg: 24px;
  --radius-sm: 8px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'M PLUS 1', sans-serif;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* Background Pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.03;
  background-image: 
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      rgba(255,255,255,0.5) 2px,
      rgba(255,255,255,0.5) 4px
    );
}

/* Subtle grid overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.015;
  background-size: 60px 60px;
  background-image:
    linear-gradient(to right, rgba(255,255,255,1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,1) 1px, transparent 1px);
}

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

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to bottom, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav-logo {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

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

.nav-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* Rhombus accent on active */
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 6px;
  height: 6px;
  background: var(--accent);
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav {
    padding: 1rem 1.25rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    padding: 1rem;
    border-radius: 0 0 var(--radius) var(--radius);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    padding: 0.75rem 1rem;
  }
}

/* =========================================== 
   Main Layout
   =========================================== */

.main {
  padding: 7rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .main {
    padding: 6rem 1.25rem 3rem;
  }
}

/* =========================================== 
   Page Header
   =========================================== */

.page-header {
  margin-bottom: 3rem;
  position: relative;
}

.page-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

/* Cut corner rhombus accent */
.page-title::after {
  content: '';
  position: absolute;
  top: 0;
  right: -1.5rem;
  width: 12px;
  height: 12px;
  background: var(--accent);
  transform: rotate(45deg);
}

.page-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: 0.05em;
}

/* =========================================== 
   Cards - The Core UI Component
   =========================================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* Cut corner variant */
.card--cut {
  border-radius: var(--radius) 0 var(--radius) 0;
  clip-path: polygon(
    0 0,
    calc(100% - 20px) 0,
    100% 20px,
    100% 100%,
    20px 100%,
    0 calc(100% - 20px)
  );
}

/* Rhombus accent on card */
.card--accent::before {
  content: '';
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 8px;
  height: 8px;
  background: var(--accent);
  transform: rotate(45deg);
}

/* =========================================== 
   Post Cards (for the feed)
   =========================================== */

.posts-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all 0.3s ease;
  position: relative;
}

.post-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.post-tag {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.tag-announcement { background: rgba(255, 51, 102, 0.15); color: var(--accent); }
.tag-project { background: rgba(0, 204, 255, 0.15); color: var(--accent-alt); }
.tag-update { background: rgba(255, 255, 255, 0.08); color: var(--text-secondary); }
.tag-event { background: rgba(255, 204, 0, 0.15); color: #ffcc00; }

.post-title {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.post-date {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.post-content {
  color: var(--text-secondary);
  line-height: 1.7;
  font-weight: 300;
}

/* =========================================== 
   Content Sections
   =========================================== */

.section {
  margin-bottom: 3rem;
}

.section-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* =========================================== 
   Grid Layouts
   =========================================== */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* =========================================== 
   Buttons & Links
   =========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: #ff1a53;
  border-color: #ff1a53;
}

/* Cut corner button */
.btn--cut {
  border-radius: var(--radius-sm) 0 var(--radius-sm) 0;
  clip-path: polygon(
    0 0,
    calc(100% - 10px) 0,
    100% 10px,
    100% 100%,
    10px 100%,
    0 calc(100% - 10px)
  );
}

/* =========================================== 
   Form Elements
   =========================================== */

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 1rem;
  font-family: 'M PLUS 1', sans-serif;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

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

.footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--text-primary);
}

@media (max-width: 600px) {
  .footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* =========================================== 
   Utility Classes
   =========================================== */

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* =========================================== 
   Decorative Elements
   =========================================== */

/* Floating rhombus decoration */
.deco-rhombus {
  position: fixed;
  width: 100px;
  height: 100px;
  border: 1px solid var(--border);
  transform: rotate(45deg);
  opacity: 0.3;
  pointer-events: none;
}

.deco-rhombus--1 {
  top: 20%;
  right: 5%;
}

.deco-rhombus--2 {
  bottom: 30%;
  left: 3%;
  width: 60px;
  height: 60px;
}

/* Scan line effect (subtle) */
@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

.scanline {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  opacity: 0.03;
  animation: scanline 8s linear infinite;
  pointer-events: none;
  z-index: 1000;
}
