/* ================================
   Luke Nichols — Portfolio
   System fonts, zero dependencies.
   ================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0a;
  --surface: #111;
  --border: #1e1e1e;
  --text: #e5e5e5;
  --muted: #888;
  --accent: #4a9eff;
  --max-w: 880px;
  --nav-h: 56px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

.muted {
  color: var(--muted);
}


/* —— NAV —— */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  z-index: 100;
  transition: background .25s, border-color .25s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(10, 10, 10, .9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -.01em;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-size: 14px;
  color: var(--muted);
  transition: color .15s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform .2s, opacity .2s;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}


/* —— HERO —— */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.hero-img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
}

.hero .muted {
  font-size: 16px;
}

.hero-links {
  display: flex;
  gap: 24px;
  margin-top: 8px;
}

.hero-links a {
  font-size: 14px;
  color: var(--muted);
  transition: color .15s;
  border-bottom: 1px solid transparent;
}

.hero-links a:hover {
  color: var(--text);
  border-color: var(--text);
}


/* —— SECTIONS —— */

.section {
  padding: 80px 24px;
}

.section.alt {
  background: var(--surface);
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin-bottom: 24px;
}

.section>.container>.muted {
  max-width: 560px;
  line-height: 1.7;
}





/* —— PROJECT CARDS —— */

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .2s;
}

.card:hover {
  border-color: #333;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.card h3 {
  font-size: 15px;
  font-weight: 600;
}

.card-links {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.card-links a {
  font-size: 12px;
  color: var(--muted);
  transition: color .15s;
}

.card-links a:hover {
  color: var(--accent);
}

.card .muted {
  font-size: 14px;
  line-height: 1.6;
  flex-grow: 1;
}

.card-tech {
  font-size: 12px;
  color: var(--muted);
}


/* —— CONTACT —— */

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  background: var(--accent);
  color: var(--bg);
  transition: opacity .15s;
}

.btn:hover {
  opacity: .85;
}

.btn.outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn.outline:hover {
  border-color: #444;
}


/* —— FOOTER —— */

.footer {
  padding: 32px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer p {
  font-size: 12px;
}


/* —— RESPONSIVE —— */

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    width: 100%;
    flex-direction: column;
    background: rgba(10, 10, 10, .95);
    backdrop-filter: blur(12px);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s, opacity .25s;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .hero-img {
    width: 120px;
    height: 120px;
  }

  .section {
    padding: 56px 20px;
  }

  .contact-links {
    flex-direction: column;
  }

  .btn {
    text-align: center;
  }
}