/*
  ============================================================================
  File: website_styling.css
  Author: Uros Markovic
  Site: Fragment Research
  Description:
  This stylesheet controls the full visual system for the Fragment Research
  website. It defines the global layout, sticky header, shared search modal,
  share dropdown, home page hero, learn-more cards, accordion sections for
  About / Education / Career, contact page form, Medium research carousels,
  research archive list view, footer, and responsive behavior across screen
  sizes.
  ============================================================================
*/

/* ===========================
   GLOBAL RESET / BASE
   - Establishes consistent box sizing
   - Forces stable page height and scrollbar behavior
   - Creates a flex column layout so the footer can stay at the bottom
=========================== */

* {
  box-sizing: border-box;
}

html,
body {
  overflow-y: scroll; /* always reserve scrollbar space */
  height: 100%;
}

html {
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: #111;
  font-family: Arial, sans-serif;

  /* keep footer at bottom */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  display: block;
  position: relative;
}

/* ===========================
   CONTAINER
   - Shared max-width wrapper used across the site
   - Keeps content centered with side padding
=========================== */

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ===========================
   HEADER / NAV
   - Styles the sticky top header
   - Centers primary navigation
   - Supports right-side action buttons
=========================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
}

.header-inner {
  height: 78px;
  display: flex;
  align-items: center;
  position: relative; /* for absolute-centered nav */
}

/* Brand / site logo */
.brand {
  font-weight: 700;
  font-size: 20px;
  color: #111;
  text-decoration: none;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

/* Logo image inside brand anchor */
.brand-logo {
  height: 34px;
  width: auto;
  display: block;
}

/* Centered main navigation */
.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  font-size: 14px;

  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  flex: 0 0 auto;
}

.main-nav a,
.dropdown-toggle {
  color: #111;
  text-decoration: none;
  padding: 6px 2px;
}

/* Shared underline hover treatment */
.main-nav a:hover,
.dropdown-toggle:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Active page indicator */
.main-nav a.active {
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Generic dropdown base pattern */
.dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dropdown-toggle {
  cursor: pointer;
  user-select: none;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 260px;
  background: #fff;
  border: 1px solid #e9e9e9;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  padding: 10px 0;
}

/* Default dropdown hover behavior
   - This is a generic pattern
   - Share overrides this with click-only behavior below */
.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: #111;
  text-decoration: none;
  white-space: nowrap;
}

.dropdown-item:hover {
  background: #f7f7f7;
}

/* Right-side header buttons / actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  margin-left: auto;
}

/* ===========================
   SEARCH (HEADER ICON + MODAL)
   - Shared search icon button in the header
   - Shared full-screen modal used on all pages
   - site_search.js controls opening, closing, and results rendering
=========================== */

.btn-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 0;
}

.btn-search svg {
  width: 18px;
  height: 18px;
  fill: #111;
  display: block;
}

.btn-search:hover {
  border-color: #e6e6e6;
  background: #f7f7f7;
}

/* Full-screen search modal overlay */
.search-modal {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 5000;
  display: none;
}

.search-modal.is-open {
  display: block;
}

.search-modal-inner {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 70px 80px;
}

/* Close button */
.search-close {
  position: absolute;
  top: 26px;
  right: 26px;
  background: transparent;
  border: 0;
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
}

/* Large search modal title */
.search-title {
  font-size: 64px;
  font-weight: 500;
  margin: 0 0 30px;
  letter-spacing: -0.02em;
}

/* Search input row */
.search-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.search-icon {
  font-size: 20px;
  opacity: 0.9;
}

.search-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #bbb;
  font-size: 18px;
  padding: 12px 6px;
  outline: none;
}

/* Search results list */
.search-results {
  margin-top: 20px;
}

.search-result {
  display: block;
  padding: 14px 0;
  text-decoration: none;
  color: #111;
  border-bottom: 1px solid #eee;
}

.search-result-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.search-result-url {
  font-size: 13px;
  color: #666;
}

.search-empty {
  margin-top: 18px;
  font-size: 14px;
  color: #666;
}

/* Contact CTA button */
.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: #111;
  color: #fff;
  border-radius: 0;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

/* Right-aligned dropdown helper if Contact ever gets a menu */
.contact-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.contact-dropdown .dropdown-menu {
  left: auto;
  right: 0;
  transform: none;
  min-width: 260px;
}

/* ===========================
   SHARE BUTTON + DROPDOWN
   - Click-only share menu
   - Supports email-share and copy-link interactions
=========================== */

