/* ==========================================================================
   Vikorjon A. Bakhriddinov — minimalist academic site
   ========================================================================== */

:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --navy: #0f1d32;
  --navy-soft: #1a2d4a;
  --gold: #b8923f;
  --gold-line: rgba(184, 146, 63, 0.35);
  --text: #23272e;
  --text-muted: #56606f;
  --text-faint: #8a8f99;
  --border: #e2ddd2;

  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, "Segoe UI", Arial, sans-serif;

  --container: 1080px;
  --nav-height: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  color: var(--navy);
}

p {
  margin: 0 0 1.1em;
  color: var(--text-muted);
}

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

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  border-bottom: 1px solid var(--gold-line);
}

.navbar {
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  white-space: nowrap;
}

.brand:hover {
  color: var(--gold);
  text-decoration: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  display: inline-block;
  padding: 6px 10px;
  font-size: 0.83rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #c8cfdb;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--gold);
  text-decoration: none;
}

.lang-switch {
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  flex-shrink: 0;
}

.lang-switch button {
  padding: 5px 9px;
  background: transparent;
  border: none;
  color: #c8cfdb;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-switch button.active {
  background: var(--gold);
  color: var(--navy);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: #fff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Hero — text left, circular portrait right
   ========================================================================== */

.hero {
  padding: 76px 0 60px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: center;
}

.hero-eyebrow {
  display: block;
  margin-bottom: 18px;
}

.hero-name {
  font-size: clamp(2.5rem, 5.4vw, 3.9rem);
  letter-spacing: 0.01em;
  margin-bottom: 14px;
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-style: italic;
  color: var(--navy-soft);
  margin-bottom: 10px;
}

.hero-areas {
  max-width: 520px;
  color: var(--text-faint);
  font-size: 0.96rem;
  margin-bottom: 26px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-portrait {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 22%;
  border: 1px solid var(--border);
  box-shadow: 0 18px 46px rgba(15, 29, 50, 0.18);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  padding: 13px 30px;
  background: var(--navy);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--navy);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  background: transparent;
  color: var(--navy);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
}

.btn-ghost:hover {
  background: var(--navy);
  color: #fff;
}

/* ==========================================================================
   Bio + credentials
   ========================================================================== */

.content {
  padding: 8px 0 76px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 48px;
  align-items: start;
  border-top: 1px solid var(--gold-line);
  padding-top: 48px;
}

.section-label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.article h2 {
  font-size: 1.9rem;
  margin-bottom: 20px;
}

.article p {
  font-size: 1.02rem;
}

.aside {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 30px 28px;
}

.aside h3 {
  font-size: 1.35rem;
  margin-bottom: 18px;
}

.cred-list {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
}

.cred-list li {
  position: relative;
  padding: 0 0 14px 18px;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.cred-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
}

.aside-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 10px;
}

.contact-lines {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
}

.contact-lines li {
  margin-bottom: 6px;
  font-size: 0.9rem;
  word-break: break-word;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ==========================================================================
   Inner pages
   ========================================================================== */

.page-header {
  padding: 60px 0 8px;
}

.page-header h1 {
  font-size: clamp(2.2rem, 5vw, 3rem);
  margin: 10px 0 14px;
}

.page-header .lead {
  max-width: 660px;
  color: var(--text-muted);
}

.page-header .auto-note {
  max-width: 660px;
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-top: 4px;
}

.section {
  padding: 32px 0 76px;
}

.divider-top {
  border-top: 1px solid var(--gold-line);
  padding-top: 32px;
}

/* ==========================================================================
   Publications
   ========================================================================== */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  border-top: 1px solid var(--gold-line);
  padding-top: 28px;
}

.filter-btn {
  padding: 7px 16px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--gold);
  color: var(--navy);
}

.filter-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.pub-list {
  display: flex;
  flex-direction: column;
}

.publication-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.publication-item:first-child {
  padding-top: 0;
}

.pub-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.pub-type {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.pub-year {
  font-size: 0.82rem;
  color: var(--text-faint);
}

.pub-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border: 1px solid var(--gold-line);
  color: var(--text-faint);
  border-radius: 2px;
}

.publication-item h3 {
  font-size: 1.26rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.pub-authors {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0 0 3px;
}

.pub-venue {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-faint);
  margin: 0;
}

.publication-item > p:not(.pub-authors):not(.pub-venue) {
  margin-top: 10px;
  font-size: 0.95rem;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ==========================================================================
   Teaching / Events cards
   ========================================================================== */

.entry-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.entry {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  padding: 26px 28px;
}

.entry-org {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 8px;
}

.entry h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.entry-term {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 10px;
}

.entry p:last-child {
  margin-bottom: 0;
  font-size: 0.96rem;
}

/* ==========================================================================
   Posts / Munosabat
   ========================================================================== */

.post-list {
  display: flex;
  flex-direction: column;
}

.post {
  max-width: 760px;
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
}

.post:first-child {
  padding-top: 0;
}

.post:last-child {
  border-bottom: none;
}

.post-date {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 10px;
}

.post h2 {
  font-size: 1.75rem;
  margin-bottom: 16px;
}

.post-body p {
  font-size: 1.02rem;
}

.post-body p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Office hours
   ========================================================================== */

.oh-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 44px;
  align-items: start;
}

.oh-slot {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 26px 28px;
  margin-bottom: 20px;
}

.oh-slot h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.oh-time {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--gold);
  margin: 0 0 6px;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 30px 28px;
}

.form-card h3 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.form-hint {
  font-size: 0.88rem;
  color: var(--text-faint);
  margin-bottom: 22px;
}

.form-group {
  margin-bottom: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 7px;
}

input,
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 0.94rem;
  transition: border-color 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.form-status {
  margin-top: 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gold);
  display: none;
}

.form-status.visible {
  display: block;
}

.form-note {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  margin-top: auto;
  background: var(--navy);
  color: #c8cfdb;
  padding: 40px 0;
}

.footer-inner {
  text-align: center;
}

.footer-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 6px;
}

.footer-areas {
  font-size: 0.85rem;
  color: #8f99a8;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin-bottom: 18px;
  font-size: 0.85rem;
  font-weight: 600;
}

.footer-copy {
  font-size: 0.78rem;
  color: #6b7686;
  letter-spacing: 0.03em;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1150px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--navy-soft);
    border-bottom: 1px solid var(--gold-line);
    padding: 10px 28px 18px;
    gap: 2px;
    display: none;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-menu a {
    padding: 10px 0;
    font-size: 0.9rem;
  }
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
    justify-items: center;
  }

  .hero-portrait {
    grid-row: 1;
    width: 220px;
    height: 220px;
  }

  .hero-areas {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .content-grid,
  .oh-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 560px) {
  .hero {
    padding: 48px 0 40px;
  }

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