/* ============================================================
   RAÚL MOJICA SOTO-ALBORS — Personal Website
   Art Deco / Noir Gold Theme
   ============================================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --bg-primary: #0D0D0D;
  --bg-secondary: #141414;
  --bg-card: #1A1A1A;
  --bg-card-hover: #222222;
  --gold: #C9A84C;
  --gold-light: #D4BA6A;
  --gold-dim: rgba(201, 168, 76, 0.15);
  --cream: #F0EAD6;
  --cream-muted: #B8B3A4;
  --white: #FAFAF5;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-width: 1100px;
  --nav-height: 72px;
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--cream);
  line-height: 1.7;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

img { max-width: 100%; display: block; }

/* --- Geometric Decorations --- */
.deco-line {
  width: 60px;
  height: 2px;
  background: var(--gold);
  display: block;
  margin: 1rem 0 1.5rem;
}

.deco-line--center { margin-left: auto; margin-right: auto; }

.deco-diamond {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
  margin: 0 12px;
  vertical-align: middle;
}

/* --- Navigation --- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.12);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

nav .nav-logo {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--cream);
  letter-spacing: 0.04em;
}

nav .nav-logo span { color: var(--gold); }

nav .nav-links { display: flex; gap: 2rem; align-items: center; list-style: none; }

nav .nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--cream-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0;
  position: relative;
  transition: color var(--transition);
}

nav .nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width var(--transition);
}

nav .nav-links a:hover,
nav .nav-links a.active {
  color: var(--gold);
}

nav .nav-links a:hover::after,
nav .nav-links a.active::after {
  width: 100%;
}

.nav-cv-btn {
  font-size: 0.78rem !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 1.2rem !important;
  border: 1px solid var(--gold);
  color: var(--gold) !important;
  transition: all var(--transition) !important;
}

.nav-cv-btn:hover {
  background: var(--gold);
  color: var(--bg-primary) !important;
}

.nav-cv-btn::after { display: none !important; }

/* Mobile menu */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--cream); margin: 5px 0; transition: var(--transition); }

/* --- Layout --- */
main { padding-top: var(--nav-height); }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 5rem 0;
}

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--white); font-weight: 600; line-height: 1.25; }

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; font-weight: 600; }

.section-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
  display: block;
}

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* --- Hero (index.html) --- */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 600px; height: 600px;
  border: 1px solid rgba(201, 168, 76, 0.06);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%; left: -10%;
  width: 400px; height: 400px;
  border: 1px solid rgba(201, 168, 76, 0.04);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 720px; }

.hero-content h1 { margin-bottom: 1.5rem; }
.hero-content h1 .highlight { color: var(--gold); }

.hero-content .tagline {
  font-size: 1.1rem;
  color: var(--cream-muted);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  max-width: 560px;
}

.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
}

.btn:hover { background: var(--gold); color: var(--bg-primary); }

.btn--filled { background: var(--gold); color: var(--bg-primary); }
.btn--filled:hover { background: var(--gold-light); color: var(--bg-primary); }

/* --- About page --- */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  align-items: start;
}

.headshot-placeholder {
  width: 280px; height: 340px;
  background: var(--bg-card);
  border: 1px solid rgba(201, 168, 76, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.headshot-placeholder::before {
  content: '';
  position: absolute;
  top: 12px; left: 12px; right: 12px; bottom: 12px;
  border: 1px solid rgba(201, 168, 76, 0.08);
}

.headshot-placeholder svg { opacity: 0.15; }

.about-bio p { color: var(--cream); }
.about-bio p + p { margin-top: 1rem; }

/* Education */
.education-list { margin-top: 2rem; }

.edu-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(201, 168, 76, 0.08);
}

.edu-item:last-child { border-bottom: none; }

.edu-item h3 { margin-bottom: 0.25rem; }

.edu-meta {
  font-size: 0.85rem;
  color: var(--cream-muted);
}

.edu-detail {
  font-size: 0.85rem;
  color: var(--cream-muted);
  margin-top: 0.35rem;
}

/* Skills */
.skills-section { margin-top: 3rem; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.skill-category {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid rgba(201, 168, 76, 0.08);
  transition: border-color var(--transition);
}

.skill-category:hover { border-color: rgba(201, 168, 76, 0.2); }

.skill-category h3 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.skill-tag {
  font-size: 0.82rem;
  font-weight: 400;
  padding: 0.3rem 0.75rem;
  background: var(--gold-dim);
  color: var(--cream);
  border-radius: 2px;
}

/* --- Research / Experience --- */
.timeline { margin-top: 2rem; }

.timeline-item {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(201, 168, 76, 0.08);
}

.timeline-item:last-child { border-bottom: none; }

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

.timeline-header h3 { font-family: var(--font-heading); font-size: 1.2rem; }

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gold);
  white-space: nowrap;
}

.timeline-org {
  font-size: 0.9rem;
  color: var(--cream-muted);
  margin-bottom: 1rem;
}

.timeline-bullets {
  list-style: none;
  padding: 0;
}

.timeline-bullets li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.65rem;
  font-size: 0.92rem;
  color: var(--cream);
  line-height: 1.65;
}

.timeline-bullets li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.6em;
  width: 6px; height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}

/* Publications */
.publications { margin-top: 3rem; }

.pub-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(201, 168, 76, 0.06);
}

.pub-item:last-child { border-bottom: none; }

.pub-authors {
  font-size: 0.9rem;
  color: var(--cream);
  line-height: 1.6;
}

.pub-authors .me { color: var(--gold); font-weight: 500; }

.pub-title {
  font-style: italic;
  color: var(--cream-muted);
  font-size: 0.88rem;
  margin-top: 0.2rem;
}

.pub-venue {
  font-size: 0.82rem;
  color: var(--cream-muted);
  margin-top: 0.15rem;
}

.pub-venue a { font-weight: 500; }

.pub-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  background: var(--gold-dim);
  color: var(--gold);
  margin-top: 0.4rem;
}

/* --- Projects page --- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.project-card {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid rgba(201, 168, 76, 0.08);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: rgba(201, 168, 76, 0.25);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.project-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.project-card-header svg {
  flex-shrink: 0;
  color: var(--gold);
}

.project-card-header h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
}

.project-card-header h3 a { color: var(--white); }
.project-card-header h3 a:hover { color: var(--gold); }

.project-card p {
  font-size: 0.88rem;
  color: var(--cream-muted);
  line-height: 1.65;
  flex: 1;
}

.project-card-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(201, 168, 76, 0.06);
}

.project-lang {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--cream-muted);
}

.project-lang .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.project-link {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-left: auto;
}

/* --- Contact page --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-top: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(201, 168, 76, 0.06);
}

.contact-item svg { flex-shrink: 0; color: var(--gold); }

.contact-item .contact-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream-muted);
}

.contact-item .contact-value {
  font-size: 0.95rem;
  color: var(--cream);
  margin-top: 0.15rem;
}

/* --- Footer --- */
footer {
  padding: 3rem 0;
  border-top: 1px solid rgba(201, 168, 76, 0.08);
  text-align: center;
}

footer p {
  font-size: 0.78rem;
  color: var(--cream-muted);
  letter-spacing: 0.05em;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  nav .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(13, 13, 13, 0.98);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1rem;
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
  }

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

  .nav-toggle { display: block; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .headshot-placeholder {
    width: 200px; height: 250px;
    margin: 0 auto;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  section { padding: 3rem 0; }

  .hero { min-height: 80vh; }

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

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