/*
Theme Name: Hard Spheres Academic
Theme URI: https://hardspheres.com/
Author: Hard Spheres
Description: A focused academic portfolio for a chemical and biomolecular engineering researcher.
Version: 1.0.6
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: hardspheres-academic
*/

:root {
  --ink: #142925;
  --ink-soft: #4f625d;
  --paper: #f6f3eb;
  --paper-deep: #ece7dc;
  --white: #fffdf8;
  --teal: #0d665d;
  --teal-dark: #084d47;
  --teal-pale: #dceae4;
  --orange: #e9653f;
  --line: rgba(20, 41, 37, 0.16);
  --shadow: 0 22px 60px rgba(20, 41, 37, 0.12);
  --radius: 22px;
  --sans: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --content: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.admin-bar .site-header { top: 32px; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--orange); }
button, input, textarea { font: inherit; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  clip: auto; width: auto; height: auto; margin: 0; padding: .8rem 1rem;
  z-index: 9999; top: .5rem; left: .5rem; background: var(--white);
}
.container { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }
.narrow { width: min(calc(100% - 40px), 780px); margin-inline: auto; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  background: rgba(246, 243, 235, .88);
  backdrop-filter: blur(16px);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 8px 30px rgba(20,41,37,.05); }
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.site-branding { display: flex; align-items: center; gap: 13px; color: var(--ink); text-decoration: none; }
.brand-mark { position: relative; width: 38px; height: 38px; flex: 0 0 38px; }
.brand-mark span { position: absolute; display: block; border-radius: 50%; background: var(--teal); }
.brand-mark span:nth-child(1) { width: 17px; height: 17px; left: 1px; top: 10px; }
.brand-mark span:nth-child(2) { width: 12px; height: 12px; right: 1px; top: 2px; background: var(--orange); }
.brand-mark span:nth-child(3) { width: 10px; height: 10px; right: 4px; bottom: 3px; background: var(--teal-dark); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; height: 1px; background: var(--teal); transform-origin: left; opacity: .5; }
.brand-mark::before { width: 23px; left: 12px; top: 14px; transform: rotate(-25deg); }
.brand-mark::after { width: 20px; left: 14px; top: 22px; transform: rotate(20deg); }
.brand-copy { display: grid; line-height: 1.1; }
.brand-title { font-family: var(--serif); font-size: 1.18rem; font-weight: 700; letter-spacing: -.02em; }
.brand-subtitle { margin-top: 5px; color: var(--ink-soft); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.custom-logo { max-height: 44px; width: auto; }
.header-nav { display: flex; align-items: center; gap: 30px; }
.header-nav ul { display: flex; align-items: center; gap: 29px; margin: 0; padding: 0; list-style: none; }
.header-nav a { color: var(--ink); font-size: .85rem; font-weight: 700; letter-spacing: .04em; text-decoration: none; }
.header-nav a:hover { color: var(--orange); }
.nav-contact { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; padding: 0 20px; border: 1px solid var(--teal); border-radius: 999px; color: var(--teal) !important; }
.nav-contact:hover { background: var(--teal); color: var(--white) !important; }
.menu-toggle { display: none; border: 0; background: transparent; color: var(--ink); padding: 8px; cursor: pointer; }
.menu-toggle span { display: block; width: 25px; height: 2px; margin: 5px; background: currentColor; transition: .2s; }

.hero { position: relative; overflow: hidden; padding: clamp(80px, 10vw, 150px) 0 110px; }
.hero::before { content: ""; position: absolute; width: 600px; height: 600px; right: -250px; top: -280px; border: 1px solid rgba(13,102,93,.12); border-radius: 50%; box-shadow: 0 0 0 70px rgba(13,102,93,.025), 0 0 0 140px rgba(13,102,93,.02); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(360px, .84fr); align-items: center; gap: clamp(55px, 9vw, 120px); }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 24px; color: var(--teal); font-size: .76rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 32px; height: 2px; background: var(--orange); }
.hero h1 { max-width: 790px; margin: 0; font-family: var(--serif); font-size: clamp(3.6rem, 7.3vw, 7rem); font-weight: 400; line-height: .91; letter-spacing: -.065em; }
.hero h1 em { color: var(--teal); font-weight: 400; }
.hero-role { margin: 30px 0 0; color: var(--ink); font-size: clamp(1.05rem, 2vw, 1.32rem); font-weight: 700; }
.hero-intro { max-width: 650px; margin: 15px 0 0; color: var(--ink-soft); font-size: 1.04rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 25px; border: 1px solid var(--teal); border-radius: 999px; background: var(--teal); color: var(--white); font-size: .82rem; font-weight: 800; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; transition: transform .2s, background .2s, color .2s; }
.button::after { content: "\2197"; display: inline-grid; width: 1rem; flex: 0 0 1rem; place-items: center; font-size: 1rem; line-height: 1; }
.button:hover { transform: translateY(-2px); background: var(--teal-dark); color: var(--white); }
.button-ghost { background: transparent; color: var(--teal); }
.button-ghost::after { content: "\2197"; }
.button-ghost:hover { color: var(--white); }
.hero-visual { position: relative; min-height: 510px; }
.portrait-frame { position: absolute; inset: 0 20px 20px 35px; overflow: hidden; border-radius: 230px 230px 28px 28px; background: var(--teal-pale); box-shadow: var(--shadow); }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.86) contrast(1.03); }
.molecule-stage { position: absolute; inset: 0; overflow: hidden; background: linear-gradient(155deg, #d8e8df 0%, #bcd6cc 100%); }
.molecule-stage svg { width: 100%; height: 100%; }
.visual-note { position: absolute; right: 0; bottom: 0; width: 185px; padding: 20px 22px; border-radius: 16px; background: var(--orange); color: var(--white); box-shadow: 0 15px 35px rgba(75,45,35,.18); }
.visual-note strong { display: block; font-family: var(--serif); font-size: 1.05rem; }
.visual-note span { display: block; margin-top: 4px; font-size: .71rem; line-height: 1.45; letter-spacing: .09em; text-transform: uppercase; }

.section { padding: clamp(85px, 10vw, 140px) 0; }
.section-muted { background: var(--paper-deep); }
.section-dark { background: var(--ink); color: var(--white); }
.section-head { display: grid; grid-template-columns: 1fr 1.4fr; align-items: end; gap: 50px; margin-bottom: 65px; }
.section-kicker { margin: 0 0 15px; color: var(--orange); font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.section h2, .page-title { margin: 0; font-family: var(--serif); font-size: clamp(2.6rem, 5vw, 4.7rem); font-weight: 400; line-height: .98; letter-spacing: -.045em; }
.section-lead { max-width: 620px; margin: 0; color: var(--ink-soft); font-size: 1.08rem; }
.section-dark .section-lead { color: rgba(255,255,255,.68); }

.research-grid { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line); }
.research-card { position: relative; grid-column: span 2; min-height: 330px; padding: 36px 33px; border-right: 1px solid var(--line); }
.research-card:nth-child(3), .research-card:nth-child(5) { border-right: 0; }
.research-card:nth-child(4), .research-card:nth-child(5) { grid-column: span 3; border-top: 1px solid var(--line); }
.card-number { display: block; margin-bottom: 80px; color: var(--orange); font-family: var(--serif); font-size: 1rem; font-style: italic; }
.research-card h3 { margin: 0 0 14px; font-family: var(--serif); font-size: 1.65rem; font-weight: 400; line-height: 1.15; }
.research-card p { margin: 0; color: var(--ink-soft); font-size: .92rem; }
.research-card::after { content: ""; position: absolute; top: 33px; right: 32px; width: 10px; height: 10px; border: 1px solid var(--teal); border-radius: 50%; box-shadow: 13px 9px 0 -3px var(--orange); }

.publication-list { border-top: 1px solid rgba(255,255,255,.2); }
.publication-item { display: grid; grid-template-columns: 90px 1fr auto; gap: 34px; align-items: start; padding: 34px 0; border-bottom: 1px solid rgba(255,255,255,.16); color: inherit; text-decoration: none; }
.pub-year { color: var(--orange); font-family: var(--serif); font-size: 1.1rem; font-style: italic; }
.publication-item h3 { margin: 0 0 9px; max-width: 760px; font-family: var(--serif); font-size: clamp(1.3rem, 2vw, 1.7rem); font-weight: 400; line-height: 1.25; }
.pub-meta { margin: 0; color: rgba(255,255,255,.6); font-size: .85rem; }
.pub-arrow { display: grid; width: 45px; height: 45px; place-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; transition: .2s; }
.publication-item:hover { color: var(--white); }
.publication-item:hover .pub-arrow { border-color: var(--orange); background: var(--orange); transform: translate(2px, -2px); }
.empty-state { padding: 38px; border: 1px dashed rgba(255,255,255,.28); border-radius: var(--radius); color: rgba(255,255,255,.72); }
.section-foot { display: flex; justify-content: flex-end; margin-top: 38px; }
.text-link { color: inherit; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-decoration: none; text-transform: uppercase; }
.text-link::after { content: "  \2197"; color: var(--orange); }

.about-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: clamp(60px, 10vw, 130px); align-items: center; }
.about-art { position: relative; min-height: 520px; border-radius: 22px; background: var(--teal); overflow: hidden; }
.about-art::before, .about-art::after { content: ""; position: absolute; border-radius: 50%; }
.about-art::before { width: 340px; height: 340px; left: -80px; top: -55px; border: 1px solid rgba(255,255,255,.32); box-shadow: 0 0 0 55px rgba(255,255,255,.045), 0 0 0 110px rgba(255,255,255,.035); }
.about-art::after { width: 120px; height: 120px; right: 65px; bottom: 70px; background: var(--orange); box-shadow: -115px -30px 0 -42px #f5c4a8, 35px -155px 0 -28px var(--white); }
.about-art-label { position: absolute; left: 34px; right: 34px; bottom: 32px; color: rgba(255,255,255,.78); font-size: .69rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.about-copy h2 { margin-bottom: 28px; }
.about-copy p { color: var(--ink-soft); font-size: 1.03rem; }
.credential-list { margin: 35px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.credential-list li { display: grid; grid-template-columns: 120px 1fr; gap: 22px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.credential-list span { color: var(--ink-soft); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.credential-list strong { font-family: var(--serif); font-size: 1rem; font-weight: 400; }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { display: flex; min-height: 260px; padding: 30px; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.32); color: var(--ink); text-decoration: none; transition: transform .2s, background .2s, box-shadow .2s; }
.news-card:hover { transform: translateY(-5px); background: var(--white); box-shadow: var(--shadow); color: var(--ink); }
.news-date { color: var(--orange); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.news-card h3 { margin: auto 0 12px; font-family: var(--serif); font-size: 1.45rem; font-weight: 400; line-height: 1.2; }
.news-card p { margin: 0; color: var(--ink-soft); font-size: .86rem; }

.contact-band { padding: 105px 0; background: var(--orange); color: var(--white); }
.contact-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.contact-band h2 { max-width: 750px; font-family: var(--serif); font-size: clamp(2.7rem, 6vw, 5.3rem); font-weight: 400; line-height: .96; letter-spacing: -.05em; }
.contact-band .button { flex: 0 0 auto; border-color: var(--white); background: var(--white); color: var(--ink); }
.contact-band .button:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }

.site-footer { padding: 55px 0 30px; background: var(--ink); color: rgba(255,255,255,.68); }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 50px; padding-bottom: 48px; }
.footer-brand { color: var(--white); font-family: var(--serif); font-size: 1.4rem; }
.footer-copy { max-width: 390px; margin-top: 15px; font-size: .86rem; }
.footer-label { display: block; margin-bottom: 14px; color: var(--orange); font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links li + li { margin-top: 8px; }
.footer-links a { color: rgba(255,255,255,.72); font-size: .86rem; text-decoration: none; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 25px; border-top: 1px solid rgba(255,255,255,.14); font-size: .72rem; }

.page-hero { padding: 100px 0 65px; border-bottom: 1px solid var(--line); }
.page-hero .eyebrow { margin-bottom: 18px; }
.content-area { padding: 70px 0 110px; }
.entry-content > * { max-width: 780px; margin-left: auto; margin-right: auto; }
.entry-content > .alignwide { max-width: var(--content); }
.entry-content > .alignfull { max-width: none; }
.entry-content h2, .entry-content h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; }
.entry-content h2 { margin-top: 2.2em; font-size: 2.2rem; }
.entry-content p { margin-block: 1.25em; }
.entry-content blockquote { padding-left: 28px; border-left: 3px solid var(--orange); color: var(--ink-soft); font-family: var(--serif); font-size: 1.25rem; }
.archive-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.archive-card { padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.archive-card h2 { margin: 10px 0; font-family: var(--serif); font-size: 1.55rem; font-weight: 400; line-height: 1.25; }
.archive-card h2 a { color: var(--ink); text-decoration: none; }
.archive-card p { color: var(--ink-soft); font-size: .9rem; }
.paper-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.paper-details { display: grid; gap: 0; margin: 38px 0; border-top: 1px solid var(--line); }
.paper-detail { display: grid; grid-template-columns: 130px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.paper-detail dt { color: var(--ink-soft); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.paper-detail dd { margin: 0; }
.pagination { margin-top: 50px; }
.nav-links { display: flex; gap: 8px; }
.page-numbers { display: grid; min-width: 42px; height: 42px; place-items: center; padding: 0 10px; border: 1px solid var(--line); border-radius: 50%; text-decoration: none; }
.page-numbers.current { background: var(--teal); color: var(--white); }
.error-404 { padding: 140px 0; text-align: center; }

@media (max-width: 900px) {
  body.admin-bar .site-header { top: 46px; }
  .menu-toggle { display: block; }
  .header-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 25px 20px 30px; border-bottom: 1px solid var(--line); background: var(--paper); }
  .header-nav.is-open { display: block; }
  .header-nav ul { align-items: stretch; flex-direction: column; gap: 8px; }
  .header-nav a { display: block; padding: 10px 0; }
  .nav-contact { margin-top: 8px; }
  .hero-grid, .about-grid, .section-head { grid-template-columns: 1fr; }
  .hero { padding-top: 80px; }
  .hero-visual { min-height: 470px; max-width: 520px; width: 100%; margin: 0 auto; }
  .research-grid { grid-template-columns: 1fr; }
  .research-card, .research-card:nth-child(4), .research-card:nth-child(5) { grid-column: 1 / -1; min-height: 0; border-top: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .card-number { margin-bottom: 35px; }
  .news-grid { grid-template-columns: 1fr 1fr; }
  .contact-inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 640px) {
  .container, .narrow { width: min(calc(100% - 28px), var(--content)); }
  .brand-subtitle { display: none; }
  .header-inner { min-height: 70px; }
  .hero h1 { font-size: clamp(3.25rem, 18vw, 5rem); }
  .hero-visual { min-height: 390px; }
  .portrait-frame { inset: 0 10px 20px; }
  .visual-note { right: 0; width: 155px; padding: 16px; }
  .section-head { gap: 22px; margin-bottom: 45px; }
  .hero-actions { width: 100%; align-items: stretch; }
  .hero-actions .button { width: 100%; justify-content: space-between; text-align: left; }
  .publication-item { grid-template-columns: 48px minmax(0, 1fr) 32px; gap: 12px; }
  .pub-arrow { display: grid; width: 32px; height: 32px; font-size: .8rem; }
  .about-art { min-height: 390px; }
  .news-grid, .archive-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; }
  .credential-list li, .paper-detail { grid-template-columns: 1fr; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
