:root {
    --site-text: #263238;
    --site-muted: #3c4654;
    --site-primary: #2563eb;
    --site-border: #e5e7eb;
    --site-surface: #f8fafc;
}

body {
    color: var(--site-text);
    background: #fff;
    line-height: 1.7;
}

/* Hide the Google Translate navigation toolbar on translated pages */
html body > #gt-nvframe, iframe#gt-nvframe {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
}

/* Prevent the page from being pushed down */
html,
body {
    top: 0 !important;
    margin-top: 0 !important;
}

p {
    text-align: justify;
    font-size: 12pt; 
    line-height: 25px;
}

ul.main li, ol.main li {
    font-size: 18pt; 
    line-height: 30px;
}

.breadcrumb {
    padding-left: 0;
    padding-right: 0;
    background: none;
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.text-justify {
  text-align: justify !important;
}

code {
    font-weight: 900;
}

a.cv, a.resume, a.projects, a.services, a.request, a.blog, a.turan {
    font-size: 65px;
    text-decoration: none;
}

a.resume {
    font-size: 45px;
    color: #b36e05;
}

a.resume:hover {
    color: #804e03;
}

a.projects {
    font-size: 45px;
    color: #950665;
}

a.projects:hover {
    color: #6c0249;
}

a.services {
    font-size: 45px;
    color: #5a0695;
}

a.services:hover {
    color: #350458;
}

a.request {
    font-size: 40px;
    color: #387605;
}

a.request:hover {
    color: #275303;
}

a.blog {
    font-size: 45px;
    color: #c4071a;
}

a.blog:hover {
    color: #75040f;
}

a.turan {
    font-size: 45px;
    color: #9e1b22;
}

a.turan:hover {
    color: #710409;
}

.home-intro p,
.project-card p,
.navigation-card p,
.contact-summary p {
    font-size: 1rem;
    line-height: 1.75;
}

.home-intro .lead {
    color: #475569;
    font-size: 1.1rem;
    max-width: 720px;
}

.section-eyebrow {
    color: var(--site-primary);
    font-size: 0.8rem !important;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.5 !important;
}

.home-intro h1 {
    color: #111827;
    letter-spacing: -0.035em;
}

img.profile {
    width: 150px;
    object-fit: cover;
    border: 5px solid var(--site-border);
    border-radius: 25%;
}

.section-divider, .breadcrumb-divider {
    border: 0;
    border-top: 1px solid var(--site-border);
    opacity: 1;
    margin: 1.5rem 0;
}

.breadcrumb-divider {
    margin-top: 0;
}

/* Language switcher */
.language-switcher {
    position: fixed;
    top: 5px;
    right: 5px;
    z-index: 1040;
    display: flex;
    align-items: center;
    gap: 6px;
}

.language-switcher__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    background: #fff;
    border: 1px solid var(--site-border);
    border-radius: 4px;
    box-shadow: 0 1px 4px rgb(0 0 0 / 10%);
    line-height: 1;
}

.language-switcher__link:hover {
    border-color: var(--site-primary);
    text-decoration: none;
}

.language-switcher__link img {
    display: block;
    width: 24px;
    height: 18px;
    object-fit: cover;
}

.language-switcher__link:focus-visible {
    outline: 2px solid var(--site-primary);
    outline-offset: 2px;
}

.language-switcher__link[hidden] {
    display: none;
}

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.section-heading h2,
.contact-summary h2 {
    font-size: 1.65rem;
    font-weight: 600;
    margin: 0;
    color: #111827;
}

.section-heading > a {
    font-size: 0.95rem;
    white-space: nowrap;
}

.project-card,
.navigation-card {
    display: block;
    height: 100%;
    padding: 1.25rem;
    border: 1px solid var(--site-border);
    border-radius: 0.5rem;
    background: #fff;
    text-decoration: none;
    transition: border-color 0.15s ease;
}

.project-card:hover,
.navigation-card:hover {
    border-color: #93b4f8;
    text-decoration: none;
}

.project-card h3,
.navigation-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.65rem;
}

.project-card h3 {
    text-align: center;
}

.project-card h3 a,
.navigation-card h3 {
    color: #1d4ed8;
    text-decoration: none;
}

.project-card p,
.navigation-card p {
    color: var(--site-muted);
    margin-bottom: 1rem;
}

.project-card .card-link {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Project logo area on homepage cards */
.project-card-logo {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.project-card-logo a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.project-card-logo img {
    display: block;
    max-width: 100px;
    max-height: 50px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Icons for Explore more navigation cards */
.navigation-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    color: var(--site-primary);
    background: #eff6ff;
    border-radius: 0.75rem;
}

.navigation-card-icon svg {
    display: block;
    flex-shrink: 0;
}

.navigation-card h3 {
    margin-bottom: 0.5rem;
}

.navigation-card p {
    margin-bottom: 1rem;
}

.navigation-card-link {
    display: inline-block;
    color: var(--site-primary);
    font-size: 0.95rem;
    font-weight: 500;
}

.navigation-card:hover .navigation-card-link {
    text-decoration: underline;
}

.navigation-card:focus-visible {
    outline: 2px solid var(--site-primary);
    outline-offset: 3px;
}

.contact-summary p {
    overflow-wrap: anywhere;
}

.gallery img {
    width: 100%;
    border: 1px solid #999;
}

.success {
    color: #387605;
}

.error {
    color: #c32c07;
}

.check {
  font-family: Arial, sans-serif;
}

.nowrap {
  white-space: nowrap;
}

/* Container to enable smooth horizontal scrolling */
.diagram-container {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  margin: 1rem 0;
}

.diagram-container pre {
  margin: 0;
  padding: 1rem;
  
  /* Force a web font with precise Unicode box-drawing support */
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 14px;           /* Absolute font size avoids scaling glitches */
  line-height: 1.15;         /* Eliminates vertical gaps between box borders */
  letter-spacing: 0;         /* Prevents letter-spacing adjustments on mobile */
  
  white-space: pre;
  word-break: normal;
  word-wrap: normal;
  
  /* Disable font feature settings that alter character spacing */
  font-variant-ligatures: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  
  /* Prevent Android auto font-scaling */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.arch-container {
  font-family: system-ui, -apple-system, sans-serif;
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-main);
}

.arch-card {
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  width: 100%;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
  overflow: hidden;
}

.arch-header {
  background-color: var(--bg-color);
  border-bottom: 2px solid var(--border-color);
  padding: 1rem;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.arch-content {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.arch-list {
  margin: 0;
  padding-left: 1.25rem;
}

.arch-list li {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.arch-list li::marker {
  color: var(--primary-color);
}

.arch-arrow {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 60px;
  color: var(--primary-color);
}

.arch-arrow svg {
  width: 32px;
  height: 32px;
}

/* Split grid container for multi-node architecture layers */
.arch-split-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  width: 100%;
}

/* Metadata / Latency label styling */
.arch-badge {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-color);
  background: var(--bg-color);
  padding: 0.25rem 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

@media (max-width: 575.98px) {
    .home-intro h1 {
        font-size: 2.25rem;
    }

    .home-intro .lead {
        font-size: 1rem;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.4rem;
    }

    .project-card,
    .navigation-card {
        padding: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-card,
    .navigation-card {
        transition: none;
    }
}

/* Two column grid for desktop viewports */
@media (min-width: 640px) {
  .arch-content {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .arch-split-grid {
    grid-template-columns: 1fr 1fr;
  }
}