.btn-share {
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  background: #fff;
  color: #111;
  border: 1px solid #e6e6e6;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.btn-share:hover {
  background: #f7f7f7;
}

.share-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Share opens only when JS adds .is-open */
.share-dropdown .dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  left: auto;
  transform: none;
  min-width: 360px;
  background: #fff;
  border: 1px solid #e9e9e9;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  padding: 0;
  z-index: 1200;
}

.share-dropdown.is-open .dropdown-menu {
  display: block;
}

.share-panel {
  padding: 18px;
}

.share-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}

.share-label {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.share-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 14px;
}

.share-input,
.share-link {
  border: 1px solid #cfcfcf;
  padding: 10px 12px;
  font-size: 14px;
  width: 100%;
}

.share-link {
  background: #fafafa;
}

.share-email-btn,
.share-copy-btn {
  border: 1px solid #111;
  background: #fff;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.share-email-btn:hover,
.share-copy-btn:hover {
  background: #f7f7f7;
}

/* ===========================
   HOME PAGE
   - Large hero typography
   - Metadata row
   - Centered quote
   - Main hero image treatment
=========================== */

.home-hero {
  padding: 10px 0 0;
}

.home-title {
  font-size: 185px;
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin: 15px 0 50px;
  font-weight: 750;
}

.home-rule {
  border: 0;
  border-top: 1px solid #dddddd;
  margin: 0 0 6px;
}

.home-meta {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  font-size: 14px;
  color: #333;
  padding: 12px 0 22px;
}

.home-meta .meta-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.home-meta .meta-right {
  text-align: right;
  align-items: flex-end;
}

.home-quote {
  margin: 30px auto 46px;
  text-align: center;
  font-size: 40px;
  line-height: 1.15;
  font-weight: 700;
  max-width: 800px;
}

.home-image-wrap {
  width: 100%;
  background: #f1f1f1;
  padding: 30px 0;
}

.home-image {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: block;
}

/* ===========================
   HOME LEARN MORE
   - Secondary panel beneath the hero image
   - Used for latest SPG and Credit research links
=========================== */

.home-learn-more-wrap {
  width: 100%;
  display: flex;
  background: #ffffff;
  padding: 10px 0 10px;
  justify-content: center;
}

.home-learn-more-panel {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background: #f2f2f2;
  padding: 30px 30px 30px;
}

.home-learn-more-title {
  margin: 0 0 18px;
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

.home-learn-more-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.learn-more-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: center;
  text-decoration: none;
  color: #111;
}

.learn-more-item:hover .learn-more-item-name {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.learn-more-item-media {
  width: 100%;
  height: 102px;
  background: #e8e8e8;
  overflow: hidden;
  display: block;
}

.learn-more-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 180ms ease;
}

.learn-more-item:hover .learn-more-item-media img {
  transform: scale(1.02);
}

.learn-more-item-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.learn-more-item-name {
  margin: 0;
  font-size: 24px;
  line-height: 1.65;
  letter-spacing: -0.015em;
  font-weight: 700;
  color: #333;
}

.learn-more-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: #666;
}

.learn-more-item-date {
  color: #666;
}

.learn-more-item-post {
  font-size: 14px;
  color: #333;
  line-height: 1.5;
  max-width: 680px;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.learn-more-item-arrow {
  font-weight: 700;
}

/* ===========================
   ABOUT / EDUCATION / EXPERIENCE ACCORDION
   - Shared accordion system for narrative and profile pages
   - Supports expandable sections and mixed media layouts
=========================== */

.about-accordion {
  margin: 30px 0 0;
  border-top: 0;
}

.about-item {
  border-bottom: 1px solid #dddddd;
  padding: 34px 0;
}

/* Remove last divider */
#about-accordion .about-item:last-child,
#education-accordion .about-item:last-child,
#experience-accordion .about-item:last-child {
  border-bottom: 0;
}

.about-item-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.65;
  letter-spacing: -0.015em;
  font-weight: 600;
  text-transform: uppercase;
}

/* Accordion icon */
.about-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  opacity: 0.75;
}

.about-item-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.about-item-icon {
  color: #666;
  opacity: 1;
}

/* Collapsible accordion body */
.about-item-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: max-height 600ms ease, opacity 450ms ease, transform 450ms ease;
}

.about-item.is-active .about-item-body {
  max-height: 2200px;
  opacity: 1;
  transform: translateY(0);
}

.about-item-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 42px;
  padding-top: 18px;
  align-items: start;
}

