/* ── Tau-inspired design system for samoila.io ── */

@import url('https://fonts.googleapis.com/css2?family=Charter:ital,wght@0,400;0,700;1,400&family=IBM+Plex+Mono:wght@400;500&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #f9f8f5;
  --grid: #d8dce8;
  --text: #1a1a2e;
  --text-dim: #6b7280;
  --accent: #d4686a;     /* pink-red for numbers */
  --blue: #5b7fbf;       /* muted blue for links */
  --navy: #16213e;       /* dark for code blocks */
  --border: #e5e7eb;
  --font-serif: 'Charter', 'Georgia', 'Times New Roman', serif;
  --font-mono: 'IBM Plex Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', system-ui, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Grid Background ── */
.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 0.5px, transparent 0.5px),
    linear-gradient(90deg, var(--grid) 0.5px, transparent 0.5px);
  background-size: 30px 30px;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 30%, transparent 70%);
}

/* ── Navigation ── */
.nav {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.nav-home {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--navy);
}
.nav-symbol { font-size: 1.4rem; }
.nav-label { font-weight: 500; }
.nav-version {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.nav-links { display: flex; gap: 1.8rem; }
.nav-links a {
  text-decoration: none;
  color: var(--text-dim);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }

/* ── Main ── */
main {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

/* ── Hero ── */
.hero {
  padding: 3rem 0 2rem;
  position: relative;
}
.hero-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--navy);
  max-width: 700px;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.hero-desc {
  margin-top: 1.2rem;
  max-width: 580px;
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.7;
}
.hero-desc strong { color: var(--text); }

/* ── Hero Terminal ── */
.hero-terminal {
  margin-top: 2rem;
  max-width: 520px;
  background: var(--navy);
  border-radius: 6px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #0f172a;
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.terminal-title {
  margin-left: 8px;
  color: #94a3b8;
  font-size: 0.72rem;
}
.terminal-body {
  padding: 14px 18px;
  color: #e2e8f0;
  line-height: 1.8;
}
.prompt { color: var(--accent); margin-right: 6px; }
.dim { color: #64748b; }

/* ── Hero Graphic (circle + sine) ── */
.hero-graphic {
  position: absolute;
  top: 0;
  right: -2rem;
  width: 280px;
  opacity: 0.6;
  pointer-events: none;
  color: var(--text);
}
.hero-graphic svg { width: 100%; height: auto; }

/* ── Home Sections ── */
.home-sections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 3rem 0 2rem;
}
.home-sections section {
  position: relative;
  padding-top: 2.5rem;
}
.section-num {
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.home-sections h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 0.6rem;
  color: var(--navy);
}
.home-sections p {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.65;
}

/* ── CTA Strip ── */
.cta-strip {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.cta-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--blue);
  text-decoration: none;
  transition: color 0.15s;
}
.cta-link:hover { color: var(--navy); }

/* ── Page Header ── */
.page-header {
  padding: 2rem 0 1.5rem;
}
.page-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  color: var(--navy);
}

/* ── Projects & Writing List ── */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.projects-list article {
  position: relative;
  padding-left: 3rem;
  max-width: 700px;
}
.projects-list .section-num {
  position: absolute;
  top: 0.3rem;
  left: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
}
.projects-list time {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
}
.projects-list h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: var(--navy);
}
.projects-list p {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 0.8rem;
}
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tech-tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 8px;
  background: color-mix(in srgb, var(--blue) 8%, transparent);
  color: var(--blue);
  border-radius: 3px;
}
.read-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--blue);
  text-decoration: none;
}
.read-link:hover { text-decoration: underline; }

/* ── Contact ── */
.contact-content {
  max-width: 580px;
}
.contact-content > p {
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 2rem;
}
.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.channel {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}
.channel-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  min-width: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.channel-link {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
}
.channel-link:hover { color: var(--blue); }
.pgp-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.pgp-key {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: color-mix(in srgb, var(--navy) 4%, transparent);
  padding: 14px;
  border-radius: 4px;
  color: var(--text-dim);
  overflow-x: auto;
}

/* ── Footer ── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  margin-top: 3rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.footer-inner a {
  color: var(--text-dim);
  text-decoration: none;
}
.footer-inner a:hover { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .home-sections { grid-template-columns: 1fr; gap: 2rem; }
  .hero-graphic { display: none; }
  .projects-list article { padding-left: 0; }
  .projects-list .section-num {
    position: static;
    display: block;
    margin-bottom: 0.5rem;
  }
}
@media (max-width: 600px) {
  .nav { flex-direction: column; gap: 0.8rem; align-items: flex-start; }
  .hero h1 { font-size: 1.6rem; }
  .hero-terminal { max-width: 100%; }
  .cta-strip { flex-direction: column; gap: 1rem; }
  .footer-inner { flex-direction: column; gap: 0.8rem; }
}
