/* ------------------------------------------------
   hugocbp.com — Personal Site
   ------------------------------------------------ */

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

:root {
  --color-bg: #fafaf9;
  --color-text: #1c1917;
  --color-muted: #78716c;
  --color-subtle: #a8a29e;
  --color-border: #e7e5e4;
  --color-surface: #f5f5f4;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 660px;
}

html {
  font-size: 17.6px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Nav --- */

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.nav-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-accent {
  color: #7f1d1d;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
}

.nav-links a {
  font-size: 0.8rem;
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--color-text);
}

/* --- Main --- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Hero --- */

.hero {
  padding: 5rem 0 4rem;
}

.hero-name {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero-light {
  font-weight: 300;
}

.hero-tagline {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--color-muted);
  line-height: 1.6;
}

/* --- Sections --- */

section {
  padding: 3rem 0;
  border-top: 1px solid var(--color-border);
}

h2 {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-subtle);
  margin-bottom: 1.5rem;
}

/* --- Now --- */

.now p {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

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

.now strong {
  font-weight: 600;
}

/* --- Projects --- */

.project {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.25rem;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--color-border);
}

.project:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.project:nth-child(even) {
  flex-direction: row-reverse;
}

.project-thumb {
  width: 120px;
  height: 80px;
  border-radius: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-thumb::after {
  content: attr(data-placeholder);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-subtle);
  letter-spacing: 0.05em;
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-body {
  flex: 1;
  min-width: 0;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.project-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.project-tech {
  font-size: 0.75rem;
  color: var(--color-subtle);
  white-space: nowrap;
}

.project p {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.65;
  margin-bottom: 0.625rem;
}

.project-link {
  font-size: 0.8rem;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.project-link:hover {
  color: var(--color-muted);
}

.project-label {
  font-size: 0.8rem;
  color: var(--color-subtle);
  font-style: italic;
}

/* --- About --- */

.about-text p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.75;
}

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

/* --- Contact --- */

.contact p {
  font-size: 0.95rem;
  color: var(--color-muted);
  margin-bottom: 1rem;
}

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

.contact-links a {
  font-size: 0.9rem;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}

.contact-links a:hover {
  border-color: var(--color-text);
}

/* --- Page Header (projects.html) --- */

.page-header {
  padding: 4rem 0 3rem;
}

.back-link {
  font-size: 0.8rem;
  color: var(--color-subtle);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 1.5rem;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--color-text);
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.page-header p {
  font-size: 0.95rem;
  color: var(--color-muted);
}

/* --- Project Detail (projects.html) --- */

.project-detail {
  padding: 3rem 0;
  border-top: 1px solid var(--color-border);
}

.project-detail h2 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-transform: none;
  margin-bottom: 0.375rem;
}

.detail-tech {
  font-size: 0.75rem;
  color: var(--color-subtle);
  display: block;
  margin-bottom: 1.5rem;
}

.detail-thumb {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  overflow: hidden;
}

.detail-thumb::after {
  content: attr(data-placeholder);
  font-size: 0.75rem;
  color: var(--color-subtle);
  letter-spacing: 0.02em;
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-body p {
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.detail-body h3 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.detail-body h4 {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-muted);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.tech-list {
  list-style: none;
  padding: 0;
  margin-bottom: 0.5rem;
}

.tech-list li {
  font-size: 0.9rem;
  color: var(--color-muted);
  padding: 0.25rem 0;
  padding-left: 1rem;
  position: relative;
}

.tech-list li::before {
  content: "\2013";
  position: absolute;
  left: 0;
  color: var(--color-subtle);
}

.detail-links {
  margin-top: 1.5rem;
}

.detail-links a {
  font-size: 0.85rem;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}

.detail-links a:hover {
  border-color: var(--color-text);
}

.detail-private {
  font-size: 0.85rem;
  color: var(--color-subtle);
  font-style: italic;
}

/* --- Footer --- */

footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  border-top: 1px solid var(--color-border);
}

footer p {
  font-size: 0.7rem;
  color: var(--color-subtle);
}

/* --- Responsive --- */

@media (max-width: 480px) {
  nav {
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 2rem;
  }

  .hero {
    padding: 3.5rem 0 3rem;
  }

  .hero-name {
    font-size: 2.25rem;
  }

  .hero-tagline {
    font-size: 0.95rem;
  }

  .project,
  .project:nth-child(even) {
    flex-direction: column;
    gap: 0.75rem;
  }

  .project-thumb {
    width: 100%;
    height: 140px;
  }

  .project-header {
    flex-direction: column;
    gap: 0.125rem;
  }

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