/* ==========================================================================
   Academic Light Online (ALO) - Fast, Minimalist Consulting Theme
   ========================================================================== */

:root {
  /* Color Palette - Light Theme */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;
  --bg-tint: #f0fdf4;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  
  --heading: #00334c;           /* Deep navy-teal for titles */
  --accent: #006580;            /* Teal */
  --accent-hover: #00334c;
  --accent-light: #e6f2f5;
  --accent-border: #b3d6df;

  --badge-bg: #e6f2f5;
  --badge-text: #006580;

  --warn-bg: #fffbeb;
  --warn-border: #fde68a;
  --warn-text: #92400e;

  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --success-text: #065f46;

  --code-bg: #f8fafc;
  --code-border: #e2e8f0;
  
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.07);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, Cambria, "Times New Roman", Times, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  
  --max-width: 1200px;
  --header-height: 68px;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 12px;
}

[data-theme="dark"] {
  --bg-primary: #0b0f17;
  --bg-secondary: #111827;
  --bg-card: #151d2c;
  --bg-hover: #1e293b;
  --bg-tint: #064e3b22;
  --border-color: #243046;
  --border-light: #1a2333;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --heading: var(--text-primary);
  
  --accent: #38bdf8;
  --accent-hover: #7dd3fc;
  --accent-light: rgba(56, 189, 248, 0.1);
  --accent-border: rgba(56, 189, 248, 0.25);

  --badge-bg: #1e293b;
  --badge-text: #38bdf8;

  --warn-bg: #291b00;
  --warn-border: #78350f;
  --warn-text: #fde68a;

  --success-bg: #022c22;
  --success-border: #065f46;
  --success-text: #6ee7b7;

  --code-bg: #0f172a;
  --code-border: #1e293b;

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
}

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.68;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1.5rem);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

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



/* Header & Navigation */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: #00334c;
  border-bottom: 1px solid #00334c;
  transition: background-color 0.2s, border-color 0.2s;
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.logo-link:hover {
  text-decoration: none;
}

.logo-badge {
  background: #ffffff;
  color: #00334c;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.logo-text {
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 6px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-theme-toggle {
  margin: 0.25rem 0;
}

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.825rem;
  font-weight: 500;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
  color: var(--text-primary);
  background-color: var(--bg-hover);
  border-color: var(--accent);
}

.theme-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke: currentColor;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 0.4rem;
}

.mobile-menu-btn svg {
  width: 1.4rem;
  height: 1.4rem;
}

/* Container */
.container {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 3rem clamp(1rem, 3.5vw, 2.5rem) 5rem;
  flex: 1;
}

/* Section Common Styling */
section {
  margin-bottom: 4.5rem;
}

.section-title {
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--heading);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--border-color);
}

.section-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.15rem 0.6rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.section-subtitle {
  font-size: 1.02rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  text-decoration: none;
  border-color: var(--accent-border);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent-border);
}

.btn-outline:hover {
  background: var(--accent-light);
  text-decoration: none;
}

.btn-block {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
}

/* Hero Banner (About) */
.hero-banner {
  margin-bottom: 0;
  background: linear-gradient(90deg, #ffffff 0%, #ffffff 40%, #006580 100%);
  color: #00334c;
}

.hero-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 3.5vw, 2.5rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.hero-banner .hero-title,
.hero-banner .hero-lead,
.hero-banner .hero-lead strong {
  color: #00334c;
}

.hero-banner .hero-lead {
  margin-bottom: 0;
}

.hero-banner .hero-lead + .hero-lead {
  margin-top: 0.5rem;
}

/* Service taglines in hero */
.hero-services {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  margin-top: 1.1rem;
  padding: 0.85rem 1.2rem;
  background: rgba(0, 101, 128, 0.07);
  border-left: 3px solid var(--accent, #006580);
  border-radius: 0 var(--radius-sm, 6px) var(--radius-sm, 6px) 0;
}

.hero-services span {
  font-style: italic;
  font-size: clamp(0.97rem, 1.5vw, 1.12rem);
  color: #00455f;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.55;
  position: relative;
  padding-left: 1.1rem;
}

.hero-services span::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--accent, #006580);
  font-style: normal;
  font-weight: 700;
}

.hero-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.45);
}