.about-item-inner.no-media {
  grid-template-columns: 1fr;
}

.about-item-text p {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.65;
  color: #333;
  text-align: justify;
  text-justify: inter-word;
}

/* ===========================
   RHYTHM NORMALIZATION
   - Fine-tunes spacing inside Education and Experience lists
   - Keeps list-based content visually even and readable
=========================== */

:root {
  --rhythm-gap: 7px;
}

/* Education */
#education-accordion .about-item-text p {
  margin: 0 0 var(--rhythm-gap);
}

#education-accordion .about-item-text > ul {
  margin: 0;
  padding-left: 18px;
}

#education-accordion .about-item-text > ul > li {
  margin: 0 0 var(--rhythm-gap);
}

#education-accordion .about-item-text > ul > li:last-child {
  margin-bottom: 0;
}

#education-accordion .about-item-text > ul > li > ul {
  margin: var(--rhythm-gap) 0 0;
  padding-left: 28px;
}

#education-accordion .about-item-text > ul > li > ul > li {
  margin: 0 0 var(--rhythm-gap);
}

#education-accordion .about-item-text > ul > li > ul > li:last-child {
  margin-bottom: 0;
}

#education-accordion .coursework-columns > li {
  margin: 0 0 var(--rhythm-gap);
}

#education-accordion .coursework-columns > li:last-child {
  margin-bottom: 0;
}

#education-accordion .about-item-text ul li {
  font-size: 16px;
  line-height: 1.65;
  color: #333;
  text-align: justify;
  text-justify: inter-word;
}

/* Experience */
#experience-accordion .about-item-text > ul {
  margin: 0;
  padding-left: 18px;
}

#experience-accordion .about-item-text > ul > li {
  margin: 0 0 var(--rhythm-gap);
}

#experience-accordion .about-item-text > ul > li:last-child {
  margin-bottom: 0;
}

/* ===========================
   CERTIFICATIONS / PROJECTS
   - Shared formatting for long credential and project lists
   - Supports right-aligned dates in certification rows
=========================== */

.cert-wrap {
  width: 100%;
}

.cert-list {
  list-style: disc;
  list-style-position: outside;
  padding-left: 18px;
  margin: 0;
}

.cert-row {
  display: list-item;
  position: relative;
  padding-right: 220px;
}

.cert-text {
  display: inline;
  max-width: 980px;
  width: 100%;
}

.cert-date {
  position: absolute;
  right: 0;
  top: 0;
  white-space: nowrap;
  text-align: right;
  font-weight: 400;
  color: #666;
}

.cert-list > li {
  margin-bottom: 6px;
  line-height: 1.65;
}

.cert-list > li > ul {
  margin-top: 6px;
}

.cert-list ul li {
  margin-bottom: 6px;
}

#education-accordion .cert-list li,
#education-accordion .cert-row,
#education-accordion .cert-text {
  font-size: 16px;
  line-height: 1.65;
}

#education-accordion .cert-date {
  font-size: 16px;
  line-height: 1.65;
}

/* ===========================
   MEDIA
   - Shared image and caption formatting for accordion pages
=========================== */

.about-item-media {
  margin: 0;
}

.about-item-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
}

.about-item-media figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: #333;
  line-height: 1.65;
}

/* Spacer helper for pages with closed accordion sections */
.about-accordion::after {
  content: "";
  display: block;
  height: 80vh;
}

/* Title row helpers */
.about-item-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
}

.about-item-period,
.about-item-loc {
  font-size: 16px;
  font-weight: 400;
  color: #333;
  white-space: nowrap;
  text-transform: none;
  line-height: 1.65;
}

.job-date {
  font-style: normal;
  color: #333;
  white-space: nowrap;
  font-size: 16px;
  line-height: 1.65;
}

/* ===========================
   STATIC PAGES
   - Shared typography and spacing for content-heavy pages
   - Includes helper classes for lists, headings, and row layouts
=========================== */

.page {
  padding: 10px 0 120px;
}

.page-title {
  font-size: 185px;
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin: 15px 0 50px;
  font-weight: 750;
}

.section-block {
  max-width: 980px;
}

.section-rule {
  border: 0;
  margin: 0 0 100px;
}

.section-rule + h3 {
  margin-top: 22px;
}

.body-text,
.section-block p {
  font-size: 15px;
  line-height: 1.7;
  color: #222;
}

.section-block h3 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.section-block > h3:first-child {
  margin-top: 100px;
}

