/* ============================================================
   YORA1928 — Visual System
   Dark technical interface. Restrained. Editorial.
   ============================================================ */

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

:root {
  --bg: #080A0D;
  --bg-muted: #0D1116;
  --text: #F2F4F7;
  --text-secondary: #8A929E;
  --border: #20252C;
  --accent: #8FD3FF;
  --accent-dim: rgba(143, 211, 255, 0.08);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --max-width: 1120px;
  --content-width: 720px;
  --gutter: 24px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); }
h4 { font-size: 1rem; }

p {
  max-width: var(--content-width);
  color: var(--text-secondary);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

a:hover {
  opacity: 0.8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Section labels --- */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* --- Metadata --- */
.meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.meta-accent {
  color: var(--accent);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: 80px 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

@media (max-width: 640px) {
  .section { padding: 56px 0; }
  :root { --gutter: 20px; }
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 10, 13, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  opacity: 1;
}

.brand-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
}

/* Desktop nav */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-desktop a {
  font-size: 0.85rem;
  font-weight: 450;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
  opacity: 1;
}

.nav-desktop .nav-external {
  color: var(--accent);
}

/* Mobile menu button */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 4px;
  transition: border-color 0.15s ease;
}

.nav-toggle:hover {
  border-color: var(--text-secondary);
}

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: block; }
}

/* Mobile menu overlay */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  top: 64px;
  background: var(--bg);
  z-index: 99;
  padding: 32px var(--gutter);
  flex-direction: column;
  gap: 8px;
}

.mobile-menu.is-open {
  display: flex;
}

.mobile-menu a {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.mobile-menu a:hover {
  text-decoration: none;
  opacity: 1;
  color: var(--accent);
}

/* --- Hero --- */
.hero {
  padding: 120px 0 80px;
}

@media (max-width: 640px) {
  .hero { padding: 72px 0 48px; }
}

.hero-name {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-name .accent {
  color: var(--accent);
}

.hero-domains {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  margin-bottom: 28px;
}

.hero-domains .sep {
  margin: 0 8px;
  opacity: 0.4;
}

.hero-tagline {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  color: var(--text);
  max-width: 560px;
  line-height: 1.5;
  margin-bottom: 40px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1;
}

.btn:hover {
  text-decoration: none;
  opacity: 1;
}

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

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

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--text-secondary);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.72rem;
}

/* --- Cards --- */
.card {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: #2a3038;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.card-title a {
  color: inherit;
  text-decoration: none;
}

.card-title a:hover {
  color: var(--accent);
  text-decoration: none;
  opacity: 1;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  max-width: none;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 3px;
  white-space: nowrap;
}

.tag-accent {
  color: var(--accent);
  border-color: rgba(143, 211, 255, 0.2);
  background: var(--accent-dim);
}

/* --- Grids --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

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

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

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

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

/* --- Focus areas --- */
.focus-item {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-muted);
}

.focus-item h3 {
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--text);
}

.focus-item p {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: none;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.footer-tagline {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: none;
  opacity: 1;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
}

/* --- Article / Research detail --- */
.article-header {
  padding: 80px 0 40px;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 16px;
}

.article-body {
  padding: 48px 0 80px;
  max-width: var(--content-width);
}

.article-body h2 {
  font-size: 1.3rem;
  margin: 40px 0 12px;
  color: var(--text);
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body p {
  margin-bottom: 16px;
  max-width: none;
}

.article-body ul,
.article-body ol {
  margin: 0 0 16px 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.article-body li {
  margin-bottom: 6px;
}

.article-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--accent);
}

.article-body pre {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
  overflow-x: auto;
  margin: 20px 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
}

.article-body pre code {
  background: none;
  padding: 0;
  color: var(--text);
}

/* --- Timeline --- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  position: relative;
  padding-left: 28px;
  padding-bottom: 24px;
  border-left: 1px solid var(--border);
}

.timeline li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.timeline-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* --- 404 --- */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 0;
}

.error-code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 15vw, 8rem);
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  margin-bottom: 16px;
}

.error-page h1 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.error-page p {
  margin-bottom: 32px;
}

/* --- Utility --- */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.mono { font-family: var(--font-mono); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