.intro-wrap {
  flex: 0 0 auto;
  padding-bottom: 3rem;
}

.intro-section {
  margin-bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 1.5rem;
  align-items: stretch;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  padding: 0.25rem 0.7rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--heading);
}

.hero-lead {
  font-size: clamp(1.08rem, 1.8vw, 1.25rem);
  line-height: 1.68;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  max-width: 950px;
}

.hero-lead strong {
  color: var(--text-primary);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Highlight Card (Why Choose ALO) */
.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.highlight-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.highlight-icon {
  font-size: 1.35rem;
}

.highlight-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--heading);
}

.highlight-text {
  font-size: 1.02rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.highlight-text:last-child {
  margin-bottom: 0;
}

/* Quote Band */
.quote-band {
  margin-bottom: 0;
  background: linear-gradient(90deg, #ffffff 0%, #ffffff 40%, #006580 100%);
}

.quote-band-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 4.5rem) clamp(1rem, 3.5vw, 2.5rem);
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  line-height: 1.5;
  color: #00334c;
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Flip cards: photo + title on the front, details on the back */
.flip-card {
  height: 500px;
  perspective: 1200px;
  cursor: pointer;
  outline: none;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner,
.flip-card:focus-visible .flip-card-inner,
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius-lg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: var(--shadow-md);
}

.flip-card-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  color: #ffffff;
}

.flip-card-overlay {
  position: absolute;
  inset: 5%;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(0, 51, 76, 0.25);
}

.flip-card-title {
  position: relative;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.5);
}

.flip-card-title {
  font-size: 1.45rem;
  line-height: 1.3;
  font-weight: 700;
  color: #ffffff;
  padding: 0 2.5rem;
  letter-spacing: -0.015em;
}

.flip-card-back {
  transform: rotateY(180deg);
  background: #00334c;
  color: #ffffff;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.service-title {
  font-size: 1.2rem;
  line-height: 1.3;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.6rem;
  letter-spacing: -0.015em;
}

.service-description {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.service-list {
  list-style: none;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.service-list li {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  padding-left: 1.25rem;
  line-height: 1.5;
}

.service-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #fdb71a;
  font-weight: bold;
}

/* Competence Section */
.competence-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
}

.competence-block {
  min-width: 0;
  max-width: 100%;
}

/* Degree cards (Higher Education & Degrees) */
.degree-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.appointment-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 1.5rem;
}

.degree-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.degree-photo {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.degree-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  overflow: hidden;
  cursor: zoom-in;
}

.degree-open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.degree-open .degree-photo {
  transition: transform 0.3s ease;
}

.degree-open:hover .degree-photo {
  transform: scale(1.04);
}

.degree-body {
  padding: 1.35rem 1.35rem 1.5rem;
}

.degree-body::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  background: var(--accent);
  margin-bottom: 1.1rem;
}

.degree-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.degree-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--heading);
  margin-bottom: 0.5rem;
}

.degree-place {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.degree-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Higher Education & Degrees horizontal scroller (matching .reviews and .gallery) */
.degrees-scroller {
  max-width: 100%;
}

.degrees-scroller .gallery-track {
  align-items: stretch;
  max-width: 100%;
}

.degrees-scroller .gallery-nav {
  top: 50%;
}

.degrees-scroller .degree-card {
  flex: 0 0 auto;
  width: 340px;
  max-width: 80vw;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}

.degrees-scroller .degree-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.competence-block-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.docent-badge-card {
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.docent-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.docent-badge-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.uni-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.uni-tag {
  font-size: 0.775rem;
  font-weight: 600;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

/* Clients Grid */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.flip-card-short {
  height: 380px;
}

.flip-card-short .flip-card-back {
  justify-content: center;
}

.flip-card-short .service-description {
  margin-bottom: 0;
}

/* Gallery: horizontal scroll strip */
.gallery {
  position: relative;
}

.gallery-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.25rem 0.25rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-border) transparent;
}

.gallery-track:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius-lg);
}