.section-gap {
  height: 18px;
}

/* Two-column coursework list */
.coursework-columns {
  columns: 2;
  column-gap: 40px;
  padding-left: 18px;
}

.section-block ul {
  margin: 10px 0 0 18px;
  padding: 0;
}

.section-block li,
.coursework-columns > li {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 0.85;
  color: #333;
  text-align: justify;
  text-justify: inter-word;
}

.section-block li:last-child,
.coursework-columns > li:last-child {
  margin-bottom: 0;
}

/* Experience summary */
.experience-summary {
  font-size: 15px;
  line-height: 1.7;
  color: #222;
  margin: 0 0 14px;
  max-width: 980px;
}

/* Education row helpers */
.edu-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  margin: 0 0 10px;
}

.edu-degree {
  margin: 0;
}

.edu-right {
  margin-left: 24px;
  text-align: right;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 400;
  color: #666;
}

/* Legacy experience helpers */
.employer-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
}

.employer-location {
  font-size: 14px;
  color: #666;
}

.job-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.job-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
  border-bottom: 1px solid #eeeeee;
}

.job-title {
  font-size: 15px;
  color: #222;
}

.job-dates {
  font-size: 14px;
  color: #666;
  white-space: nowrap;
}

/* ===========================
   FOOTER
   - Shared site footer layout
   - Includes email, message, social icons, newsletter, and copyright
=========================== */

.site-footer {
  border-top: 1px solid #dddddd;
  padding: 55px 0 50px;
  background: #fff;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 1.6fr 1fr;
  gap: 28px;
  align-items: center;
}

.footer-email a {
  color: #111;
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
}

.footer-email a:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.footer-message {
  font-size: 14px;
  color: #333;
  line-height: 1.6;
  text-align: center;
  justify-self: center;
  max-width: 420px;
}

.footer-social {
  display: flex;
  justify-content: flex-end;
  gap: 26px;
  flex-wrap: wrap;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  text-decoration: none;
}

.footer-social a:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.footer-social img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity 150ms ease;
}

.footer-social a:hover img {
  opacity: 0.85;
}

.footer-bottom-center {
  margin-top: 0px;
  font-size: 14px;
  color: #333;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  justify-self: center;
}

.footer-newsletter {
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
  max-width: 520px;
  margin-top: 58px;
}

.footer-newsletter-subtitle {
  font-size: 14px;
  color: #333;
  margin: 0 0 10px;
  text-align: center;
}

.footer-newsletter-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.footer-newsletter-input {
  width: 100%;
  border: 1px solid #cfcfcf;
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
  background: #fafafa;
}

.footer-newsletter-input:focus {
  background: #fff;
  border-color: #bdbdbd;
}

.footer-newsletter-btn {
  border: 1px solid #111;
  background: #111;
  color: #fff;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
}

.footer-newsletter-btn:hover {
  opacity: 0.92;
}

.footer-newsletter-note {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  font-size: 12px;
  color: #666;
  line-height: 1.4;
  text-align: center;
}

/* ===========================
   RESPONSIVE
   - Adjusts typography, layout, grids, and spacing for tablets/mobile
=========================== */

@media (max-width: 1100px) {
  .home-title {
    font-size: 96px;
  }

  .home-quote {
    font-size: 32px;
  }

  .about-item-title {
    font-size: 40px;
  }

  .page-title {
    font-size: 96px;
  }
}

