/* ─────────────────────────────────────────
   style.css — John Guardado Portfolio
   Graduate Researcher · Biochemistry & Molecular Biophysics
───────────────────────────────────────── */

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

:root {
  --cream:        #F7F6F2;
  --ink:          #18181A;
  --muted:        #74737A;
  --accent:       #3D4F8C;   /* deep indigo — scientific, composed */
  --accent-light: #EDF0F8;
  --border:       rgba(24, 24, 26, 0.1);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --max-width:    860px;
}

html {
  scroll-behavior: smooth;
}

body {
  background:  var(--cream);
  color:       var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  font-size:   15px;
}

/* ── Navigation ── */
nav {
  position:        sticky;
  top:             0;
  background:      var(--cream);
  border-bottom:   1px solid var(--border);
  z-index:         100;
  padding:         0 max(2rem, calc((100% - var(--max-width)) / 2));
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  height:          56px;
}

.nav-logo {
  font-family:     var(--font-display);
  font-weight:     300;
  font-size:       17px;
  letter-spacing:  -0.02em;
  color:           var(--ink);
  text-decoration: none;
}

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

.nav-links a {
  font-size:       13px;
  font-weight:     400;
  color:           var(--muted);
  text-decoration: none;
  letter-spacing:  0.06em;
  text-transform:  uppercase;
  transition:      color 0.2s;
}

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

/* ── Layout ── */
main {
  padding: 0 max(2rem, calc((100% - var(--max-width)) / 2));
}

section {
  padding:       5rem 0;
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-size:      11px;
  font-weight:    500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color:          var(--muted);
  margin-bottom:  3rem;
}

/* ── Hero ── */
.hero {
  padding:       6rem 0 5rem;
  border-bottom: 1px solid var(--border);
}

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

h1 {
  font-family:    var(--font-display);
  font-weight:    300;
  font-size:      clamp(3rem, 7vw, 5.5rem);
  line-height:    1.05;
  letter-spacing: -0.03em;
  margin-bottom:  1.5rem;
  color:          var(--ink);
}

h1 em {
  font-style: italic;
  color:      var(--accent);
}

.hero-sub {
  font-size:     17px;
  color:         var(--muted);
  max-width:     520px;
  line-height:   1.6;
  margin-bottom: 2.5rem;
}

/* ── Button ── */
.btn {
  display:         inline-flex;
  align-items:     center;
  gap:             8px;
  background:      var(--ink);
  color:           var(--cream);
  padding:         12px 24px;
  border-radius:   2px;
  font-size:       13px;
  font-weight:     500;
  letter-spacing:  0.04em;
  text-decoration: none;
  transition:      background 0.2s;
}

.btn:hover {
  background: var(--accent);
}

/* ── Research / Project Cards ── */
.projects-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:                   1px;
  background:            var(--border);
  border:                1px solid var(--border);
}

.project-card {
  background: var(--cream);
  padding:    2rem;
  position:   relative;
  transition: background 0.2s;
}

.project-card:hover {
  background: var(--accent-light);
}

.project-num {
  font-size:      11px;
  color:          var(--muted);
  letter-spacing: 0.08em;
  margin-bottom:  1.25rem;
}

.project-card h3 {
  font-family:    var(--font-display);
  font-weight:    300;
  font-size:      1.35rem;
  letter-spacing: -0.02em;
  margin-bottom:  0.5rem;
  line-height:    1.2;
  color:          var(--ink);
}

.project-card p {
  font-size:     13px;
  color:         var(--muted);
  line-height:   1.6;
  margin-bottom: 1.25rem;
}

.project-arrow {
  position:   absolute;
  top:        2rem;
  right:      2rem;
  font-size:  18px;
  color:      var(--muted);
  opacity:    0;
  transition: opacity 0.2s;
}

.project-card:hover .project-arrow {
  opacity: 1;
}

.tag-row {
  display:   flex;
  flex-wrap: wrap;
  gap:       6px;
}

.tag {
  font-size:      11px;
  font-weight:    500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding:        3px 9px;
  background:     transparent;
  border:         1px solid var(--border);
  color:          var(--muted);
  border-radius:  1px;
}

/* ── About ── */
.about-layout {
  display:               grid;
  grid-template-columns: 1fr 1.6fr;
  gap:                   4rem;
  align-items:           start;
}

.about-left h2 {
  font-family:    var(--font-display);
  font-weight:    300;
  font-size:      2.2rem;
  letter-spacing: -0.03em;
  line-height:    1.15;
  color:          var(--ink);
  margin-bottom:  1.5rem;
}

.skills-list {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
}

.skill-row {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  padding:         0.75rem 0;
  border-bottom:   1px solid var(--border);
  font-size:       13px;
  gap:             1rem;
}

.skill-row span:first-child {
  font-weight:  500;
  color:        var(--ink);
  white-space:  nowrap;
}

.skill-row span:last-child {
  color:      var(--muted);
  text-align: right;
}

.about-right p {
  font-size:     15px;
  color:         var(--muted);
  line-height:   1.75;
  margin-bottom: 1.25rem;
}

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

.about-cta {
  margin-top: 1.5rem;
}

/* ── Contact ── */
.contact-block {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  gap:                   1px;
  background:            var(--border);
  border:                1px solid var(--border);
}

.contact-cell {
  background:      var(--cream);
  padding:         2rem;
  text-decoration: none;
  color:           var(--ink);
  transition:      background 0.2s;
  display:         flex;
  flex-direction:  column;
  gap:             0.4rem;
}

.contact-cell:hover {
  background: var(--accent-light);
}

.c-label {
  font-size:      11px;
  font-weight:    500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color:          var(--muted);
}

.c-value {
  font-family:    var(--font-display);
  font-weight:    300;
  font-size:      1.05rem;
  letter-spacing: -0.01em;
  color:          var(--accent);
}

/* ── Footer ── */
footer {
  padding:         2rem 0;
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  font-size:       12px;
  color:           var(--muted);
}

/* ── Hero Fade-in ── */
@keyframes fadeUp {
  from {
    opacity:   0;
    transform: translateY(20px);
  }
  to {
    opacity:   1;
    transform: translateY(0);
  }
}

.hero > * {
  opacity:   0;
  animation: fadeUp 0.6s ease forwards;
}

.hero > *:nth-child(1) { animation-delay: 0.05s; }
.hero > *:nth-child(2) { animation-delay: 0.15s; }
.hero > *:nth-child(3) { animation-delay: 0.25s; }
.hero > *:nth-child(4) { animation-delay: 0.35s; }

/* ── Section Fade-in (JS-driven) ── */
#research,
#about,
#contact {
  opacity:    0;
  transform:  translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

#research.visible,
#about.visible,
#contact.visible {
  opacity:   1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .about-layout  { grid-template-columns: 1fr; gap: 2rem; }
  .contact-block { grid-template-columns: 1fr; }
  .nav-links     { gap: 1.2rem; }
}