.gallery-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  margin: 0;
  max-width: 80vw;
}

.gallery-open {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: zoom-in;
}

.gallery-open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.gallery-photo {
  display: block;
  height: 300px;
  width: auto;
  max-width: 80vw;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-open:hover .gallery-photo {
  transform: scale(1.04);
}

.gallery-caption {
  margin-top: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 400px;
}

.gallery-nav {
  position: absolute;
  top: 150px;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--heading);
  font-size: 1.75rem;
  line-height: 1;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}

.gallery-nav:hover {
  background: var(--bg-hover);
}

.gallery-nav-prev {
  left: -0.75rem;
}

.gallery-nav-next {
  right: -0.75rem;
}

/* Gallery lightbox */
.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.9);
}

.lightbox-figure {
  margin: 0;
  padding: 0 4.5rem;
  text-align: center;
}

.lightbox-img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-caption {
  margin-top: 0.85rem;
  color: #ffffff;
  font-size: 0.95rem;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

@media (max-width: 768px) {
  .gallery-photo {
    height: 220px;
  }

  .gallery-nav {
    display: none;
  }

  .lightbox-figure {
    padding: 0 0.75rem;
  }

  .lightbox-nav {
    top: auto;
    bottom: 1rem;
    transform: none;
  }
}

/* Peer reviews: horizontal scroller of review cards (reuses .gallery-track) */
.reviews .gallery-track {
  align-items: stretch;
}

.reviews .gallery-nav {
  top: 50%;
}

.review-card {
  flex: 0 0 auto;
  width: 340px;
  max-width: 80vw;
  scroll-snap-align: start;
  display: flex;
}

.review-open {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 1.5rem 1.5rem 1.35rem;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.review-open:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.review-open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.review-mark {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  line-height: 0.6;
  height: 1.6rem;
  color: var(--accent);
}

.review-highlight {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-style: italic;
  line-height: 1.55;
  color: var(--heading);
}

.review-lang {
  align-self: flex-start;
  margin-top: 0.75rem;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
}

.review-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: auto;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border-color);
}

/* keep space above the meta divider even when the card is short */
.review-highlight,
.review-lang {
  margin-bottom: 1.1rem;
}

.review-author {
  font-weight: 700;
  color: var(--text-primary);
}

.review-role {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.review-source {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-muted);
}

.review-more {
  margin-top: 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}

/* Peer review dialog */
.review-dialog {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 1rem;
  border: 0;
  background: transparent;
}

.review-dialog[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.review-dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
}

.review-dialog-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 680px;
  max-height: calc(100vh - 2rem);
  padding: 2rem 2rem 1.25rem;
  background: var(--bg-card);
  color: var(--text-primary);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.review-dialog-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--bg-hover);
  color: var(--heading);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.review-dialog-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.review-dialog-author {
  margin: 0.25rem 0 0;
  padding-right: 2.5rem;
  font-size: 1.4rem;
  color: var(--heading);
}

.review-dialog-role {
  margin: 0.2rem 0 0;
  color: var(--text-secondary);
}

.review-dialog-body {
  margin-top: 1.25rem;
  overflow-y: auto;
}

.review-dialog-body .review-text {
  margin: 0;
  padding-left: 1.1rem;
  border-left: 3px solid var(--accent-border);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-primary);
}

.review-dialog-body p {
  margin: 0 0 0.85rem;
}

.review-translation {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem 0.2rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  color: var(--text-secondary);
  line-height: 1.6;
}

.review-translation-title {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.review-dialog-body .review-cite {
  margin: 1.1rem 0 0;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-muted);
}

.review-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.review-dialog-nav {
  padding: 0.5rem 0.9rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  cursor: pointer;
}

.review-dialog-nav:hover {
  background: var(--bg-hover);
}

