/* Dr Oscar Torrealba - Personal Site */
:root {
  --bg-header: #e8e6e1;
  --bg-body: #ffffff;
  --bg-footer: #2c2c2c;
  --text-primary: #1a1a1a;
  --text-secondary: #3d3d3d;
  --text-muted: #666666;
  --accent: #2c3e50;
  --border: #d0cdc6;
  --max-width: 860px;
  --font-serif: "Times New Roman", Times, serif;
  --font-sans: "Times New Roman", Times, serif;
}

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

html {
  scroll-behavior: smooth;
}

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

/* Header / Nav */
header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.15rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.logo:hover {
  opacity: 0.75;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.6rem;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 400;
  transition: opacity 0.2s;
}

nav a:hover,
nav a.active {
  opacity: 0.65;
}

nav a.active {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Hero section (About) */
.hero {
  background: var(--bg-header);
  padding: 3.25rem 1.5rem 2.75rem;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2.75rem;
  flex-wrap: wrap;
}

.hero-photo {
  width: 210px;
  height: 210px;
  object-fit: cover;
  object-position: center top;
  border-radius: 4px;
  background: #d0cdc6;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.hero-text {
  flex: 1;
  min-width: 260px;
}

.hero-text h1 {
  font-family: var(--font-serif);
  font-size: 2.55rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 1.35rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.social-links {
  display: flex;
  gap: 1.15rem;
  margin-top: 0.25rem;
}

.social-links a {
  color: #5a5a5a;
  display: inline-flex;
  transition: color 0.2s;
}

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

.social-links svg {
  width: 22px;
  height: 22px;
}

/* Main content */
main {
  flex: 1;
  padding: 3rem 1.5rem 4rem;
}

.content {
  max-width: var(--max-width);
  margin: 0 auto;
}

.content h2 {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.content h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 1.6rem;
  color: var(--text-primary);
}

.content p {
  margin-bottom: 1.3rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
  text-align: justify;
}

.content strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* Page header (Resume / Projects / Legal) */
.page-header {
  background: var(--bg-header);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

/* Resume sections */
.section {
  margin-bottom: 2.85rem;
}

.section h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 1.75rem;
  color: var(--text-primary);
}

.entry {
  margin-bottom: 1.7rem;
}

.entry-title {
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.entry-meta {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 0.55rem;
  font-style: italic;
}

.entry ul {
  margin-left: 1.3rem;
  color: var(--text-secondary);
}

.entry li {
  margin-bottom: 0.4rem;
  font-size: 1rem;
  line-height: 1.55;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  margin-left: 0;
  padding-left: 0;
}

.skills-grid li {
  list-style: none;
  padding-left: 1.15rem;
  position: relative;
  color: var(--text-secondary);
  font-size: 1rem;
}

.skills-grid li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* Projects */
.project-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.5rem;
  background: #fafaf8;
}

.project-card h4 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
}

.project-card p {
  margin-bottom: 0.7rem;
  font-size: 1rem;
  text-align: left;
}

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

.tag {
  background: var(--bg-header);
  color: var(--text-secondary);
  font-size: 0.82rem;
  padding: 0.22rem 0.55rem;
  border-radius: 3px;
}

/* Legal pages */
.legal-content h2 {
  text-align: left;
  font-size: 1.35rem;
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
  font-weight: 700;
}

.legal-content h2:first-of-type {
  margin-top: 0;
}

.legal-content p,
.legal-content li {
  font-size: 1rem;
  color: var(--text-secondary);
  text-align: left;
}

.legal-content ul {
  margin: 0.6rem 0 1.1rem 1.4rem;
}

.legal-content li {
  margin-bottom: 0.35rem;
}

.legal-nav {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.legal-nav a {
  color: var(--text-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-nav a:hover {
  opacity: 0.7;
}

/* Footer */
footer {
  background: var(--bg-footer);
  color: #b0b0b0;
  padding: 1.35rem 1.5rem;
  text-align: center;
  font-size: 0.88rem;
}

footer a {
  color: #d0d0d0;
  text-decoration: none;
  margin: 0 0.35rem;
}

footer a:hover {
  color: #fff;
  text-decoration: underline;
}

footer .footer-links {
  margin-top: 0.35rem;
}

/* Responsive */
@media (max-width: 700px) {
  body {
    font-size: 16px;
  }

  .hero-inner {
    flex-direction: column;
    text-align: center;
    gap: 1.6rem;
  }

  .hero-photo {
    width: 180px;
    height: 180px;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .social-links {
    justify-content: center;
  }

  .nav-container {
    flex-direction: column;
    gap: 0.85rem;
  }

  nav ul {
    gap: 1.1rem;
  }

  .page-header h1 {
    font-size: 2.1rem;
  }

  .content p {
    text-align: left;
  }
}

/* Print */
@media print {
  header, footer, .social-links {
    display: none;
  }
  body {
    font-size: 11pt;
  }
  .hero {
    background: none;
    padding: 1rem 0;
  }
}
