/*
Theme Name: Santucci
Theme URI: https://jacksantucci.com
Author: Custom
Description: A minimalist theme faithful to jacksantucci.com — Helvetica Neue, black on white, wide layout, properly responsive.
Version: 2.2.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: santucci
Tags: minimalist, blog, academic, light, custom-menu, one-column
*/

/* =========================================================
   RESET & BASE
========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%; /* respect user browser settings */
  scroll-behavior: smooth;
}

body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1.2em;
  line-height: 1.65;
  color: #111; /* near-black: imperceptibly softer than #000, easier on the eyes */
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================================================
   TYPOGRAPHY
========================================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: bold;
  line-height: 1.2;
  color: #000;
  margin-bottom: 0.5em;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
h4 { font-size: 1rem; font-weight: normal; font-style: italic; }

p {
  margin-bottom: 1.4em;
}

a {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: #555;
}

a.name {
  color: #000;
  text-decoration: none;
}

blockquote {
  border-left: 2px solid #ccc;
  margin: 1.5em 0;
  padding: 0.5em 1.5em;
  color: #444;
}

ul, ol {
  padding-left: 1.4em;
  margin-bottom: 1.4em;
}

li {
  margin-bottom: 0.3em;
}

hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 2.5em 0;
}

strong { font-weight: bold; }
em     { font-style: italic; }

code, pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9em;
  background: #f5f5f5;
}

code {
  padding: 0.15em 0.35em;
}

pre {
  padding: 1em 1.25em;
  overflow-x: auto;
  margin-bottom: 1.4em;
}

pre code {
  background: transparent;
  padding: 0;
}

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

a img {
  border: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.4em;
  font-size: 0.9em;
}

th, td {
  text-align: left;
  padding: 0.5em 0.75em;
  border-bottom: 1px solid #e8e8e8;
}

th {
  font-weight: bold;
}

/* =========================================================
   LAYOUT
   Outer wrapper: 960px (matches original)
   Inner prose: capped at 720px to keep line lengths readable
========================================================= */
#wrapper,
.site-wrap {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.prose-wrap {
  max-width: 720px;
}

/* =========================================================
   SITE HEADER
========================================================= */
.site-header {
  margin: 2em auto 0;
  max-width: 960px;
  width: 100%;
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid #ddd;
}

.site-branding .site-title {
  font-size: 1.6rem;
  font-weight: bold;
  margin-bottom: 0.15em;
}

.site-branding .site-title a {
  text-decoration: none;
  color: #000;
}

.site-branding .site-title a:hover {
  color: #555;
}

.site-branding .site-description {
  font-size: 0.85em;
  color: #555;
  margin-bottom: 0;
}

/* =========================================================
   NAVIGATION
========================================================= */
.main-navigation {
  margin-top: 0.75em;
}

.main-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5em;
}

.main-navigation ul li {
  margin: 0;
}

.main-navigation a {
  font-size: 0.85em;
  color: #000;
  text-decoration: none;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 0.85em;
  font-family: inherit;
  color: #000;
}

/* =========================================================
   MAIN CONTENT
========================================================= */
#content {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 2em 1.5rem 4rem;
}

/* =========================================================
   BIO / TOP SECTION (mirrors original .top and #biophoto)
========================================================= */
.top {
  text-align: center;
  margin-bottom: 2em;
}

#biophoto {
  display: block;
  margin-left: auto;
  margin-right: auto;
  padding-top: 1em;
  padding-bottom: 1em;
  width: 33.333%;
  max-width: 280px;
}

.researchpic {
  max-width: 50%;
  vertical-align: middle;
}

/* =========================================================
   POST LIST (blog index / archive)
========================================================= */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 720px;
}

.post-list-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em;
  padding: 0.6em 0;
  border-bottom: 1px solid #eee;
}

.post-list-item:first-child {
  border-top: 1px solid #eee;
}

.post-list-item .entry-title {
  font-size: 1rem;
  font-weight: normal;
  margin: 0;
  flex: 1;
}

.post-list-item .entry-title a {
  text-decoration: none;
}

