/* ============================================
   Nathan Curtis — Portfolio
   Clean, fast, deliberate.
   ============================================ */

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

:root {
  --color-bg: #09090b;
  --color-surface: #131316;
  --color-surface-hover: #18181d;
  --color-surface-raised: #1c1c22;
  --color-text: #ececef;
  --color-text-secondary: #a0a0ab;
  --color-text-muted: #52525a;
  --color-accent: #5b9fc0;
  --color-accent-hover: #7db8d6;
  --color-accent-dim: rgba(91, 159, 192, 0.08);
  --color-accent-glow: rgba(91, 159, 192, 0.12);
  --color-accent-2: #7c6fb0;
  --color-border: #1e1e24;
  --color-border-light: #161619;
  --color-tag-bg: #16161b;
  --color-tag-text: #78788a;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-serif: 'Lora', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --pad-x: 3.5rem;
  --text-measure: 60ch;
  --nav-height: 60px;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Dot grid background (disabled) ---
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}
*/

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text);
}

h1 {
  font-size: 1.8rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--color-text-secondary);
  max-width: var(--text-measure);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-accent-hover);
}

strong {
  font-weight: 600;
  color: var(--color-text);
}

/* --- Navigation --- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

nav .nav-inner {
  width: 100%;
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav .nav-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

nav .nav-name:hover {
  color: var(--color-accent);
}

nav .nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

nav .nav-links a {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 450;
  transition: color 0.2s ease, background 0.2s ease;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
}

nav .nav-links a:hover {
  color: var(--color-text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

nav .nav-links a.active {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text);
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* --- Layout --- */
main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  padding: 2.5rem var(--pad-x) 4rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-accent);
  color: #09090b;
  border: 1px solid var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #09090b;
  box-shadow: 0 0 20px rgba(91, 159, 192, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.btn-ghost:hover {
  color: var(--color-text);
  border-color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.03);
}

/* --- Hero (Home) --- */
.hero-wrapper {
  position: relative;
}

.hero-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 11, 0.72);
  z-index: -1;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: -120px;
  left: -100px;
  width: 600px;
  height: 400px;
  background: radial-gradient(
    ellipse at center,
    rgba(91, 159, 192, 0.1) 0%,
    rgba(124, 111, 176, 0.05) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 2;
}

.hero-main {
  position: relative;
  z-index: 3;
  padding: 4rem var(--pad-x) 3rem;
}

.hero-tag {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: 3.2rem;
  letter-spacing: -0.035em;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-text);
}

.hero .intro {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  max-width: var(--text-measure);
  line-height: 1.75;
  margin-bottom: 1.75rem;
}

.hero-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

/* --- Section --- */
.section {
  margin-bottom: 3.5rem;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--color-border), transparent);
}

/* --- Project Grid (Homepage) --- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

/* --- Project Cards --- */
.project-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.project-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  transition: all 0.25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.project-card-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color-border);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  background: var(--color-surface-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(91, 159, 192, 0.06);
}

.project-card:hover .project-card-accent {
  background: linear-gradient(to bottom, var(--color-accent), var(--color-accent-2));
  box-shadow: 0 0 12px rgba(91, 159, 192, 0.3);
}

.project-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.project-card h3 a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.project-card .project-desc {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.6;
  flex: 1;
  max-width: none;
}

.project-card .project-detail {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.5rem;
  line-height: 1.65;
  max-width: none;
}

.project-card .project-detail strong {
  color: var(--color-text);
  font-weight: 550;
}

.project-card .project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 1rem;
}

.project-card .tag {
  font-size: 0.73rem;
  font-family: var(--font-mono);
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 400;
  border: 1px solid var(--color-border);
}

.project-card .project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.25rem;
  font-size: 0.88rem;
  font-weight: 500;
}

/* --- Resume --- */
.resume-section {
  margin-bottom: 2.5rem;
}

