/*
Theme Name: Sethi Emerald Prestige
Theme URI: https://rssethi.com/
Author: Dr. R. S. Sethi
Description: A premium academic and research portfolio theme for Dr. R. S. Sethi, preserving the complete website content and page structure.
Version: 2.8
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: sethi-emerald-prestige
*/

:root {
  --ink: #173b35;
  --ink-soft: #315b52;
  --mint: #5b9f88;
  --mint-deep: #3f806e;
  --mint-pale: #e8f3ed;
  --gold: #b88b38;
  --gold-pale: #f6efd9;
  --ivory: #f7f8f2;
  --paper: #ffffff;
  --line: #d7e1d9;
  --muted: #64756f;
  --shadow: 0 12px 30px rgba(23, 59, 53, .08);
  --shadow-lift: 0 20px 38px rgba(23, 59, 53, .14);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Work Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ivory); color: var(--ink); font-family: var(--sans); line-height: 1.65; }
body.dark { --ink: #eff6ef; --ink-soft: #c2d7c9; --mint: #9ad0b7; --mint-deep: #7db99e; --mint-pale: #294d42; --gold: #d5af62; --gold-pale: #4c4024; --ivory: #173b35; --paper: #20473e; --line: rgba(239,246,239,.18); --muted: #c2d7c9; --shadow: 0 12px 30px rgba(0,0,0,.18); --shadow-lift: 0 20px 38px rgba(0,0,0,.25); }
a { color: var(--mint-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold); }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 1000; background: var(--gold); color: var(--ink); padding: 8px 12px; }
.skip-link:focus { left: 8px; }
.site-header { position: sticky; top: 0; z-index: 50; background: #f8f7f0; border-bottom: 1px solid rgba(23,59,53,.08); backdrop-filter: blur(14px); transition: box-shadow .3s, border-color .3s; }
.site-header.scrolled { border-color: var(--line); box-shadow: var(--shadow); }
.header-inner { min-height: 86px; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; min-width: 250px; flex: 0 0 250px; }
.brand-mark { display: none; }
.brand-name { display: block; font: 400 1.42rem/1 var(--serif); color: #2e6f5b; white-space: nowrap; }
.brand-sub { display: block; margin-top: 7px; color: #5f6d68; font-size: .68rem; letter-spacing: .17em; text-transform: uppercase; white-space: nowrap; }
.main-nav { order: 2; flex: 1 1 auto; display: flex; justify-content: center; }
.main-nav > ul { display: flex; list-style: none; gap: 8px; align-items: center; justify-content: center; margin: 0; padding: 0; }
.main-nav li { position: relative; }
.main-nav a { display: inline-flex; align-items: center; gap: 6px; color: #39433f; text-decoration: none; padding: 10px 9px; font-size: .95rem; font-weight: 500; letter-spacing: .01em; white-space: nowrap; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a { color: var(--mint-deep); }
.main-nav .sub-menu { visibility: hidden; opacity: 0; transform: translateY(6px); position: absolute; top: calc(100% + 8px); left: 0; width: 300px; max-width: min(300px, calc(100vw - 24px)); max-height: none; overflow: visible; list-style: none; padding: 8px; margin: 0; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-lift); border-radius: 8px; z-index: 200; transition: opacity .28s ease, transform .28s ease, visibility 0s linear .65s; }
/* Keep every level clickable: nested menus open beside their parent rather than covering it. */
.main-nav .sub-menu .sub-menu { top: -9px; left: calc(100% + 8px); transform: translateX(6px); margin: 0; width: 280px; }
.main-nav .sub-menu .sub-menu.submenu-open-left { left: auto; right: calc(100% + 8px); transform: translateX(-6px); }
/* Generous invisible bridges prevent the pointer from falling into the gap while moving between levels. */
.main-nav li.menu-item-has-children::before { content: ""; position: absolute; z-index: 199; }
.main-nav > ul > li.menu-item-has-children::before { left: 0; right: 0; top: 100%; height: 12px; }
.main-nav .sub-menu li.menu-item-has-children::before { left: 100%; top: 0; width: 12px; height: 100%; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu, .main-nav li.menu-open > .sub-menu { visibility: visible; opacity: 1; transform: translateY(0); transition-delay: 0s; }
.main-nav .sub-menu li:hover > .sub-menu, .main-nav .sub-menu li:focus-within > .sub-menu, .main-nav .sub-menu li.menu-open > .sub-menu { transform: translateX(0); }
.main-nav .sub-menu a { display: block; padding: 11px 13px; min-height: 42px; border-radius: 5px; font-size: .86rem; line-height: 1.35; white-space: normal; }
.main-nav .sub-menu a:hover, .main-nav .sub-menu li.menu-open > a { background: var(--mint-pale); }
/* Clean navigation: remove all dropdown chevrons/toggle arrows from menu items */
.main-nav li.menu-item-has-children > a::after,
.main-nav li.menu-item-has-children > a::before,
.main-nav .dropdown-toggle,
.main-nav .submenu-toggle,
.main-nav button.submenu-toggle,
.main-nav .wp-block-navigation__submenu-icon,
.main-nav .wp-block-navigation__submenu-icon svg {
  display: none !important;
  content: none !important;
}
.main-nav li.menu-item-has-children > a { gap: 0; }

.header-tools { order: 3; display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.menu-toggle { display: none; border: 1px solid #dfe3dc; background: #fbfaf5; color: #53605b; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; place-items: center; }
.menu-toggle:hover { border-color: #c9d4cc; background: #fff; color: var(--mint-deep); }
.mobile-nav { display: none; border-top: 1px solid var(--line); padding: 4px 16px 18px; }
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav a { display: block; padding: 9px 0; color: var(--ink); text-decoration: none; }
.mobile-nav .sub-menu { padding: 0 0 5px 16px; border-left: 2px solid var(--gold); }
.reading-progress { height: 3px; position: fixed; top: 86px; left: 0; z-index: 49; width: 100%; pointer-events: none; }
.reading-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mint), var(--gold)); }
.hero { position: relative; overflow: hidden; background: var(--ink); color: #f6fbf6; }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .1; background-image: linear-gradient(rgba(255,255,255,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px); background-size: 84px 84px; pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); min-height: 620px; }
.hero-copy { position: relative; z-index: 1; display: flex; align-items: center; padding: 80px clamp(26px, 6vw, 90px) 80px 0; }
.hero-copy-inner { max-width: 640px; }
.eyebrow { display: inline-flex; color: var(--gold); font-size: .7rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; }
h1, h2, h3, h4 { color: var(--ink); font-family: var(--serif); font-weight: 400; letter-spacing: 0; line-height: 1.08; margin: 0; }
.hero h1 { color: #f6fbf6; font-size: clamp(3.8rem, 7vw, 6.2rem); }
.hero-role { color: #c4dfd0; text-transform: uppercase; letter-spacing: .12em; font-size: .9rem; margin: 22px 0 0; }
.hero-intro { color: #e0eee4; font-size: 1.02rem; line-height: 1.85; max-width: 640px; margin: 24px 0 0; }
.hero-bio-link { color: #e5b54b; text-decoration: underline; text-underline-offset: 4px; font-weight: 600; white-space: nowrap; }
.hero-bio-link:hover { color: #ffffff; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 6px; border: 1px solid transparent; text-decoration: none; font-size: .86rem; font-weight: 600; cursor: pointer; }
.button-primary { background: var(--gold); color: #243721; }
.button-primary:hover { background: #d4ab59; color: #243721; }
.button-ghost { border-color: rgba(255,255,255,.38); color: #f6fbf6; background: transparent; }
.button-ghost:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 52px 0 0; }
.stat-number { color: var(--gold); font: 400 2.25rem/1 var(--serif); }
.stat-label { display: block; margin-top: 8px; color: #bdd6c7; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.hero-photo { position: relative; min-height: 620px; background: #dae9df; overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(23,59,53,.32), transparent 55%); pointer-events: none; }
.section { padding: 78px 0; }
.section-band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); }
.section-heading { margin-bottom: 30px; }
.section-heading h2, .content-title { font-size: 2.15rem; }
.section-heading h2::after, .content-title::after { content: ""; display: block; width: 40px; height: 3px; background: var(--gold); margin-top: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); transition: .3s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--gold) 60%, var(--line)); }
.link-card { display: flex; flex-direction: column; gap: 10px; min-height: 150px; padding: 22px; color: var(--ink); text-decoration: none; }
.link-card strong { color: var(--mint-deep); font: 400 2rem/1 var(--serif); }
.link-card span { color: var(--muted); font-size: .88rem; }
.prose { max-width: 780px; color: var(--ink-soft); font-size: 1.02rem; line-height: 1.85; }
.prose p { margin: 0 0 20px; }
.prose strong, .entry strong { color: var(--ink); font-weight: 600; }
.page-hero { position: relative; overflow: hidden; padding: 70px 0 64px; background: var(--ink); color: #f6fbf6; border-bottom: 1px solid var(--line); }
.page-hero h1 { color: #f6fbf6; font-size: clamp(2.8rem, 6vw, 4.8rem); }
.page-hero p { color: #d3e6d9; max-width: 700px; margin: 20px 0 0; }
.page-hero .eyebrow { margin-bottom: 14px; }
.item-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.item-card { position: relative; overflow: hidden; padding: 22px 22px 22px 26px; }
.item-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(var(--mint), var(--gold)); }
.item-card h3 { font-size: 1.2rem; }
.item-meta { display: flex; flex-wrap: wrap; gap: 7px 18px; color: var(--muted); font-size: .82rem; margin-top: 9px; }
.item-meta .place { color: var(--mint-deep); }
.item-desc { margin: 13px 0 0; color: var(--ink-soft); font-size: .94rem; line-height: 1.75; }
.toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; padding: 15px; margin-bottom: 20px; }
.toolbar input, .toolbar select, .contact-form input, .contact-form textarea { width: 100%; border: 1px solid var(--line); background: var(--ivory); color: var(--ink); border-radius: 5px; padding: 10px 12px; }
.toolbar input { min-height: 44px; }
.toolbar select { min-height: 44px; }
.status { color: var(--muted); font-size: .86rem; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th { background: var(--ink); color: #f6fbf6; text-align: left; font-weight: 500; }
th, td { padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:nth-child(even) td { background: color-mix(in srgb, var(--mint-pale) 42%, transparent); }
.timeline { position: relative; margin-left: 12px; padding-left: 30px; border-left: 2px solid var(--line); }
.timeline .entry { position: relative; padding: 0 0 28px; }
.timeline .entry::before { content: ""; width: 12px; height: 12px; position: absolute; left: -37px; top: 4px; background: var(--gold); border: 3px solid var(--ivory); border-radius: 50%; box-shadow: 0 0 0 1px var(--gold); }
.entry h3 { font-size: 1.3rem; }
.entry .date { color: var(--muted); font-size: .84rem; margin-top: 4px; }
.entry .place { color: var(--mint-deep); font-size: .9rem; }
.quote { border-left: 4px solid var(--gold); background: var(--gold-pale); padding: 16px 20px; color: var(--ink); font-family: var(--serif); font-size: 1.18rem; }
.contact-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 30px; }
.contact-form { padding: 24px; }
.contact-form label { display: block; font-size: .87rem; font-weight: 600; margin-bottom: 16px; }
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form .button { margin-top: 2px; }
.info-list { list-style: none; margin: 18px 0 0; padding: 0; }
.info-list li { padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); }
.map-frame { width: 100%; min-height: 280px; border: 0; display: block; }
.search-modal { display: none; position: fixed; inset: 0; z-index: 100; background: rgba(10,25,21,.62); padding: 10vh 16px; }
.search-modal.open { display: block; }
.search-panel { width: min(680px, 100%); margin: 0 auto; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-lift); border-radius: 8px; overflow: hidden; }
.search-head { display: flex; gap: 8px; padding: 14px; border-bottom: 1px solid var(--line); }
.search-head input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 1rem; }
.search-results { max-height: 58vh; overflow: auto; padding: 8px; }
.search-results a { display: block; color: var(--ink); text-decoration: none; padding: 11px 12px; border-radius: 5px; }
.search-results a:hover { background: var(--mint-pale); }
.search-results small { display: block; color: var(--mint-deep); text-transform: uppercase; letter-spacing: .08em; font-size: .65rem; }
.site-footer { margin-top: 70px; background: var(--ink); color: #e5f0e7; }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 36px; padding: 58px 0; }
.site-footer h2 { color: #fff; font-size: 1.2rem; }
.site-footer h3 { color: var(--gold); font: 600 .75rem/1 var(--sans); letter-spacing: .15em; text-transform: uppercase; }
.site-footer p, .site-footer li, .site-footer a { color: #b9d2c1; font-size: .86rem; }
.site-footer ul { list-style: none; padding: 0; margin: 16px 0 0; }
.site-footer li { margin: 9px 0; }
.site-footer a { text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding: 20px 0; font-size: .76rem; color: #a6c1ae; display: flex; justify-content: space-between; gap: 16px; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s, transform .7s; }
.reveal.visible { opacity: 1; transform: none; }
.back-top { display: none; position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--gold); color: var(--ink); cursor: pointer; box-shadow: var(--shadow-lift); }
.back-top.visible { display: grid; place-items: center; }
.print-only { display: none; }
@media print {
  body { background: #fff; color: #111; }
  .section { padding: 0; }
  .print-only { display: block; }
  .card { box-shadow: none; border-color: #bbb; }
}
@media (max-width: 1050px) {
  .main-nav { display: none; }
  .menu-toggle { display: grid; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding: 72px 0; }
  .hero-photo { min-height: min(78vw, 620px); max-height: 620px; }
}
@media (max-width: 760px) {
  .container { width: min(100% - 24px, 680px); }
  .header-inner { min-height: 64px; }
  .reading-progress { top: 64px; }
  .brand { min-width: 0; flex: 1 1 auto; }
  .brand-name { font-size: 1.1rem; }
  .brand-sub { display: none; }
  .hero h1 { font-size: 4rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 26px 14px; }
  .section { padding: 54px 0; }
  .grid-4, .grid-3, .grid-2, .item-list, .contact-grid { grid-template-columns: 1fr; }
  .toolbar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 18px; padding: 42px 0; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