.post-list-item .entry-title a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-list-item .entry-date {
  font-size: 0.8em;
  color: #777;
  white-space: nowrap;
  flex-shrink: 0;
}

/* =========================================================
   SINGLE POST / PAGE
========================================================= */
.entry-header {
  margin-bottom: 1.5em;
  max-width: 720px;
}

.entry-header .entry-title {
  font-size: 1.4rem;
  margin-bottom: 0.25em;
}

.entry-meta {
  font-size: 0.82em;
  color: #777;
  margin-bottom: 0;
}

.entry-meta a {
  color: #777;
}

.entry-content {
  max-width: 720px;
}

.entry-footer {
  max-width: 720px;
  margin-top: 2em;
  padding-top: 1.25em;
  border-top: 1px solid #ddd;
  font-size: 0.85em;
  color: #777;
}

/* Post navigation */
.post-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1.5em;
  margin-top: 2.5em;
  padding-top: 1.25em;
  border-top: 1px solid #ddd;
  font-size: 0.85em;
  max-width: 720px;
}

.nav-previous { flex: 1; }
.nav-next      { flex: 1; text-align: right; }

.nav-previous .nav-subtitle,
.nav-next .nav-subtitle {
  display: block;
  color: #aaa;
  font-size: 0.8em;
  margin-bottom: 0.2em;
}

/* =========================================================
   SEARCH FORM
========================================================= */
.search-form {
  display: flex;
  gap: 0.5em;
  margin-bottom: 2em;
  max-width: 480px;
}

.search-form .search-field {
  flex: 1;
  padding: 0.4em 0.6em;
  border: 1px solid #ccc;
  font-family: inherit;
  font-size: 0.9em;
  color: #000;
  background: #fff;
}

.search-form .search-field:focus {
  outline: none;
  border-color: #000;
}

.search-form .search-submit {
  padding: 0.4em 1em;
  background: #000;
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 0.85em;
  cursor: pointer;
  transition: background 0.15s;
}

.search-form .search-submit:hover {
  background: #444;
}

/* =========================================================
   PAGINATION
========================================================= */
.pagination {
  display: flex;
  gap: 0.4em;
  margin-top: 2.5em;
  font-size: 0.85em;
}

.pagination .page-numbers {
  padding: 0.3em 0.6em;
  text-decoration: none;
  color: #000;
  border: 1px solid transparent;
}

.pagination .page-numbers:hover {
  border-color: #ccc;
}

.pagination .page-numbers.current {
  border-color: #000;
}

/* =========================================================
   COMMENTS
========================================================= */
.comments-area {
  max-width: 720px;
  margin-top: 3em;
  padding-top: 1.5em;
  border-top: 1px solid #ddd;
}

.comments-title,
.comment-reply-title {
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #777;
  margin-bottom: 1.25em;
}

.comment-list {
  list-style: none;
  padding: 0;
}

.comment {
  margin-bottom: 1.5em;
  padding-bottom: 1.5em;
  border-bottom: 1px solid #eee;
}

.comment-meta {
  font-size: 0.8em;
  color: #aaa;
  margin-bottom: 0.5em;
}

.comment-author .fn {
  font-style: normal;
  font-weight: bold;
  color: #000;
}

.comment-content p:last-child {
  margin-bottom: 0;
}

.comment-form label {
  display: block;
  font-size: 0.85em;
  margin-bottom: 0.25em;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.4em 0.6em;
  border: 1px solid #ccc;
  font-family: inherit;
  font-size: 0.9em;
  color: #000;
  background: #fff;
  margin-bottom: 1em;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: #000;
}

.comment-form textarea {
  min-height: 120px;
  resize: vertical;
}

.comment-form .submit {
  font-family: inherit;
  font-size: 0.85em;
  padding: 0.4em 1.2em;
  background: #000;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.comment-form .submit:hover {
  background: #444;
}

/* =========================================================
   WIDGETS
========================================================= */
.widget {
  margin-bottom: 2em;
}

.widget-title {
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #777;
  margin-bottom: 0.75em;
}