@media (max-width: 820px) {
  .header-inner {
    height: auto;
    padding: 12px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .main-nav {
    flex-wrap: wrap;
    gap: 18px;
    justify-content: flex-start;
    position: static;
    left: auto;
    transform: none;
  }

  .home-title {
    font-size: 72px;
  }

  .home-meta {
    grid-template-columns: 1fr;
  }

  .home-meta .meta-right {
    text-align: left;
    align-items: flex-start;
  }

  .home-quote {
    font-size: 26px;
  }

  .home-image-wrap {
    padding: 40px 0;
  }

  .home-learn-more-wrap {
    padding: 26px 0 14px;
  }

  .home-learn-more-panel {
    padding: 22px 18px 18px;
  }

  .learn-more-item {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .learn-more-item-media {
    height: 180px;
  }

  .learn-more-item-name {
    font-size: 22px;
  }

  .about-item {
    padding: 26px 0;
  }

  .about-item-title {
    font-size: 32px;
  }

  .about-item-inner {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .page-title {
    font-size: 72px;
  }

  .coursework-columns {
    columns: 1;
  }

  .job-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
  }

  .footer-social {
    justify-content: flex-start;
  }

  .footer-bottom-center {
    justify-content: flex-start;
    text-align: left;
  }

  .footer-newsletter-subtitle {
    text-align: left;
  }

  .footer-newsletter-form {
    grid-template-columns: 1fr;
  }

  .share-dropdown .dropdown-menu {
    min-width: 320px;
    right: 0;
  }

  .cert-row {
    padding-right: 0;
  }

  .cert-date {
    position: static;
    display: block;
    margin-top: 6px;
    text-align: left;
  }

  .edu-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .edu-right {
    margin-left: 0;
    text-align: left;
  }

  .search-modal-inner {
    padding: 60px 22px;
  }

  .search-title {
    font-size: 44px;
  }
}

/* ===========================
   CONTACT PAGE
   - Two-column contact layout
   - Social icons on the left, form on the right
=========================== */

.contact-page {
  padding: 10px 0 120px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: start;
  margin-top: 28px;
}

.contact-left {
  max-width: 520px;
}

.contact-left-title {
  margin: 0 0 18px;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 750;
}

.contact-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
}

.contact-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  opacity: 0.9;
}

.contact-icon:hover {
  background: #f7f7f7;
}

.contact-icon:hover img {
  opacity: 1;
}

.contact-form {
  width: 100%;
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.contact-field label {
  display: block;
  font-size: 14px;
  color: #333;
  margin: 0 0 8px;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  border: 1px solid #bab9b9;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
  background: #fafafa;
}

.contact-field textarea {
  min-height: 160px;
  resize: vertical;
}

.contact-field input:focus,
.contact-field textarea:focus {
  background: #fff;
  border-color: #cfcfcf;
}

.contact-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  background: #111;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.contact-submit:hover {
  opacity: 0.92;
}

.contact-note {
  margin-top: 10px;
  font-size: 12px;
  color: #666;
  line-height: 1.5;
}

@media (max-width: 820px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .contact-left-title {
    font-size: 34px;
  }

  .contact-row {
    grid-template-columns: 1fr;
  }
}

/* ===========================
   FOOTER SPACING NORMALIZATION
   - Removes extra accordion spacer where not needed
   - Adjusts education page bottom spacing
=========================== */

.page .about-accordion::after,
.home-hero .about-accordion::after {
  display: none;
}

/* Education page tweaks */
main.page {
  padding-bottom: 0;
  flex: 0 0 auto;
}

#education-accordion {
  margin-bottom: 0;
}

/* ===========================
   MEDIUM RESEARCH CAROUSELS
   - Horizontal card carousels used on work_research.html
   - Supports arrows, custom scrollbar fill, and card layout
=========================== */

.mr-carousel {
  max-width: 1240px;
  margin: 70px auto 0;
}

.mr-carousel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.mr-carousel-title {
  margin: 0;
  font-size: 40px;
  letter-spacing: -0.02em;
  font-weight: 750;
}

.mr-carousel-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.mr-carousel-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e6e6e6;
  text-decoration: none;
  color: #111;
  font-weight: 600;
  font-size: 13px;
  background: #fff;
}

.mr-carousel-link:hover {
  background: #f7f7f7;
  text-decoration: underline;
  text-underline-offset: 6px;
}

.mr-carousel-arrows {
  display: inline-flex;
  gap: 10px;
}

.mr-arrow {
  width: 42px;
  height: 42px;
  border: 1px solid #e6e6e6;
  background: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mr-arrow:hover {
  background: #f7f7f7;
}

.mr-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 6px 2px 12px;
  -webkit-overflow-scrolling: touch;
}

.mr-track::-webkit-scrollbar {
  height: 10px;
}

.mr-track::-webkit-scrollbar-track {
  background: #efefef;
}

.mr-track::-webkit-scrollbar-thumb {
  background: #cfcfcf;
}

.mr-card {
  flex: 0 0 auto;
  width: 320px;
  background: #fff;
  border: 1px solid #ededed;
  text-decoration: none;
  color: #111;
  scroll-snap-align: start;
  transition: background 150ms ease, border-color 150ms ease;
}

.mr-card:hover {
  background: #fafafa;
  border-color: #e0e0e0;
}

.mr-card-media {
  height: 100px;
  background: #f1f1f1;
  overflow: hidden;
}

.mr-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.mr-card-body {
  padding: 35px 14px 16px;
}