.review-dialog-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .review-card {
    width: 290px;
  }

  .review-dialog {
    padding: 0.5rem;
  }

  .review-dialog-panel {
    max-height: calc(100vh - 1rem);
    padding: 1.5rem 1.25rem 1rem;
  }
}

/* Policy Grid & Rows (Delivery & Fees) */
.policy-row {
  margin-bottom: 2.25rem;
}

.policy-row:last-child {
  margin-bottom: 0;
}

.policy-row-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-color);
}

.policy-grid,
.policy-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.policy-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}

.delivery-card {
  padding: 0;
  overflow: hidden;
}

.delivery-photo {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.delivery-body {
  padding: 1.5rem 1.75rem 0.75rem;
}

.policy-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.policy-icon {
  font-size: 1.35rem;
}

.policy-card-header h3,
.policy-subcard-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.policy-card p {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 0.85rem;
}

.payment-methods-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.payment-method-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.payment-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.payment-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.15rem 0 0 !important;
  line-height: 1.4;
}

.policy-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.policy-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
  padding-left: 1.2rem;
}

.policy-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 1.2rem;
  line-height: 1;
}

/* Application Steps */
.steps-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.step-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  flex-shrink: 0;
}

.step-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.step-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-sublist {
  margin-top: 0.65rem;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Notice Cards */
.notice-card {
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid;
}

.notice-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.warning-notice {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn-text);
}

.warning-notice p {
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 0.75rem;
  color: inherit;
}

.notice-highlight {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--warn-border);
  font-size: 0.9rem;
}

.privacy-notice {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

.privacy-notice p {
  font-size: 0.92rem;
  line-height: 1.65;
  color: inherit;
}

/* Contact & Application Layout */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2rem;
}

.single-form-layout {
  grid-template-columns: 1fr;
  max-width: 800px;
  margin: 0 auto;
}

.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-info-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.contact-subtitle {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: -0.85rem;
}

.contact-detail-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.detail-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-muted);
}

