@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --color-bg: #0B0F14;
  --color-surface: #131920;
  --color-surface-2: #1A2231;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-text: #E8EDF2;
  --color-text-muted: #7A8A9A;
  --color-accent: #00D4FF;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --nav-height: 64px;
}

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

html, body {
  width: 100%;
  min-height: 100%;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Noise texture overlay — inner pages only */
body.inner-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('../gallery/noise.png');
  background-repeat: repeat;
  opacity: 0.035;
  pointer-events: none;
  z-index: 0;
}

/* ─── Site Nav ─────────────────────────────────────────── */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 100;
  background: rgba(11, 15, 20, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: background 0.2s ease;
}

.site-nav.scrolled {
  background: rgba(11, 15, 20, 0.92);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.nav-logo {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-logo span {
  color: var(--color-accent);
}

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

.nav-item {
  position: relative;
}

.nav-item > a,
.nav-item > button {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.375rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-item > a:hover,
.nav-item > button:hover,
.nav-item.open > a,
.nav-item.open > button {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item > a.nav-disabled {
  color: rgba(122, 138, 154, 0.4);
  cursor: default;
  pointer-events: none;
}

.nav-chevron {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s;
}

.nav-item.open .nav-chevron {
  transform: rotate(-135deg) translateY(-2px);
}

/* ─── Dropdown Panel ─────────────────────────────────────── */

.dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 480px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.nav-item.open .dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: var(--color-surface-2);
}

.dropdown-item .item-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.2rem;
}

.dropdown-item .item-desc {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ─── Hamburger / Mobile ─────────────────────────────────── */

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text-muted);
  border-radius: 2px;
  transition: background 0.15s;
}

.nav-hamburger:hover span {
  background: var(--color-text);
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 200;
  overflow-y: auto;
  padding: 1.5rem 2rem 3rem;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

.mobile-menu-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  line-height: 1;
  padding: 4px 8px;
}

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

.mobile-nav-links a {
  display: block;
  padding: 0.75rem 0;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav-section {
  padding: 0.5rem 0 0.25rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  font-weight: 600;
  margin-top: 1rem;
}

/* ─── Page Shell ─────────────────────────────────────────── */

.page-body {
  padding-top: var(--nav-height);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ─── Hero Section ───────────────────────────────────────── */

.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 7rem 2rem 5rem;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--color-text);
  max-width: 800px;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

/* ─── Buttons ────────────────────────────────────────────── */

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.4rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s, background 0.2s;
}

.btn-primary {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}

.btn-primary:hover {
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.05);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.btn-ghost:hover {
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

/* ─── Section Container ──────────────────────────────────── */

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.section h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.section-lead {
  font-size: 1rem;
  color: var(--color-text-muted);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 3rem;
}

/* ─── Cards ──────────────────────────────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.07);
}

.card-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 1rem;
  color: var(--color-accent);
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.card-attrs {
  list-style: none;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.card-attrs li {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  padding-left: 1rem;
  position: relative;
}

.card-attrs li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  opacity: 0.6;
}

/* ─── Mailto Card ────────────────────────────────────────── */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  max-width: 680px;
}

.mailto-card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 2rem 1.75rem;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.mailto-card:hover {
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: 0 0 28px rgba(0, 212, 255, 0.1);
}

.mailto-card .mail-address {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.mailto-card .mail-label {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ─── Terminal Block ─────────────────────────────────────── */

.terminal-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--color-text-muted);
  max-width: 560px;
  margin-top: 2rem;
}

.terminal-block .t-key {
  color: var(--color-accent);
}

.terminal-block .t-str {
  color: #a8d8a8;
}

.terminal-block .t-arr {
  color: #e8d9a0;
}

/* ─── Philosophy / Prose ─────────────────────────────────── */

.prose {
  max-width: 640px;
}

.prose p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* ─── Divider ────────────────────────────────────────────── */

.section-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0;
}

/* ─── Footer ─────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 3.5rem 2rem 2rem;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 200px repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .footer-logo {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.footer-brand .footer-logo span {
  color: var(--color-accent);
}

.footer-brand p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col a {
  font-size: 0.83rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: var(--color-text);
}

.footer-col a.disabled {
  color: rgba(122, 138, 154, 0.4);
  pointer-events: none;
  cursor: default;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-text-muted);
  transition: color 0.15s;
}

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

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3ecf6a;
  box-shadow: 0 0 6px rgba(62, 207, 106, 0.5);
}

/* ─── Responsive ─────────────────────────────────────────── */

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

  .nav-hamburger {
    display: flex;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

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

  .hero {
    padding: 5rem 1.5rem 4rem;
  }

  .section {
    padding: 3.5rem 1.5rem;
  }

  .dropdown-panel {
    grid-template-columns: 1fr;
    min-width: 280px;
  }
}