.widget ul {
  list-style: none;
  padding: 0;
}

.widget ul li {
  padding: 0.2em 0;
  border-bottom: 1px solid #eee;
  font-size: 0.9em;
}

/* =========================================================
   SITE FOOTER
========================================================= */
.site-footer {
  border-top: 1px solid #ddd;
  padding: 1.5rem 1.5rem 3rem;
  font-size: 0.8em;
  color: #777;
  max-width: 960px;
  margin: 0 auto;
}

.site-footer a {
  color: #777;
}

.site-footer a:hover {
  color: #000;
}

.site-footer .site-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75em;
  padding: 0;
}

/* =========================================================
   UTILITY
========================================================= */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.alignleft  { float: left;  margin-right: 1.5em; margin-bottom: 1em; }
.alignright { float: right; margin-left: 1.5em;  margin-bottom: 1em; }
.aligncenter { display: block; margin: 0 auto 1.4em; }

/* =========================================================
   RESPONSIVE
   Matching breakpoints from your original CSS,
   now with actual rules inside each.
========================================================= */

/* smartphones, portrait — up to 480px */
@media (max-width: 480px) {
  body {
    font-size: 1em; /* scale down slightly on small screens */
  }

  #biophoto {
    width: 60%;
  }

  .post-list-item {
    flex-direction: column;
    gap: 0.1em;
  }

  .post-navigation {
    flex-direction: column;
  }

  .nav-next {
    text-align: left;
  }

  .nav-toggle {
    display: inline-block;
  }

  .main-navigation ul {
    display: none;
    flex-direction: column;
    gap: 0.5em;
    margin-top: 0.75em;
  }

  .main-navigation.is-open ul {
    display: flex;
  }
}

/* portrait tablets and large phones — 481px to 768px */
@media (min-width: 481px) and (max-width: 768px) {
  body {
    font-size: 1.05em;
  }

  #biophoto {
    width: 45%;
  }
}

/* landscape tablets and small desktops — 769px to 960px */
@media (min-width: 769px) and (max-width: 960px) {
  body {
    font-size: 1.1em;
  }
}

/* desktops — 961px and up: full 1.2em, 960px wrapper, no changes needed */
@media (min-width: 961px) {
  /* baseline styles already apply */
}

/* =========================================================
   POST PREVIEWS (index / archive with more tag)
========================================================= */
.post-preview {
  max-width: 720px;
  margin-bottom: 0;
}

.post-preview .entry-header {
  margin-bottom: 0.4em;
}

.post-preview .entry-header .entry-title {
  font-size: 1.6rem;
  font-weight: bold;
  margin-bottom: 0.1em;
}

/* No underline on headline links by default; underline on hover only */
.post-preview .entry-header .entry-title a,
.post-list-item .entry-title a {
  text-decoration: none;
}

.post-preview .entry-header .entry-title a:hover,
.post-list-item .entry-title a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-preview .entry-meta {
  font-size: 0.8em;
  color: #777;
  margin-bottom: 0;
}

.post-preview .entry-summary {
  margin-top: 0.6em;
}

.post-preview .entry-summary p:last-child {
  margin-bottom: 0;
}

.post-preview .entry-footer {
  border-top: none;
  padding-top: 0.25em;
  margin-top: 0.5em;
  font-size: 0.8em;
}

.read-more-link,
.more-link {
  display: inline-block;
  margin-top: 0.4em;
  font-size: 0.85em;
  color: #000;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.read-more-link:hover,
.more-link:hover {
  color: #555;
}

.post-divider {
  margin: 2em 0;
  border-top: 1px solid #eee;
  max-width: 720px;
}

/* =========================================================
   LINKS INSIDE POST CONTENT
   Restore browser defaults (blue/purple) to match the
   user's own site, which sets no general a{} color.
========================================================= */
.entry-content a {
  color: LinkText;       /* browser-default unvisited blue */
}

.entry-content a:visited {
  color: VisitedText;    /* browser-default visited purple */
}

.entry-content a:hover {
  color: LinkText;
  opacity: 0.75;
}
