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

:root {
  --text: #e8e8e8;
  --muted: #999;
  --border: #2a2a2a;
  --bg: #0e0e0e;
  --surface: #161616;
  --accent: #c8c8c8;
  --link: #a0a0a0;
  --link-hover: #fff;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}

a:hover {
  color: var(--link-hover);
  border-color: var(--link-hover);
}

.cv {
  max-width: 760px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

/* Header */
.cv-header {
  text-align: center;
  margin-bottom: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.name-spread {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 1rem;
}

.cv-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.tagline {
  font-size: 1.05rem;
  color: var(--muted);
  margin-top: 0.35rem;
  letter-spacing: 0.02em;
}

.contact {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.contact a {
  border-bottom: none;
}

.contact a:hover {
  color: var(--link-hover);
}

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

.section h2 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
  margin-bottom: 1.5rem;
}

.section-subtitle {
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

/* Entries */
.entry {
  margin-bottom: 1.75rem;
}

.entry:last-child {
  margin-bottom: 0;
}

.entry h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.meta {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.9rem;
}

.entry > .meta {
  display: block;
  margin-bottom: 0.3rem;
}

.entry p {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.entry ul {
  margin-top: 0.5rem;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.entry li {
  margin-bottom: 0.3rem;
}

.award {
  font-style: italic;
  color: var(--accent);
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.skill-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.skill-col ul {
  list-style: none;
  font-size: 0.9rem;
  color: var(--muted);
}

.skill-col li {
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border);
}

.skill-col li:last-child {
  border-bottom: none;
}

/* References */
.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.ref {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.ref h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.ref p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* Gallery */
.gallery {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.gallery figure {
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.gallery img {
  width: 100%;
  display: block;
  opacity: 0.9;
  transition: opacity 0.3s;
}

.gallery img:hover {
  opacity: 1;
}

.gallery figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.5rem 0.75rem;
  font-family: 'JetBrains Mono', monospace;
}

.gallery-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* Footer */
footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}

/* Responsive */
@media (max-width: 600px) {
  .cv {
    padding: 2.5rem 1.25rem;
  }

  .cv-header h1 {
    font-size: 1.6rem;
  }

  .name-spread {
    font-size: 0.6rem;
  }

  .contact {
    flex-direction: column;
    gap: 0.25rem;
  }

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

  .gallery-row {
    grid-template-columns: 1fr;
  }

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