:root {
  --black: #000000;
  --gold: #8c7a35;
  --gold-light: #b8a050;
  --gold-bright: #d4b85a;
  --gold-dim: #5a4f22;
  --gold-faint: #1e1a0a;
  --text: #c8aa58;
  --text-muted: #7a6a30;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--black);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

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

#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem 2rem;
  position: relative;
  background: var(--black);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.logo {
  width: min(420px, 80vw);
  height: auto;
}

#hero h1 {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.tagline {
  font-size: clamp(0.75rem, 2vw, 1rem);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-nav {
  display: flex;
  gap: 2.5rem;
  margin-top: 1rem;
}

.hero-nav a {
  color: var(--gold);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}

.hero-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gold-bright);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.hero-nav a:hover { color: var(--gold-bright); }
.hero-nav a:hover::after { transform: scaleX(1); }

.hero-rule {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-dim), transparent);
}

/* ── Sections ────────────────────────────────────────── */

section {
  padding: 3rem 2rem;
  position: relative;
}

section + section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-dim), transparent);
}

.section-inner {
  max-width: 900px;
  margin: 0 auto;
}

h2 {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 600;
  color: var(--gold-bright);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-bottom: 2.5rem;
}

.section-sub a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}

.section-sub a:hover { color: var(--gold-bright); }

/* ── Repos grid ──────────────────────────────────────── */

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

.repo-loading {
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
}

.repo-card {
  border: 1px solid var(--gold-dim);
  padding: 1.5rem;
  background: var(--gold-faint);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: relative;
  overflow: hidden;
}

.repo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--gold-dim), transparent);
  transition: background 0.2s;
}

.repo-card:hover {
  border-color: var(--gold);
  background: #2a2208;
  transform: translateY(-2px);
}

.repo-card:hover::before {
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.repo-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold-bright);
  letter-spacing: 0.1em;
}

.repo-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.repo-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--gold-dim);
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.repo-lang::before {
  content: '◆ ';
  font-size: 0.6rem;
}

.repo-stars::before { content: '★ '; }

.repo-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  grid-column: 1 / -1;
}

/* ── About ───────────────────────────────────────────── */

.about-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ── Contact ─────────────────────────────────────────── */

.contact-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--gold);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--gold-dim);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.contact-link:hover {
  color: var(--gold-bright);
  border-color: var(--gold);
  background: var(--gold-faint);
}

/* ── Contact form ────────────────────────────────────── */

.hidden { display: none !important; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 560px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-row label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-row input,
.form-row textarea {
  background: #0a0900;
  border: 1px solid var(--gold-dim);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: var(--gold-dim);
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--gold);
}

.submit-btn {
  align-self: flex-start;
  background: transparent;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 0.75rem 2rem;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.submit-btn:hover {
  color: var(--gold-bright);
  border-color: var(--gold);
  background: var(--gold-faint);
}

.form-success {
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  padding: 1.5rem 0;
}

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

footer {
  text-align: center;
  padding: 2.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
  border-top: 1px solid #1a1500;
}

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

@media (max-width: 600px) {
  .hero-nav { gap: 1.5rem; }
  .repos-grid { grid-template-columns: 1fr; }
  .contact-link { width: 100%; justify-content: center; }
}
