/* ─────────────────────────────────────────────
   PORTFOLIO — Isaac Alonso
   Minimalist dark typographic design
───────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Playfair+Display:ital@0;1&display=swap');

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

:root {
  --bg:       #0e0e0e;
  --surface:  #161616;
  --border:   #2a2a2a;
  --text:     #e8e8e8;
  --muted:    #888;
  --accent:   #c9a96e;       /* warm gold */
  --accent2:  #7eb8c9;       /* cool teal highlight */
  --font-body: 'Inter', system-ui, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --max-w:    680px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.75;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Typography ── */
h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); color: var(--accent); margin-bottom: 1.2rem; }
h3 { font-size: 1.05rem; font-weight: 500; font-family: var(--font-body); }
p  { color: var(--muted); margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
a  { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent2); }
strong { color: var(--text); font-weight: 500; }

/* ── Layout helpers ── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Site header ── */
.site-header {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-logo {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: 0.02em;
}
.site-logo span { color: var(--accent); }

/* ── Navigation ── */
/*
  HOW TO ADD A NEW NAV LINK:
  In each HTML file, add inside <nav class="site-nav">:
      <a href="newpage.html">New Page</a>
*/
.site-nav { display: flex; gap: 2rem; flex-wrap: wrap; }
.site-nav a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--transition);
  position: relative;
  padding-bottom: 2px;
}
.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.site-nav a:hover,
.site-nav a.active { color: var(--text); }
.site-nav a:hover::after,
.site-nav a.active::after { transform: scaleX(1); }

/* ── Main content ── */
main { flex: 1; padding: 4rem 0; }

/* ── Footer ── */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.75rem;
  color: var(--border);
  letter-spacing: 0.08em;
}

/* ─────────────────────────────────────────
   HOME PAGE
───────────────────────────────────────── */
.home-hero {
  padding: 3rem 0 4rem;
}
.home-hero .eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.home-hero h1 { margin-bottom: 1.25rem; }
.home-hero .subtitle {
  font-size: 1rem;
  color: var(--muted);
  max-width: 440px;
  margin-bottom: 3rem;
}

/*
  HOW TO ADD A NEW CARD LINK:
  Copy one <a class="nav-card"> block and update href, the heading, and the description.
*/
.nav-grid {
  display: grid;
  gap: 1px;
  border: 1px solid var(--border);
}
.nav-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.75rem;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  gap: 1rem;
}
.nav-card:hover { background: var(--border); color: var(--accent2); }
.nav-card + .nav-card { border-top: 1px solid var(--border); }
.nav-card-body h3 { margin-bottom: 0.2rem; transition: color var(--transition); }
.nav-card-body p  { font-size: 0.85rem; margin: 0; }
.nav-card:hover .nav-card-body h3 { color: var(--accent2); }
.nav-card-arrow {
  font-size: 1.2rem;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform var(--transition), color var(--transition);
}
.nav-card:hover .nav-card-arrow { transform: translateX(4px); color: var(--accent2); }

/* ─────────────────────────────────────────
   SUBPAGES  (About, CV, …)
───────────────────────────────────────── */
.page-header { margin-bottom: 2rem; }
.page-header-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}
.page-header .back {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  transition: color var(--transition);
}
.page-header .back:hover { color: var(--accent); }
.page-header h1 { margin-bottom: 0; }
.page-header .meta { font-size: 0.8rem; color: var(--muted); letter-spacing: 0.06em; }

/*
  HOW TO ADD A NEW SECTION TO A SUBPAGE:
  Copy one <section class="content-section"> block and update title + content.
*/
.content-section { margin-bottom: 3rem; padding-bottom: 3rem; border-bottom: 1px solid var(--border); }
.content-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

/* ── Collapsible sections (details/summary) ── */
details.content-section { padding-bottom: 0; }
details.content-section + details.content-section { margin-top: 0; }

.section-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;          /* hide default marker */
  padding: 1.5rem 0;
  user-select: none;
}
/* hide webkit default arrow */
.section-summary::-webkit-details-marker { display: none; }

.section-summary h2 {
  margin-bottom: 0;
  transition: color var(--transition);
}
.section-summary:hover h2 { color: var(--text); }

/* chevron indicator */
.section-summary::after {
  content: '›';
  font-size: 1.3rem;
  color: var(--muted);
  transform: rotate(90deg);
  transition: transform var(--transition), color var(--transition);
  flex-shrink: 0;
  margin-left: 1rem;
}
details[open] > .section-summary::after {
  transform: rotate(270deg);
  color: var(--accent);
}
.section-summary:hover::after { color: var(--accent); }

/* content area inside open details */
details[open] > .section-summary {
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
details[open] { padding-bottom: 2rem; }

/* CV specific */
.cv-entry { margin-bottom: 1.8rem; }
.cv-entry:last-child { margin-bottom: 0; }
.cv-entry-header { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.3rem; }
.cv-entry-header h3 { font-size: 0.95rem; }
.cv-entry-period { font-size: 0.75rem; color: var(--accent); letter-spacing: 0.06em; flex-shrink: 0; }
.cv-entry-org { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.4rem; }
.cv-entry p { font-size: 0.875rem; }

.cv-entry ul {
  margin: 0.4rem 0 0 1.1rem;
  padding: 0;
  list-style: disc;
}
.cv-entry ul li {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
  padding-left: 0.25rem;
}
.cv-entry ul li:last-child { margin-bottom: 0; }

/* Career hiatus — visually quieter */
.cv-entry--hiatus { opacity: 0.6; }
.cv-entry--hiatus h3 { font-style: italic; font-weight: 300; }

.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.tag {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  color: var(--muted);
}

.skill-group { margin-bottom: 1.5rem; }
.skill-group:last-child { margin-bottom: 0; }
.skill-group-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* ── Books page ── */
.book-list { display: flex; flex-direction: column; }
.book-entry {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.book-entry:first-child { padding-top: 0; }
.book-entry:last-child { border-bottom: none; padding-bottom: 0; }
.book-entry-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}
.book-title {
  font-size: 0.95rem;
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.1rem;
}
.book-author {
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin: 0;
}
.book-year {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.book-synopsis {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}

/* sub-group labels inside an author section */
.book-group-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent2);
  margin: 2rem 0 0.6rem;
}
.book-group-label:first-of-type { margin-top: 0; }

/* Want-to-read section */
.want-to-read-heading { color: var(--muted); }
.book-entry--want { opacity: 0.55; }
.book-entry--want:hover { opacity: 1; transition: opacity var(--transition); }
.book-year--want {
  font-size: 0.68rem;
  color: var(--accent2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Responsive ── */
@media (max-width: 500px) {
  .site-header .container { flex-direction: column; gap: 1.25rem; }
  .cv-entry-header { flex-direction: column; gap: 0.2rem; }
}