.resume-section h2 {
  font-size: 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.resume-section h2::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--color-accent);
  opacity: 0.5;
  flex-shrink: 0;
}

.resume-entry {
  margin-bottom: 1.75rem;
}

.resume-entry h3 {
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.resume-entry .meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
}

.resume-entry ul {
  list-style: none;
  padding: 0;
  columns: 2;
  column-gap: 2.5rem;
}

.resume-entry li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  break-inside: avoid;
}

.resume-entry li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0.4;
}

.capability-domains {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.domain {
  padding: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.domain::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--color-accent), var(--color-accent-2));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.domain:hover {
  border-color: rgba(91, 159, 192, 0.15);
  background: var(--color-surface-hover);
  transform: translateY(-1px);
}

.domain:hover::before {
  opacity: 1;
}

.domain h3 {
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--color-text);
  font-weight: 550;
}

.domain p {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.55;
  max-width: none;
}

.resume-download {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-accent);
  margin-top: 0.5rem;
  padding: 0.45rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.resume-download:hover {
  color: var(--color-accent-hover);
  border-color: var(--color-accent);
  background: var(--color-accent-dim);
  box-shadow: 0 0 16px rgba(91, 159, 192, 0.15);
}

/* --- About --- */
.about-content p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
  max-width: 90ch;
}

.about-section {
  margin-bottom: 2.75rem;
}

/* --- Poetry --- */
.poem {
  margin-bottom: 0;
  min-width: 0;
  padding: 1.75rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  border-left: 3px solid var(--color-border);
  transition: border-left-color 0.3s ease, box-shadow 0.3s ease;
}

.poem:hover {
  border-left-color: var(--color-accent);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.poem h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  font-style: italic;
  color: var(--color-text);
}

.poem .poem-date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
}

.poems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  max-width: calc(4 * 480px + 3 * 1rem);
  gap: 1rem;
  align-items: start;
}

.poem .poem-body {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--color-text-secondary);
  white-space: pre-line;
}

.poem .poem-body .stanza {
  margin-bottom: 0.35rem;
}

.poem .poem-body .stanza:last-child {
  margin-bottom: 0;
}

/* --- Contact / Footer --- */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--color-border);
  padding: 2.5rem var(--pad-x);
}

.contact-links {
  display: flex;
  justify-content: flex-start;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.contact-links a {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  font-weight: 450;
  transition: color 0.2s ease;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}

.contact-links a:hover {
  color: var(--color-accent);
  background: rgba(91, 159, 192, 0.06);
}

footer .copyright {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  opacity: 0.5;
}

/* --- Page transition --- */
main {
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Responsive --- */
@media (max-width: 1200px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .capability-domains {
    grid-template-columns: repeat(2, 1fr);
  }

  .resume-entry ul {
    columns: 1;
  }
}

@media (max-width: 768px) {
  :root {
    --pad-x: 1.25rem;
  }

  html {
    font-size: 16px;
  }

  body::before {
    background-size: 20px 20px;
  }

  nav .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(9, 9, 11, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 0.75rem 1rem;
    gap: 0.25rem;
  }

  nav .nav-links a {
    padding: 0.5rem 0.75rem;
  }

  nav .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-video {
    display: none;
  }

  .hero-overlay {
    background: var(--color-bg);
  }

  .hero-glow {
    width: 350px;
    height: 250px;
    top: -80px;
  }

  .project-grid,
  .project-list {
    grid-template-columns: 1fr;
  }

  .capability-domains {
    grid-template-columns: 1fr;
  }

  .contact-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .poems-grid {
    grid-template-columns: 1fr;
  }

  .poem {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.85rem;
  }

  .hero-links {
    flex-direction: column;
  }

  .hero-links .btn {
    text-align: center;
    justify-content: center;
  }

  .project-card {
    padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  }

  .project-card:hover {
    transform: none;
  }

  .domain:hover {
    transform: none;
  }
}
