/* alisheryakubov.com — shared styles */

:root {
  /* palette — gold accent #ecab4b, white bg, black text */
  --bg: #ffffff;
  --surface: oklch(98% 0.008 85);
  --surface-2: oklch(96% 0.015 85);
  --fg: #000000;
  --muted: oklch(45% 0.008 85);
  --border: oklch(90% 0.01 85);
  --accent: oklch(74.5% 0.16 75);
  --accent-hover: oklch(68% 0.17 75);
  --accent-text: oklch(99% 0.002 85);
  --accent-soft: oklch(95% 0.04 75);

  /* type */
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "Menlo", Consolas, monospace;

  /* layout */
  --max-width: 1200px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: 0;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
  text-decoration: underline;
}

/* typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0 0 0.6em;
  color: var(--fg);
}

h1 {
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 600;
}

h2 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 600;
}

h3 {
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 550;
}

p {
  margin: 0 0 1.1em;
}

.lead {
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 65ch;
}

.small {
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.caption {
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.label {
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}

/* layout utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

.section {
  padding: clamp(72px, 10vw, 140px) 0;
}

.section-sm {
  padding: clamp(40px, 6vw, 80px) 0;
}

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 48px);
}

@media (min-width: 768px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
  .split .left {
    max-width: 420px;
  }
}

@media (min-width: 1024px) {
  .split {
    grid-template-columns: 0.9fr 1.1fr;
  }
}

/* header / nav */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.logo span {
  color: var(--muted);
  font-weight: 450;
}

.nav-toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--fg);
  margin: 5px 0;
  border-radius: 1px;
}

.nav-links {
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  display: none;
  flex-direction: column;
  gap: 4px;
}

.nav-links a {
  display: block;
  padding: 12px clamp(20px, 4vw, 48px);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: 0.01em;
}

.nav-links a:hover {
  background: var(--surface);
  text-decoration: none;
}

#nav-toggle-check {
  display: none;
}

#nav-toggle-check:checked ~ .nav-links {
  display: flex;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
  .nav-links {
    position: static;
    display: flex;
    flex-direction: row;
    gap: 8px;
    padding: 0;
    border: none;
    background: transparent;
  }
  .nav-links a {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
  }
  .nav-links a:hover {
    background: var(--surface);
  }
}

/* buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 550;
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  cursor: pointer;
  border: none;
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  background: var(--accent);
  color: var(--accent-text);
}

.button-primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.button-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}

.button-secondary:hover {
  background: var(--accent-soft);
  text-decoration: none;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.card-flat {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

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

@media (min-width: 640px) {
  .card-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .card-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* lists */
.list-unstyled {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-unstyled li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.list-unstyled li:last-child {
  border-bottom: none;
}

/* trust logos */
.logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(24px, 4vw, 48px);
  opacity: 0.7;
}

.logo-row img,
.logo-row svg {
  height: 28px;
  width: auto;
  filter: grayscale(100%);
}

/* hero */
.hero {
  padding-top: clamp(64px, 10vw, 120px);
  padding-bottom: clamp(64px, 10vw, 120px);
}

.hero-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.hero-photo-square {
  aspect-ratio: 1 / 1;
}

/* eyebrow */
.eyebrow {
  display: inline-block;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 18px;
}

/* expertise cards */
.expertise-card h3 {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.expertise-card p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.icon-spot {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  color: var(--accent);
}

.icon-spot svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.6px;
}

/* tags */
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
}

/* quote */
.blockquote {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0;
  padding-left: 24px;
  border-left: 2px solid var(--accent);
  color: var(--fg);
}

/* tables */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.table th,
.table td {
  padding: 12px 0;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery-item {
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item figcaption {
  padding: 10px 4px 4px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* footer */
.footer {
  border-top: 1px solid var(--border);
  padding: clamp(48px, 6vw, 80px) 0;
  background: var(--surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr repeat(3, 1fr);
  }
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 16px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  font-size: 14px;
  color: var(--muted);
}

.footer-col a:hover {
  color: var(--fg);
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

/* schema helper (visually hidden) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* search button in nav */
.nav-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--muted);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: border-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.nav-search-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nav-search-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.6px;
}

.nav-search-btn kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0;
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  background: var(--surface);
}

@media (max-width: 767px) {
  .nav-search-btn kbd {
    display: none;
  }
  .nav-search-btn {
    padding: 7px 10px;
  }
}

/* search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.search-overlay-open {
  display: block;
}

.search-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.search-dialog {
  position: relative;
  max-width: 640px;
  margin: 10vh auto 0;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  min-height: 60px;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.search-icon {
  color: var(--muted);
  flex-shrink: 0;
}

#search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 17px;
  font-family: var(--font-body);
  color: var(--fg);
  background: transparent;
  letter-spacing: -0.01em;
}

#search-input::placeholder {
  color: var(--muted);
}

.search-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--muted);
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.search-close:hover {
  background: var(--surface-2);
  color: var(--fg);
}

.search-results {
  max-height: 60vh;
  overflow-y: auto;
  padding: 8px;
}

.search-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

.search-result {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--fg);
  transition: background 0.12s ease;
}

.search-result:hover,
.search-result:focus {
  background: var(--surface);
  text-decoration: none;
  outline: none;
}

.search-result-body {
  flex: 1;
  min-width: 0;
  outline: none;
}

.search-result-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.search-result-category {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.search-result-date {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.search-result-title {
  font-size: 16px;
  font-weight: 550;
  font-family: var(--font-body);
  color: var(--fg);
  margin: 0 0 4px;
  line-height: 1.3;
}

.search-result-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-arrow {
  color: var(--muted);
  flex-shrink: 0;
  margin-top: 4px;
}

.search-result:hover .search-result-arrow {
  color: var(--accent);
}

.search-result mark {
  background: var(--accent-soft);
  color: var(--fg);
  border-radius: 2px;
  padding: 0 2px;
}

.search-footer {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.search-footer kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .gallery-item:hover img,
  .button,
  .nav-links a {
    transition: none;
  }
}
