/* ============================================================
   stylesheet.css — John Kirima Personal Landing Page
   Brutalist / Terminal Aesthetic
   ============================================================ */

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

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

/* ── Custom Properties ── */
:root {
  --bg: #050505;
  --fg: #FFFFFF;
  --secondary: #CCCCCC;
  --muted: #666666;
  --divider: #222222;
  --tag-bg: #1A1A1A;
  --card-bg: #0A0A0A;
  --mono: 'Space Mono', 'Courier New', 'Consolas', monospace;
}

/* ── Selection ── */
::selection {
  background: var(--fg);
  color: var(--bg);
}

/* ── Base ── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Navigation ── */
nav {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  gap: 0.25rem;
  background: rgba(20, 20, 20, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--divider);
  padding: 0.5rem 0.75rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  transition: color 0.2s ease;
}

nav a:hover,
nav a:focus {
  color: var(--fg);
  outline: none;
}

nav .sep {
  color: #333;
  padding: 0.35rem 0;
  user-select: none;
}

/* ── Sections ── */
section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 8vw;
  position: relative;
}

.section-label {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3rem;
  font-weight: 400;
}

.section-label::before {
  content: '// ';
  color: #444;
}

/* ── Hero ── */
#hero {
  padding-top: 15vh;
  padding-bottom: 10vh;
}

.hero-name {
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
  color: var(--fg);
}

.hero-name span {
  display: block;
}

.hero-tag {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  max-width: 40ch;
  line-height: 1.8;
}

.hero-tag .highlight {
  color: var(--fg);
}

.hero-meta {
  margin-top: 4rem;
  display: flex;
  gap: 4rem;
  font-size: 0.65rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.hero-meta span::before {
  content: '→ ';
  color: #333;
}

.blink {
  animation: blink 1.2s step-end infinite;
}

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

/* ── About ── */
.about-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 4rem;
  max-width: 900px;
  align-items: start;
}

.about-photo {
  flex-shrink: 0;
}

.headshot {
  display: block;
  width: 100%;
  max-width: 220px;
  border: 1px solid #333;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.about-text {
  font-size: 0.85rem;
  line-height: 2;
  color: var(--secondary);
}

.about-text p {
  margin-bottom: 1.2rem;
}

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

.about-text strong {
  color: var(--fg);
  font-weight: 400;
}

.about-stats {
  display: flex;
  flex-direction: row;
  gap: 2.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stat-item {
  border-left: 1px solid #333;
  padding-left: 1rem;
}

.stat-val {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--fg);
  display: block;
  margin-bottom: 0.25rem;
}

.stat-label {
  color: var(--muted);
}

/* ── Skills ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  max-width: 900px;
}

.skill-group h3 {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--muted);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--divider);
}

.skill-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.skill-group li {
  font-size: 0.8rem;
  color: var(--secondary);
  transition: color 0.2s ease;
}

.skill-group li::before {
  content: '_ ';
  color: #444;
}

.skill-group li:hover {
  color: var(--fg);
}

/* ── Projects ── */
.projects-list {
  display: flex;
  flex-direction: column;
  max-width: 900px;
  border-top: 1px solid var(--divider);
}

.project-item {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: baseline;
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--divider);
  transition: background 0.2s ease;
}

.project-item:hover {
  background: rgba(255, 255, 255, 0.015);
  padding-left: 1rem;
  padding-right: 1rem;
  margin-left: -1rem;
  margin-right: -1rem;
}

.project-num {
  font-size: 0.65rem;
  color: #444;
  font-weight: 700;
}

.project-info h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg);
}

.project-info p {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 50ch;
}

.project-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.project-tech {
  font-size: 0.6rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  white-space: nowrap;
}

.project-link {
  font-size: 0.6rem;
  color: var(--secondary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.project-link:hover,
.project-link:focus {
  color: var(--fg);
  text-decoration: underline;
}

/* ── Experience ── */
.exp-list {
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.exp-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
}

.exp-date {
  font-size: 0.65rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding-top: 0.2rem;
}

.exp-detail h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg);
}

.exp-detail .org {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.exp-detail p {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.8;
}

/* ── Contact ── */
#contact {
  min-height: 80vh;
}

.contact-big {
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
  color: var(--fg);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.contact-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #1a1a1a;
  transition: all 0.2s ease;
  max-width: 500px;
}

.contact-links a:hover,
.contact-links a:focus {
  color: var(--fg);
  padding-left: 1rem;
  border-bottom-color: #444;
  outline: none;
}

.contact-links a .arrow {
  margin-left: auto;
  color: #333;
  transition: color 0.2s ease;
}

.contact-links a:hover .arrow {
  color: var(--fg);
}

/* ── Footer ── */
footer {
  padding: 4rem 8vw 8rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border-top: 1px solid #111;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  section {
    padding: 4rem 6vw;
  }

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

  .about-stats {
    flex-direction: column;
    gap: 1.5rem;
  }

  .about-photo {
    text-align: left;
  }

  .headshot {
    max-width: 160px;
  }

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

  .project-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .project-num {
    display: none;
  }

  .project-meta {
    align-items: flex-start;
    flex-direction: row;
    gap: 1.5rem;
  }

  .project-tech {
    text-align: left;
  }

  .exp-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .hero-meta {
    flex-direction: column;
    gap: 1rem;
  }

  nav {
    bottom: 1rem;
    font-size: 0.55rem;
  }

  footer {
    padding-bottom: 6rem;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  section {
    padding: 3rem 5vw;
  }

  nav {
    padding: 0.4rem 0.5rem;
    gap: 0.15rem;
  }
}
