:root {
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --accent: #0284c7;
  --border: #cbd5e1;
  --bg-start: #f8fafc;
  --bg-end: #e2e8f0;
  --bs-body-color: #212529;
  --panel-bg: rgba(255, 255, 255, 0.94);
  --card-bg: rgba(248, 250, 252, 0.95);
  --highlight-bg: rgba(255, 255, 255, 0.7);
  --hero-gradient: linear-gradient(135deg, rgba(2, 132, 199, 0.12), rgba(255, 255, 255, 0.94));
  --control-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

[data-theme="dark"] {
  --panel: #111827;
  --panel-2: #0b1220;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --border: #1f2937;
  --bg-start: #020617;
  --bg-end: #0f172a;
  --bs-body-color: #e5e7eb;
  --panel-bg: rgba(17, 24, 39, 0.92);
  --card-bg: rgba(11, 18, 32, 1);
  --highlight-bg: rgba(17, 24, 39, 0.7);
  --hero-gradient: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(17, 24, 39, 0.92));
  --control-shadow: 0 10px 30px rgba(2, 6, 23, 0.35);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, var(--bg-start), var(--bg-end)) no-repeat center center fixed;
  background-size: cover;
  color: var(--text);
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

.site-grid {
  max-width: 1400px;
  margin: 0 auto;
}

.sidebar-panel,
.content-panel,
.card {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.sidebar-panel,
.content-panel {
  padding: 24px;
}

.content-section {
  background: transparent;
  border: 0;
  border-radius: 0;
  margin-bottom: 20px;
  text-align: justify;
}

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

.eyebrow,
.muted,
.site-description,
.page-subtitle,
.page-footer,
.company-logo,
.card-meta {
  color: var(--muted);
}

.site-description {
  text-align: justify;
}

.site-name,
.page-title,
h3,
h4 {
  margin-top: 0;
}

.site-name {
  white-space: nowrap;
  text-align: center;
}

.sidebar-nav .nav-link {
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-2);
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
  border-color: var(--accent);
  text-decoration: none;
  transform: translateX(2px);
}

.top-right-controls {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1030;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-links {
  align-items: center;
}

.theme-toggle,
.language-toggle,
.contact-link {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--control-shadow);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.theme-toggle {
  color: var(--text);
}

.language-toggle {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
}

.contact-link {
  color: var(--muted);
}

.theme-toggle:hover,
.language-toggle:hover,
.contact-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}

.language-toggle:disabled {
  color: var(--muted);
  opacity: 0.75;
  cursor: not-allowed;
}

.language-toggle:disabled:hover {
  color: var(--muted);
  border-color: var(--border);
  transform: none;
}

.theme-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.contact-icon-font {
  font-size: 1.15rem;
  line-height: 1;
}

.contact-icon-image {
  max-width: 20px;
  max-height: 20px;
  display: block;
}

.article-card h3 {
  margin-bottom: 0.35rem;
  text-align: left;
}

.article-meta {
  margin-bottom: 0.1rem;
  color: var(--muted);
}

.article-achievement {
  margin: 0;
  padding-left: 1.25rem;
}

.article-achievement li + li {
  margin-top: 0.4rem;
}

.article-skill {
  margin-top: 1rem;
}

.article-highlight {
  margin: 0.25rem 0 0.25rem 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--highlight-bg);
}

.article-highlight h3 {
  font-size: 1.10rem;
}

.theme-dark-asset {
  display: none;
}

.theme-light-asset {
  display: block;
}

[data-theme="dark"] .theme-light-asset {
  display: none;
}

[data-theme="dark"] .theme-dark-asset {
  display: block;
}

.hero-section {
  background: var(--hero-gradient);
}

.card-list {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.card {
  border-radius: 12px;
  padding: 16px;
  background: var(--card-bg);
  min-width: 0;
}

.card ul {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.card ul li {
  padding-right: 1rem;
}

.company-logo {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.tag-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list li {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--panel-2);
}

/* ── Photo slider ─────────────────────────────────────────────── */

.article-swiper {
  margin-top: 1.25rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel-2);
}

.article-swiper .swiper-wrapper,
.article-swiper .swiper-slide {
  min-width: 0;
  width: 100% !important;
}

.swiper-figure {
  margin: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

.swiper-photo {
  width: 100%;
  max-width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

.swiper-caption {
  text-align: center;
  padding: 0.5rem 1rem 2rem 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--panel-2);
  border-top: 1px solid var(--border);
}

.swiper-button-prev,
.swiper-button-next {
  color: var(--accent);
}

.swiper-button-prev::after,
.swiper-button-next::after {
  font-size: 1.2rem;
}

.swiper-pagination-bullet {
  background: var(--muted);
  opacity: 0.6;
}

.swiper-pagination-bullet-active {
  background: var(--accent);
  opacity: 1;
}

.swiper-pagination {
  bottom: 38px;
}

@media (max-width: 640px) {
  .swiper-photo {
    height: 200px;
  }
}

/* ─────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .top-right-controls {
    top: 16px;
    right: 16px;
    gap: 8px;
  }

  .sidebar-panel,
  .content-panel,
  .content-section {
    padding: 18px;
  }
}