/*
 * Vadim Kukushkin - Professional Website
 *
 * Design Philosophy:
 * - Conservative, text-driven aesthetic suitable for legal/advisory contexts
 * - Single serif font family (Libre Baskerville) for authority and readability
 * - Warm gray background, near-black text, no accent colors
 * - Desktop-first, max text width 700-760px, generous vertical spacing
 * - No gradients, animations, or decorative elements
 */

/* Typography Import */
@import url("https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap");

/* CSS Variables */
:root {
  /* Colors - muted, professional palette */
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --bg-page: #f8f7f5;
  --bg-white: #ffffff;
  --border-light: #e5e3df;
  --border-medium: #d4d2ce;

  /* Typography */
  --font-serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Spacing */
  --section-spacing: 100px;
  --content-max-width: 740px;
  --nav-height: 64px;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base */
html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-serif);
  color: var(--text-primary);
  background-color: var(--bg-page);
  line-height: 1.65;
  min-height: 100vh;
}

/*
 * Navigation
 * - Fixed position, visible on scroll
 * - Site name on left, navigation links on right
 * - Minimal, unobtrusive design
 */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background-color: var(--bg-page);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-name {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.site-name:hover {
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: all 0.2s ease;
}

/*
 * Page Layout
 * - Content area offset by nav height
 * - Centered text column with max-width
 * - Generous padding
 */
.page-wrapper {
  padding-top: var(--nav-height);
}

.content-wrapper {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.desktop-home {
  display: block;
}

.mobile-home {
  display: none;
}

/*
 * Typography
 * - H1: 30-34px for page titles
 * - H2: 22-26px for section headings
 * - H3: 18-20px for subsection headings
 * - Body: 17px base with 1.65 line-height
 */
h1 {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 16px;
}

h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 20px;
}

h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 12px;
}

h4 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 10px;
}

p {
  margin-bottom: 16px;
}

p:last-child {
  margin-bottom: 0;
}

/*
 * Links
 * - Subtle underline, no bright colors
 * - Darker on hover
 */
a {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-medium);
  transition: text-decoration-color 0.15s ease;
}

a:hover {
  text-decoration-color: var(--text-primary);
}

/*
 * Hero Section
 * - Name and title prominent
 * - Portrait image secondary, positioned right
 * - Text-dominant layout
 */
.hero {
  padding: 80px 0 var(--section-spacing);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 60px;
  align-items: start;
}

.hero-content {
  padding-top: 20px;
}

.hero-name {
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 8px;
}

.hero-title {
  font-size: 20px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 20px;
}

.hero-summary {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.hero-image {
  display: flex;
  justify-content: flex-end;
}

.portrait {
  width: 200px;
  height: auto;
  border-radius: 4px;
  filter: grayscale(10%);
}

/*
 * Sections
 * - Generous vertical spacing (90-120px)
 * - Subtle top border as divider
 * - Left-aligned text only
 */
.section {
  padding: var(--section-spacing) 0;
  border-top: 1px solid var(--border-light);
}

.section-title {
  font-size: 24px;
  font-weight: 400;
  color: #111827;
  margin-bottom: 24px;
}

.section-intro {
  margin-bottom: 32px;
}

/*
 * Subsections
 * - Clear separation between subsections
 * - Consistent spacing
 */
.subsection {
  margin-bottom: 40px;
}

.subsection:last-child {
  margin-bottom: 0;
}

.subsection-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 12px;
}

/*
 * Lists
 * - Clean bullet style
 * - Conservative bullet color (matches text)
 * - 8-10px vertical spacing between items
 * - Moderate left indentation
 */
ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.content-list {
  margin: 16px 0;
}

.content-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  line-height: 1.6;
}

.content-list li:last-child {
  margin-bottom: 0;
}

.content-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 4px;
  height: 4px;
  background-color: var(--text-secondary);
  border-radius: 50%;
}

/*
 * Services Section
 * - Numbered service blocks
 * - Clear visual separation
 */
.service-block {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-light);
}

.service-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.service-number {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.service-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 12px;
}

.service-description {
  margin-bottom: 16px;
}

/*
 * Background Summary Section
 * - Concise overview with link to full bio
 */
.background-summary .timeframe {
  font-style: italic;
  color: var(--text-secondary);
}