.detail-value {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Inquiry Form */
.inquiry-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.inquiry-form-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.form-instruction {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.form-fieldset {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 0.5rem;
  margin-bottom: 1.25rem;
}

.form-legend {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent);
  padding: 0 0.4rem;
}

.form-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .form-grid-2col {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.925rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
  background: var(--bg-primary);
}

.form-hints {
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.form-hints-title {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.form-hints ul {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.form-hints-empty {
  font-style: italic;
  color: var(--text-muted);
}

.form-optional {
  font-weight: 400;
  color: var(--text-muted);
}

.form-privacy-note {
  font-size: 0.775rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.75rem;
  line-height: 1.4;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 1.25rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  margin-top: auto;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-size: 1.05rem;
}

.footer-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.88rem;
}

.footer-links a {
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Selected Publications */
.publications {
  margin-top: 3rem;
  background: var(--bg-hover);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 3.5rem);
}

.pub-feature {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: center;
  margin-bottom: 3rem;
}

.pub-photo {
  grid-column: 1 / 8;
  grid-row: 1;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.pub-intro {
  grid-column: 7 / 13;
  grid-row: 1;
  background: var(--bg-card);
  padding: clamp(1.75rem, 4vw, 3.5rem);
  box-shadow: var(--shadow-md);
  position: relative;
}

.pub-heading {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.pub-intro p {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.pub-groups {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.pub-group-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.pub-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pub-list li {
  position: relative;
  padding-left: 1.5rem;
}

.pub-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 8px;
  height: 8px;
  background: var(--accent);
}

.pub-list-numbered {
  counter-reset: pub;
}

.pub-list-numbered li {
  counter-increment: pub;
  padding-left: 2rem;
}

.pub-list-numbered li::before {
  content: counter(pub) ".";
  top: 0;
  width: auto;
  height: auto;
  background: none;
  font-weight: 700;
  color: var(--accent);
}

.pub-title {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--text-primary);
}

a.pub-title {
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
  text-underline-offset: 3px;
}

a.pub-title:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.pub-source {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Responsive Media Queries */
@media (max-width: 960px) {
  .degree-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .competence-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .policy-grid,
  .policy-cards-grid,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .pub-photo,
  .pub-intro {
    grid-column: 1 / -1;
  }

  .pub-intro {
    grid-row: 2;
    margin: -3rem 1rem 0;
  }

  .degree-grid,
  .hero-banner-inner,
  .intro-section {
    grid-template-columns: 1fr;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: #00334c;
    border-bottom: 1px solid #00334c;
    flex-direction: column;
    padding: 1.25rem 1.5rem;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
  }

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

  .mobile-menu-btn {
    display: block;
  }

  .step-card {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

@media (max-width: 520px) {
  .container {
    padding-top: 1.75rem;
    padding-bottom: 3.5rem;
  }

  .highlight-card,
  .policy-card,
  .step-card,
  .contact-info-card,
  .inquiry-form-card {
    padding: 1.35rem 1.15rem;
  }

  .policy-card.delivery-card {
    padding: 0;
  }

  .delivery-body {
    padding: 1.25rem 1.15rem 0.5rem;
  }

  .services-grid,
  .clients-grid {
    grid-template-columns: 1fr;
  }

  /* Phone: slightly smaller type everywhere (rem-based sizes follow) */
  html {
    font-size: 13px;
  }

  section {
    margin-bottom: 3rem;
  }

  .section-title {
    font-size: 1.35rem;
  }

  /* About banner */
  .hero-banner-inner {
    padding: 2rem 1rem 2.25rem;
    gap: 1.5rem;
  }

  .hero-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
  }

  .hero-lead {
    font-size: 1rem;
  }

  .hero-photo {
    aspect-ratio: 16 / 10;
  }

  .intro-wrap {
    padding-bottom: 2rem;
  }

  /* Quote band */
  .quote-band-inner {
    padding: 2rem 1rem;
    font-size: 1.1rem;
  }

  /* Flip cards: shorter, with compact back text */
  .flip-card {
    height: 340px;
  }

  .flip-card-short {
    height: 240px;
  }

  .flip-card-title {
    font-size: 1.25rem;
  }

  .flip-card-back {
    padding: 1.15rem 1.25rem;
  }

  .flip-card-back .service-title {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
  }

  .flip-card-back .service-description {
    font-size: 0.85rem;
    line-height: 1.45;
    margin-bottom: 0.6rem;
  }

  .flip-card-back .service-list {
    gap: 0.3rem;
    padding-top: 0.6rem;
  }

  .flip-card-back .service-list li {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  /* Degree & appointment cards: thin photo strip */
  .degree-photo {
    aspect-ratio: 16 / 5;
  }

  .degree-body {
    padding: 1rem 1.15rem 1.15rem;
  }

  .degree-body::before {
    margin-bottom: 0.75rem;
  }

  .competence-layout {
    gap: 2rem;
  }

  /* Publications */
  .publications {
    padding: 1rem 1rem 1.75rem;
    margin-top: 2rem;
  }

  .pub-photo {
    aspect-ratio: 16 / 10;
  }

  .pub-intro {
    margin: -2rem 0.75rem 0;
    padding: 1.25rem;
  }

  .pub-heading {
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
  }

  .pub-intro p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .pub-feature {
    margin-bottom: 2rem;
  }

  .pub-groups {
    gap: 1.75rem;
  }

  .pub-title {
    font-size: 0.95rem;
  }

  /* Delivery photos */
  .delivery-photo {
    aspect-ratio: 2 / 1;
  }
}

@media print {
  .header, .theme-toggle, .mobile-menu-btn, .hero-actions, .inquiry-form-card, .footer {
    display: none !important;
  }

  body, html {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .flip-card {
    height: auto;
  }

  .flip-card-inner {
    transform: none !important;
  }

  .flip-card-front {
    display: none;
  }

  .flip-card-back {
    position: static;
    transform: none;
    background: #ffffff;
    color: #000000;
  }

  .flip-card, .policy-card, .step-card {
    break-inside: avoid;
    border: 1px solid #ccc !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flip-card-inner {
    transition: none;
  }
}