.mr-card-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid #e6e6e6;
  font-size: 14px;
  font-weight: 750;
  background: #dcdcdc;
  margin-bottom: 20px;
}

.mr-card-title {
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 750;
  margin: 0 0 25px;
}

.mr-card-meta {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.mr-card-avatar {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid #e6e6e6;
  background: #f2f2f2;
}

.mr-card-meta-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mr-author-name {
  font-size: 16px;
  font-weight: 600;
  color: #111;
}

.mr-author-date {
  font-size: 14px;
  font-weight: 400;
  color: #666;
}

.mr-card-excerpt {
  margin: 0 0 25px;
  font-size: 16px;
  line-height: 1.65;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mr-scrollbar {
  height: 3px;
  background: #efefef;
  margin-top: 10px;
  position: relative;
}

.mr-scrollbar-fill {
  height: 100%;
  width: 0%;
  background: #038139;
}

.mr-empty {
  margin-top: 14px;
  font-size: 14px;
  color: #666;
}

@media (min-width: 1100px) {
  .mr-card {
    width: 310px;
  }
}

@media (max-width: 820px) {
  .mr-carousel-title {
    font-size: 32px;
  }
}

/* ===========================
   MEDIUM (TAG FEED) NOTICE
   - Small helper note beneath research components
=========================== */

.mr-note {
  font-size: 13px;
  color: #666;
  margin-top: 10px;
}

/* ===========================
   VIEW-ALL LIST PAGE
   - Layout for work_research_all.html archive view
   - Supports title, list rows, thumbnails, and excerpt blocks
=========================== */

.mr-list-page {
  padding: 40px 0 120px;
}

.mr-list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  margin: 10px 0 22px;
}

.mr-list-title {
  margin: 0;
  font-size: 40px;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.mr-back-link {
  color: #111;
  text-decoration: none;
  padding: 6px 2px;
  font-weight: 600;
}

.mr-back-link:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.mr-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.mr-list-item {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  gap: 22px;
  padding: 30px 0;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: #111;
}

.mr-list-item:hover {
  background: #fafafa;
}

.mr-list-item h3 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.02em;
  font-weight: 750;
}

.mr-list-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.mr-list-excerpt {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.65;
  color: #333;
  margin-bottom: 30px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mr-list-thumb {
  width: 100%;
  height: 160px;
  background: #f1f1f1;
  overflow: hidden;
  border: 1px solid #ededed;
}

.mr-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===========================
   VIEW-ALL: NUMBERED PAGER
   - Pagination controls for the research archive
=========================== */

.mr-pager {
  margin-top: 26px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.mr-pager a.mr-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #e6e6e6;
  background: #fff;
  color: #111;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.mr-pager a.mr-page-link:hover {
  background: #f7f7f7;
  text-decoration: underline;
  text-underline-offset: 6px;
}

.mr-pager a.mr-page-link.is-active {
  border-color: #111;
}

.mr-pager .mr-page-ellipsis {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 6px;
  color: #666;
  font-weight: 600;
}

.mr-pager button {
  border: 1px solid #e6e6e6;
  background: #fff;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 600;
}

.mr-pager button:hover {
  background: #f7f7f7;
}

/* ===========================
   RESEARCH ALL PAGE ONLY
   - Extra controls and layout refinements for archive filters
=========================== */

.research-all-page .home-quote {
  text-align: center;
  width: 100%;
  margin: 30px auto 0;
}

.research-all-page .mr-carousel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.research-all-page .mr-filter-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

.research-all-page .mr-carousel-link {
  margin-left: auto;
}

.research-all-page .mr-filter-select {
  min-width: 140px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #d7dce8;
  background: #fff;
  color: #111;
  font-size: 14px;
  border-radius: 0;
  outline: none;
}

.research-all-page .mr-filter-select:focus {
  border-color: #0b2b67;
}

.research-all-page .mr-filter-note {
  width: 100%;
  margin-top: 10px;
  font-size: 13px;
  color: #666;
}

@media (max-width: 820px) {
  .mr-list-title {
    font-size: 34px;
  }

  .mr-list-item {
    grid-template-columns: 1fr;
  }

  .mr-list-thumb {
    height: 190px;
  }

  .mr-pager {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .research-all-page .mr-carousel-actions {
    width: 100%;
    align-items: stretch;
  }

  .research-all-page .mr-filter-wrap {
    width: 100%;
  }

  .research-all-page .mr-filter-select {
    flex: 1 1 140px;
    min-width: 0;
  }
}