.languages {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.bio-link {
  display: inline-block;
  margin-top: 24px;
  font-weight: 400;
}

/*
 * Contact Section
 * - Formal, inviting tone
 * - Clear contact information
 */
.contact-info {
  margin-top: 24px;
}

.contact-item {
  margin-bottom: 8px;
}

.contact-label {
  color: var(--text-secondary);
}

.contact-note {
  margin-top: 20px;
  color: var(--text-secondary);
  font-style: italic;
}

/*
 * Highlight Text
 * - Emphasized summary paragraphs
 */
.highlight-text {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
  font-style: italic;
  color: var(--text-secondary);
}

/*
 * Footer
 * - Minimal design
 * - Copyright and privacy link
 */
.site-footer {
  margin-top: var(--section-spacing);
  padding: 40px 0;
  border-top: 1px solid var(--border-light);
}

.footer-content {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-content a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-content a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/*
 * Bio Page Specific Styles
 * - Denser content but well-spaced
 * - Clear section hierarchy
 */
.page-header {
  padding: 80px 0 48px;
}

.page-header h1 {
  margin-bottom: 12px;
}

.page-header .subtitle {
  font-size: 19px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.page-header .page-intro {
  color: var(--text-secondary);
  font-style: italic;
}

.bio-section {
  padding: 48px 0;
  border-top: 1px solid var(--border-light);
}

.bio-section-header {
  margin-bottom: 32px;
}

.bio-section-header h2 {
  margin-bottom: 8px;
}

.bio-section-header .role-info {
  font-size: 16px;
  color: var(--text-secondary);
  font-style: italic;
}

.bio-subsection {
  margin-bottom: 36px;
}

.bio-subsection:last-child {
  margin-bottom: 0;
}

.back-link {
  display: inline-block;
  margin-top: 48px;
  font-size: 15px;
}

/*
 * Privacy Panel
 * - Slide-in panel for privacy notice
 * - Accessible and keyboard-navigable
 */
body.privacy-open {
  overflow: hidden;
}

.privacy-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 200;
}

.privacy-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.privacy-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(520px, 90vw);
  background: var(--bg-white);
  border-left: 1px solid var(--border-light);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 250;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.privacy-panel.open {
  transform: translateX(0);
}

.privacy-header {
  padding: 32px 32px 20px;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}

.privacy-header h2 {
  font-size: 22px;
  margin-bottom: 0;
}

.privacy-close {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-medium);
  border-radius: 50%;
  background: var(--bg-white);
  color: var(--text-primary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.privacy-close:hover {
  border-color: var(--text-primary);
}

.privacy-content {
  padding: 24px 32px 40px;
  overflow-y: auto;
  flex: 1;
}

.privacy-content p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
}

.privacy-section {
  margin-top: 28px;
}

.privacy-section h3 {
  font-size: 17px;
  margin-bottom: 10px;
}

.privacy-section ul {
  margin: 12px 0 12px 20px;
  list-style: disc;
  color: var(--text-secondary);
  font-size: 16px;
}

.privacy-section li {
  margin-bottom: 6px;
  padding-left: 0;
}

.privacy-section li::before {
  display: none;
}

/*
 * Responsive Design
 * - Tablet and mobile adjustments
 * - Maintain readability at smaller sizes
 */
@media (max-width: 900px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-image {
    order: -1;
    justify-content: flex-start;
  }

  .portrait {
    width: 160px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-spacing: 72px;
    --nav-height: 56px;
  }

  html {
    font-size: 16px;
  }

  .nav-container {
    padding: 0 20px;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-page);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border-light);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .menu-toggle {
    display: block;
  }

  .menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
  }

  .menu-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
  }

  .content-wrapper {
    padding: 0 20px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 22px;
  }

  .hero {
    padding: 48px 0 var(--section-spacing);
  }

  .hero-name {
    font-size: 28px;
  }

  .hero-title {
    font-size: 18px;
  }

  .footer-content {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 0 24px;
  }

  .privacy-panel {
    width: 100%;
    height: 85%;
    top: auto;
    bottom: 0;
    border-left: none;
    border-top: 1px solid var(--border-light);
    border-radius: 12px 12px 0 0;
    transform: translateY(100%);
  }

  .privacy-panel.open {
    transform: translateY(0);
  }

  .privacy-header,
  .privacy-content {
    padding-left: 24px;
    padding-right: 24px;
  }

  .desktop-home {
    display: none;
  }

  .mobile-home {
    display: block;
  }

  .mobile-hero {
    padding: 48px 0 40px;
    border-bottom: 1px solid var(--border-light);
  }

  .mobile-hero-name {
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 8px;
  }

  .mobile-hero-title {
    font-size: 18px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
  }

  .mobile-hero-summary {
    color: var(--text-secondary);
    line-height: 1.65;
  }

  .mobile-hero-image {
    margin-top: 24px;
    display: flex;
    justify-content: center;
  }

  .mobile-portrait {
    width: 100%;
    max-width: 360px;
    height: auto;
    border-radius: 4px;
    filter: grayscale(10%);
  }

  .mobile-section {
    padding: 36px 0;
    border-bottom: 1px solid var(--border-light);
  }

  .mobile-section:last-child {
    border-bottom: none;
  }

  .mobile-section-title {
    font-size: 20px;
    font-weight: 400;
    color: #111827;
    margin-bottom: 16px;
  }

  .mobile-intro {
    margin-bottom: 20px;
  }

  .accordion-group {
    display: flex;
    flex-direction: column;
  }

  .accordion-item {
    padding: 14px 0;
    border-top: 1px solid var(--border-light);
  }

  .accordion-item:first-child {
    border-top: none;
  }

  .accordion-summary {
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    list-style: none;
  }

  .accordion-summary::marker {
    content: "";
  }

  .accordion-summary::-webkit-details-marker {
    display: none;
  }

  .accordion-panel {
    padding-top: 12px;
  }

  .bullet-accordion-group .accordion-item {
    padding: 6px 0;
    border-top: none;
  }

  .bullet-accordion .accordion-summary {
    font-size: 16px;
    font-weight: 400;
    position: relative;
    padding-left: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: var(--border-medium);
  }

  .bullet-accordion .accordion-summary::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 4px;
    height: 4px;
    background-color: var(--text-secondary);
    border-radius: 50%;
    transform: translateY(-50%);
  }

  .bullet-accordion .accordion-summary::after {
    content: "";
  }


  .mobile-home .subsection {
    margin-bottom: 24px;
  }

  .mobile-home .service-block {
    margin-bottom: 24px;
    padding-bottom: 24px;
  }

  .mobile-home .service-block:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .mobile-bio-link {
    display: inline-block;
    margin-top: 12px;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 16px;
  }

  .content-wrapper {
    padding: 0 16px;
  }

  .portrait {
    width: 140px;
  }

  .footer-content {
    padding: 0 16px;
  }
}
