/* ============================================================
   Red Gabriel Tagura — Portfolio
   Theme: Terminal-editorial, systems-programmer aesthetic
   Tailwind v4 standalone output + custom layer
   ============================================================ */

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

:root {
  --ink: #0f0f0f;
  --paper: #f9f8f6;
  --muted: #6b6b6b;
  --rule: #d4d0c8;
  --accent: #c0392b;
  --accent-dim: #f5e8e7;
  --code-bg: #f0ede8;
  --font-display: Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Typography --- */
.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.mono {
  font-family: var(--font-mono);
}

/* --- Layout --- */
.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container--wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- Navbar --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: 0.75rem 0;
}

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

.nav__brand {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--ink);
  text-decoration: none;
}

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

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

.nav__links a {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav__links a:hover {
  color: var(--ink);
  text-decoration: none;
}

/* --- Breadcrumb --- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 2rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); text-decoration: none; }
.breadcrumb span { color: var(--rule); }

/* --- Hero Section --- */
.hero {
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--rule);
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.0;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.hero__title {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 2rem;
}

.hero__rule {
  height: 1px;
  background: var(--rule);
  margin: 2rem 0;
}

.hero__bio p {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  margin-bottom: 1rem;
}

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

/* Cursor blink */
.cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  margin-left: 4px;
  vertical-align: middle;
  animation: blink 1.1s step-end infinite;
}

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

/* --- Browse / Nav Box --- */
.browse-box {
  border-left: 3px solid var(--rule);
  padding: 1.5rem 2rem;
  margin: 3rem 0;
  background: transparent;
}

.browse-box__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.browse-box__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.browse-box__links a {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.15s;
}

.browse-box__links a::before {
  content: '→';
  color: var(--accent);
  font-size: 0.875rem;
}

.browse-box__links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.browse-box__links span {
  color: var(--muted);
}

/* --- Section --- */
.section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--rule);
}

.section__header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.section__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.section__title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* --- Skills / Tags --- */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink);
  white-space: nowrap;
}

.tag--accent {
  background: var(--accent-dim);
  border-color: #e8c0be;
  color: var(--accent);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* --- Project Cards --- */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.project-card {
  border-top: 1px solid var(--rule);
  padding: 2rem 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-start: start;
  text-decoration: none;
  color: inherit;
  transition: none;
  cursor: pointer;
}

.project-card:last-child {
  border-bottom: 1px solid var(--rule);
}

.project-card:hover .project-card__name {
  color: var(--accent);
}

.project-card__body { min-width: 0; }

.project-card__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-card__name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  transition: color 0.15s;
}

.project-card__desc {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.project-card__tags { margin-top: 0.75rem; }

.project-card__arrow {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 1.1rem;
  align-self: center;
  transition: transform 0.15s, color 0.15s;
}

.project-card:hover .project-card__arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* Award badge */
.award-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  background: #fef9e7;
  border: 1px solid #f0d060;
  border-radius: 2px;
  color: #b8860b;
}

/* --- Experience --- */
.experience-item {
  border-top: 1px solid var(--rule);
  padding: 2rem 0;
}

.experience-item:last-child {
  border-bottom: 1px solid var(--rule);
}

.experience-item__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.experience-item__org {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.experience-item__date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.experience-item__role {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.experience-item__bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.experience-item__bullets li {
  font-size: 0.9375rem;
  line-height: 1.65;
  padding-left: 1.25rem;
  position: relative;
  color: var(--ink);
}

.experience-item__bullets li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* --- People Also Ask --- */
.faq {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-top: 1px solid var(--rule);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--rule);
}

.faq-item__question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.25rem 0;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item__question:hover {
  color: var(--accent);
}

.faq-item__icon {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  color: var(--muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.faq-item.open .faq-item__icon {
  transform: rotate(45deg);
}

.faq-item__answer {
  display: none;
  padding: 0 0 1.25rem 0;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.7;
}

.faq-item.open .faq-item__answer {
  display: block;
}

.faq-item__answer a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Links section --- */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.link-card {
  background: var(--paper);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: background 0.15s;
}

.link-card:hover {
  background: var(--accent-dim);
  text-decoration: none;
}

.link-card__icon {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.link-card__name {
  font-weight: 600;
  font-size: 0.9375rem;
}

.link-card__sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

/* --- Footer --- */
.footer {
  padding: 3rem 0;
  text-align: center;
}

.footer__mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.8;
}

.footer__mono a {
  color: var(--ink);
}

.footer__mono a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* --- Blog / Project page styles --- */
.page-hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--rule);
}

.page-hero__back {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 2rem;
  text-decoration: none;
  transition: color 0.15s;
}

.page-hero__back:hover {
  color: var(--accent);
  text-decoration: none;
}

.page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.page-hero__meta {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.page-hero__meta-item {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* --- Prose (blog content) --- */
.prose {
  padding: 3rem 0;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 1rem;
  color: var(--ink);
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  color: var(--ink);
}

.prose p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.prose ul, .prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.prose li {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--code-bg);
  border: 1px solid var(--rule);
  padding: 0.1em 0.4em;
  border-radius: 2px;
}

.prose pre {
  background: #1a1a1a;
  color: #e8e8e8;
  padding: 1.5rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: 0.875rem;
}

.prose blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--muted);
  font-style: italic;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

/* Syntax highlight colors (minimal) */
.token-keyword { color: #c0392b; }
.token-string { color: #27ae60; }
.token-comment { color: #888; }
.token-fn { color: #2980b9; }
.token-type { color: #8e44ad; }

/* --- Responsive --- */
@media (max-width: 640px) {
  .nav__links { gap: 1.25rem; }
  .hero { padding: 3rem 0 2.5rem; }
  .hero__name { font-size: 2.75rem; }
  .project-card { grid-template-columns: 1fr; }
  .project-card__arrow { display: none; }
  .links-grid { grid-template-columns: 1fr 1fr; }
  .experience-item__header { flex-direction: column; gap: 0.25rem; }
  .container { padding: 0 1.25rem; }
  .container--wide { padding: 0 1.25rem; }
}

/* --- Utility --- */
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-mono { font-family: var(--font-mono); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* --- Projects list page --- */
.projects-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--rule);
  background: transparent;
  cursor: pointer;
  border-radius: 2px;
  color: var(--muted);
  transition: all 0.15s;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}