/*
Theme Name: Trey Martindale One Page
Theme URI: https://treymartindale.com
Author: Trey Martindale
Description: A single-page academic portfolio theme with separate CV and Blog pages. Block theme (Full Site Editing).
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: tm-onepage
*/

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }

/* Anchored sections sit below the sticky header */
.tm-section { scroll-margin-top: 72px; }

/* ---------- Header ---------- */
.tm-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--wp--preset--color--navy);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.08);
}
.admin-bar .tm-header { top: 32px; }
.tm-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.tm-brand {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .01em;
}
.tm-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: center; }
.tm-nav a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: .95rem;
  padding: .2rem 0;
  border-bottom: 2px solid transparent;
}
.tm-nav a:hover, .tm-nav a:focus { color: #fff; border-bottom-color: var(--wp--preset--color--accent); }
.tm-nav .tm-nav-sep { width: 1px; height: 1rem; background: rgba(255,255,255,.25); }

/* ---------- Hero ---------- */
.tm-hero { background: var(--wp--preset--color--navy); color: #fff; }
.tm-hero a { color: #9cc4f5; }
.tm-hero .wp-block-image img {
  border-radius: 50%;
  width: 220px;
  height: 220px;
  object-fit: cover;
  object-position: center 20%;
  border: 4px solid rgba(255,255,255,.2);
}
.tm-hero h1 { color: #fff; }
.tm-hero .tm-tagline { color: rgba(255,255,255,.7); letter-spacing: .06em; text-transform: uppercase; font-size: .85rem; }
.tm-button .wp-block-button__link { border-radius: 999px; }
.tm-button.is-style-outline .wp-block-button__link { color: #fff; border-color: rgba(255,255,255,.5); }

/* ---------- Sections ---------- */
.tm-alt { background: var(--wp--preset--color--light); }
.tm-section h2 {
  position: relative;
  padding-bottom: .6rem;
  margin-bottom: 1.5rem;
}
.tm-section h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 56px; height: 3px;
  background: var(--wp--preset--color--accent);
}

.tm-card {
  background: #fff;
  border: 1px solid var(--wp--preset--color--line);
  border-radius: 10px;
  padding: 1.5rem;
  height: 100%;
}
.tm-card h3 { margin-top: 0; }
.tm-alt .tm-card { border-color: transparent; box-shadow: 0 1px 3px rgba(20,33,61,.08); }

.tm-linklist { list-style: none; padding: 0; margin: 0; }
.tm-linklist li { padding: .45rem 0; border-bottom: 1px solid var(--wp--preset--color--line); }
.tm-linklist li:last-child { border-bottom: 0; }

/* ---------- CV embed ---------- */
/* The CV page holds a core File block (PDF from the Media Library) with inline embed on */
.tm-cv-content .wp-block-file { margin: 1rem 0 2rem; }
.tm-cv-content .wp-block-file object,
.tm-cv-content .wp-block-file__embed {
  width: 100%;
  height: 85vh;
  min-height: 560px;
  border: 1px solid var(--wp--preset--color--line);
  border-radius: 8px;
}
.tm-cv-content .wp-block-file__button { border-radius: 999px; }

/* ---------- Blog ---------- */
.tm-post-item { padding: 1.5rem 0; border-bottom: 1px solid var(--wp--preset--color--line); }
.tm-post-item .wp-block-post-title { margin: 0 0 .25rem; }
.tm-post-item .wp-block-post-title a { text-decoration: none; }
.tm-post-meta { color: var(--wp--preset--color--muted); font-size: .9rem; }

/* ---------- Footer ---------- */
.tm-footer { background: var(--wp--preset--color--navy); color: rgba(255,255,255,.8); font-size: .9rem; }
.tm-footer a { color: #fff; }

@media (max-width: 781px) {
  .admin-bar .tm-header { top: 46px; }
  .tm-hero .wp-block-image img { width: 160px; height: 160px; }
}
