/* ─────────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:   #111;
  --grey-1:  #444;
  --grey-2:  #777;
  --grey-3:  #aaa;
  --grey-4:  #e0e0e0;
  --grey-5:  #f4f4f4;
  --white:   #fff;
  --accent:  #111;
  --radius:  12px;
  --ease:    cubic-bezier(0.4, 0, 0.2, 1);
  --font-paragraph: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--black);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

p {
  font-family: var(--font-paragraph);
}

/* List items in content areas match paragraph font/size */
.section-wrap li,
article li {
  font-family: var(--font-paragraph);
  font-size: 15px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { display: block; }

/* ─────────────────────────────────────────────
   NAV
───────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--grey-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  height: 60px;
}

.nav-logo {
  font-size: 15px;
  font-weight: 600;
  color: var(--black);
  letter-spacing: -0.01em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--grey-1);
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.18s, color 0.18s;
}
.nav-links a:hover { background: var(--grey-5); color: var(--black); }

.nav-cta {
  background: var(--black) !important;
  color: var(--white) !important;
  font-weight: 500 !important;
}
.nav-cta:hover { background: #333 !important; }

/* Theme toggle — top right, minimal */
.theme-toggle {
  --toggle-w: 44px;
  --toggle-h: 24px;
  --thumb: 18px;
  flex-shrink: 0;
  width: var(--toggle-w);
  height: var(--toggle-h);
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  position: relative;
  border-radius: 100px;
  transition: opacity 0.2s ease;
}
.theme-toggle:hover { opacity: 0.85; }
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.theme-toggle__track {
  position: absolute;
  inset: 0;
  background: var(--grey-4);
  border-radius: 100px;
  transition: background 0.3s var(--ease);
}
.theme-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: var(--thumb);
  height: var(--thumb);
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
.theme-toggle__icons {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  box-sizing: border-box;
}
.theme-toggle__icons svg {
  width: 12px;
  height: 12px;
  color: var(--grey-2);
  transition: color 0.25s ease, opacity 0.25s ease;
}
.theme-toggle__sun { opacity: 1; }
.theme-toggle__moon { opacity: 0.35; }
.theme-toggle[aria-pressed="true"] .theme-toggle__thumb {
  transform: translateX(calc(var(--toggle-w) - var(--thumb) - 6px));
}
.theme-toggle[aria-pressed="true"] .theme-toggle__track {
  background: var(--grey-2);
}
.theme-toggle[aria-pressed="true"] .theme-toggle__sun { opacity: 0.35; }
.theme-toggle[aria-pressed="true"] .theme-toggle__moon { opacity: 1; color: var(--white); }

/* ─────────────────────────────────────────────
   HERO
───────────────────────────────────────────── */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 0 60px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
}

.hero-left {
  max-width: 640px;
}

.hero-title {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.03em;
  color: var(--black);
  margin-bottom: 28px;
  text-align: left;
}

.hero-title .hero-title__line {
  display: block;
}

.hero-title .hero-title__line + .hero-title__line {
  margin-top: 0.08em;
}

/* Only the subtitle phrase (middle line) is grey and regular weight */
.hero-title .hero-title__line > span { color: var(--grey-2); font-weight: 400; }
.hero-title__no-wrap { white-space: nowrap; }

.hero-socials {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.social-icon {
  width: 32px;
  height: 32px;
  border: 1px solid var(--grey-4);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.18s, background 0.18s;
}
.social-icon:hover { border-color: var(--black); background: var(--grey-5); }
.social-icon svg { width: 14px; height: 14px; fill: var(--grey-1); }

.hero-tagline {
  font-size: 16px;
  color: var(--grey-2);
  font-weight: 400;
  margin-top: 4px;
}

.hero-right {
  position: relative;
  width: 360px;
  height: 440px;
  flex-shrink: 0;
}

/* Illustrated background blob */
.hero-blob {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
  border-radius: 140px 140px 120px 120px;
  overflow: hidden;
}

/* Subtle geometric pattern on blob */
.hero-blob::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 28px, rgba(0,0,0,0.04) 28px, rgba(0,0,0,0.04) 29px),
    repeating-linear-gradient(90deg, transparent, transparent 28px, rgba(0,0,0,0.04) 28px, rgba(0,0,0,0.04) 29px);
}

.hero-avatar {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 270px;
  object-fit: cover;
  object-position: top;
  border-radius: 0;
}

.hero-avatar--medium {
  width: 360px;
  height: 440px;
  top: 0;
  bottom: auto;
}

/* Fallback initials avatar */
.hero-avatar-fallback {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  font-size: 28px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.02em;
}

/* ─────────────────────────────────────────────
   COMPANY LOGOS
───────────────────────────────────────────── */
.logos-section {
  border-top: 1px solid var(--grey-4);
  border-bottom: 1px solid var(--grey-4);
  padding: 20px 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.logos-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  overflow: hidden;
}

.logos-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--grey-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.logos-track {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}

.logo-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border: 1px solid var(--grey-4);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--grey-1);
  gap: 6px;
  white-space: nowrap;
  cursor: default;
  pointer-events: none;
}
.logo-chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--grey-3);
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────
   SECTION WRAPPER
───────────────────────────────────────────── */
.section-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ─────────────────────────────────────────────
   ABOUT PAGE
───────────────────────────────────────────── */
.about-section {
  padding-top: 48px;
  padding-bottom: 80px;
}
.about-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  color: var(--black);
}
.about-content {
  max-width: 640px;
}
.about-content p {
  margin-bottom: 1.25em;
  color: var(--grey-1);
}
.about-content p:last-child {
  margin-bottom: 0;
}
.about-content li {
  color: var(--grey-1);
}

/* ─────────────────────────────────────────────
   HIGHLIGHTS
───────────────────────────────────────────── */
.highlights-section {
  padding-top: 72px;
  padding-bottom: 32px;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey-3);
  margin-bottom: 28px;
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.highlight-card {
  border: 1px solid var(--grey-4);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.highlight-card:hover {
  border-color: var(--grey-3);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.highlight-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--grey-5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.highlight-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--black);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.highlight-desc {
  font-size: 13px;
  color: var(--grey-2);
  line-height: 1.6;
  flex: 1;
}

.highlight-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--black);
  margin-top: 4px;
}
.highlight-link svg { width: 12px; height: 12px; }

/* ─────────────────────────────────────────────
   WORK — TABLE OF CONTENTS
───────────────────────────────────────────── */
.work-section {
  padding-top: 72px;
  padding-bottom: 80px;
  position: relative;
  overflow: visible;
  scroll-margin-top: 60px; /* so #work sits below sticky nav when linked */
}

/* Outer container that holds TOC + content side by side */
.work-outer {
  display: flex;
  gap: 0;
  align-items: flex-start;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
}

/* Sticky TOC on the far left — stays below nav and visible while scrolling case studies */
.toc {
  position: sticky;
  top: 60px; /* nav height: stays just below title bar, never under it */
  width: 200px;
  flex-shrink: 0;
  padding: 0 0 0 40px;
  align-self: flex-start;
  border: none !important;
  z-index: 10;
  height: fit-content;
  max-height: calc(100vh - 60px); /* keep within viewport below nav */
  overflow-y: auto;
}

.toc-group {
  margin-bottom: 28px;
  border: none !important;
  padding: 0;
}
.toc-group::before,
.toc-group::after {
  display: none !important;
}

.toc-group-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey-3);
  margin-bottom: 10px;
  border: none !important;
  padding: 0;
}
.toc-group-label::before,
.toc-group-label::after {
  display: none !important;
}

.toc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 12px;
  font-size: 13px;
  color: var(--grey-2);
  cursor: pointer;
  border-radius: 0 6px 6px 0;
  transition: color 0.18s, border-color 0.18s;
  border: none;
  border-left: 2px solid transparent;
}
.toc-item::before,
.toc-item::after {
  display: none !important;
}
.toc-item:hover { color: var(--black); }
.toc-item.active { color: var(--black); font-weight: 500; border-left-color: var(--black); }


/* Cards area — takes remaining space, max-width centered */
.work-main {
  flex: 1;
  min-width: 0;
  padding: 0 40px;
  max-width: 1100px;
}

/* ─────────────────────────────────────────────
   PROJECT CARDS
───────────────────────────────────────────── */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.project-card {
  scroll-margin-top: 60px; /* so card sits just below sticky nav when TOC links to it */
  border: 1px solid var(--grey-4);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 2fr;
  min-height: 480px;
  transition: border-color 0.2s, box-shadow 0.25s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  background: var(--white);
}
.project-card:hover {
  border-color: var(--grey-3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}

.project-card.article-card {
  grid-template-columns: 1fr 360px;
  min-height: 280px;
  background: var(--grey-5);
}

/* Use-case tiles: no title, no pill, image 2/3 width */
.project-card .project-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.project-card .project-badge {
  display: none;
}
.project-card .project-cta {
  white-space: nowrap;
}

.project-info {
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

.project-type {
  font-size: 11px;
  font-weight: 500;
  color: var(--grey-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.project-company {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--grey-1);
  margin-bottom: 0;
}

.project-title {
  font-size: clamp(26px, 2.8vw, 38px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--black);
  margin-bottom: 12px;
}

.project-desc {
  font-size: 16px;
  color: var(--grey-2);
  line-height: 1.65;
  max-width: 100%;
  margin-top: 4px;
}

.project-footer {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
  padding: 10px 20px;
  border: 1px solid var(--grey-4);
  border-radius: 8px;
  transition: background 0.18s, border-color 0.18s;
}
.project-cta:hover { background: var(--grey-5); border-color: var(--grey-3); }
.project-cta svg { width: 12px; height: 12px; }

.project-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--grey-2);
  padding: 6px 12px;
  background: var(--grey-5);
  border-radius: 20px;
}

.restricted-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--grey-3);
  padding: 4px 10px;
  border: 1px solid var(--grey-4);
  border-radius: 20px;
}

.project-visual {
  background: var(--grey-5);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Real project cover image — show full image (no crop) */
.project-visual__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Hover: subtle zoom so image stays fully visible */
.project-card:hover .project-visual__img {
  transform: scale(1.03);
}

/* Dark overlay on hover for contrast and focus */
.project-visual__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.project-card:hover .project-visual__overlay {
  opacity: 1;
}

.project-visual img:not(.project-visual__img) {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Fallback backgrounds when image is missing */
.project-visual.v-real-estate { background: linear-gradient(135deg, #f5f0ea 0%, #ede5d8 100%); }
.project-visual.v-telecom     { background: linear-gradient(135deg, #eaf0f5 0%, #d8e8f0 100%); }
.project-visual.v-engineering { background: linear-gradient(135deg, #eaeaf5 0%, #d8d8f0 100%); }
.project-visual.v-rd          { background: linear-gradient(135deg, #f0f5ea 0%, #e0ecd8 100%); }
.project-visual.v-agri        { background: linear-gradient(135deg, #f0f5ea 0%, #dcecd0 100%); }

/* Large project-number watermark — subtle over image */
.visual-number {
  font-size: 140px;
  font-weight: 700;
  color: rgba(0,0,0,0.06);
  letter-spacing: -0.05em;
  user-select: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
}

.project-card:hover .visual-number {
  transform: translate(-50%, -50%) scale(1.08);
  opacity: 0.12;
}

/* ─────────────────────────────────────────────
   CONTACT
───────────────────────────────────────────── */
.contact-section {
  border-top: 1px solid var(--grey-4);
  padding: 80px 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.contact-inner {
  max-width: 520px;
}

.contact-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.contact-sub {
  font-size: 14px;
  color: var(--grey-2);
  margin-bottom: 36px;
}

.contact-form { display: flex; flex-direction: column; gap: 14px; }

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-field label { font-size: 12px; font-weight: 500; color: var(--grey-1); }

.form-field input,
.form-field textarea {
  border: 1px solid var(--grey-4);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--black);
  outline: none;
  transition: border-color 0.18s;
  resize: none;
}
.form-field input:focus,
.form-field textarea:focus { border-color: var(--grey-3); }

.form-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.18s;
}
.form-btn:hover { background: #333; }

/* ─────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--grey-4);
  padding: 28px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-left { font-size: 12px; color: var(--grey-3); }

.footer-socials { display: flex; gap: 12px; align-items: center; }
.footer-socials a {
  font-size: 12px;
  color: var(--grey-3);
  transition: color 0.18s;
}
.footer-socials a:hover { color: var(--black); }

/* ─────────────────────────────────────────────
   HOVER ZOOM EFFECTS
───────────────────────────────────────────── */

/* Project cards — lift + slight scale */
.project-card {
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.project-card:hover {
  transform: translateY(-3px) scale(1.005);
}

/* Project title zoom on card hover */
.project-title {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
}
.project-card:hover .project-title {
  transform: scale(1.02);
  transform-origin: left center;
}

/* Highlight cards */
.highlight-card {
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.highlight-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}

/* Highlight icon bounce */
.highlight-icon {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.highlight-card:hover .highlight-icon {
  transform: scale(1.15) rotate(-4deg);
}

/* Highlight title subtle grow */
.highlight-title {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
}
.highlight-card:hover .highlight-title {
  transform: scale(1.015);
  transform-origin: left center;
}

/* TOC items slide */
.toc-item {
  transition: color 0.18s, border-color 0.18s, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toc-item:hover, .toc-item.active {
  transform: translateX(4px);
}

/* Logo chips — static, non-interactive */
.logo-chip {
  cursor: default;
  pointer-events: none;
}

/* Nav links */
.nav-links a {
  transition: background 0.18s, color 0.18s, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav-links a:hover {
  transform: translateY(-1px);
}

/* Social icons */
.social-icon {
  transition: border-color 0.18s, background 0.18s, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.social-icon:hover {
  transform: translateY(-3px) scale(1.1);
}

/* CTA buttons */
.project-cta {
  transition: background 0.18s, border-color 0.18s, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.project-cta:hover {
  transform: translateY(-1px) scale(1.03);
}

/* Arrow on highlight links */
.highlight-link svg {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.highlight-link:hover svg {
  transform: translateX(4px);
}

/* ─────────────────────────────────────────────
   SCROLL FADE
───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 860px) {
  nav { padding: 0 20px; }
  .nav-right { gap: 12px; }
  .hero { grid-template-columns: 1fr; padding: 48px 0 40px; }
  .hero-right { display: none; }
  .logos-section { padding: 16px 20px; }
  .section-wrap { padding: 0 20px; }
  .highlights-grid { grid-template-columns: 1fr; }
  .work-outer { flex-direction: column; }
  .toc { display: none; }
  .work-main { padding: 0 20px; }
  .project-card { grid-template-columns: 1fr; }
  .project-visual { height: 160px; }
  .contact-section { padding: 60px 20px; }
  footer { padding: 24px 20px; flex-direction: column; gap: 14px; text-align: center; }
}

/* ─────────────────────────────────────────────
   DARK MODE (html.dark-mode) / LIGHT (html.theme-light)
───────────────────────────────────────────── */
html.theme-light,
html.theme-light body {
  background: var(--white);
  color: var(--black);
}

html.dark-mode {
  background: #0c0c0e;
  color: #e8e8ea;
}
html.dark-mode body {
  background: #0c0c0e;
  color: #e8e8ea;
}

html.dark-mode nav {
  background: rgba(12, 12, 14, 0.88);
  border-bottom-color: rgba(255,255,255,0.08);
}

html.dark-mode .nav-logo { color: #f0f0f2; }
html.dark-mode .nav-links a { color: #a0a0a8; }
html.dark-mode .nav-links a:hover { background: rgba(255,255,255,0.06); color: #f0f0f2; }
html.dark-mode .nav-cta {
  background: #f0f0f2 !important;
  color: #0c0c0e !important;
}
html.dark-mode .nav-cta:hover { background: #e0e0e4 !important; }

/* Toggle in dark mode */
html.dark-mode .theme-toggle__track { background: rgba(255,255,255,0.12); }
html.dark-mode .theme-toggle__thumb {
  background: #e8e8ea;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
html.dark-mode .theme-toggle__icons svg { color: #a0a0a8; }
html.dark-mode .theme-toggle[aria-pressed="true"] .theme-toggle__track { background: rgba(255,255,255,0.2); }
html.dark-mode .theme-toggle[aria-pressed="true"] .theme-toggle__moon { color: #e8e8ea; }

html.dark-mode .hero-title { color: #f0f0f2; }
html.dark-mode .hero-title .hero-title__line > span { color: #a0a0a8; }
html.dark-mode .hero-tagline { color: #888892; }
html.dark-mode .social-icon {
  border-color: rgba(255,255,255,0.12);
}
html.dark-mode .social-icon:hover {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06);
}
html.dark-mode .social-icon svg { fill: #a0a0a8; }
html.dark-mode .hero-blob {
  background: linear-gradient(135deg, #1a1a1e 0%, #141418 100%);
}
html.dark-mode .hero-blob::before {
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 28px, rgba(255,255,255,0.03) 28px, rgba(255,255,255,0.03) 29px),
    repeating-linear-gradient(90deg, transparent, transparent 28px, rgba(255,255,255,0.03) 28px, rgba(255,255,255,0.03) 29px);
}
html.dark-mode .hero-avatar-fallback {
  background: #2a2a2e;
  color: #e8e8ea;
}

html.dark-mode .logos-section {
  border-color: rgba(255,255,255,0.08);
}
html.dark-mode .logos-label { color: #707078; }
html.dark-mode .logo-chip {
  border-color: rgba(255,255,255,0.12);
  color: #a0a0a8;
}
html.dark-mode .logo-chip .dot { background: #606068; }

html.dark-mode .section-label { color: #707078; }

html.dark-mode .highlight-card {
  border-color: rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
}
html.dark-mode .highlight-card:hover {
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}
html.dark-mode .highlight-icon { background: rgba(255,255,255,0.08); }
html.dark-mode .highlight-title { color: #f0f0f2; }
html.dark-mode .highlight-desc { color: #a0a0a8; }
html.dark-mode .highlight-link { color: #e8e8ea; }

html.dark-mode .about-title { color: #f0f0f2; }
html.dark-mode .about-content p,
html.dark-mode .about-content li { color: #a0a0a8; }

html.dark-mode .toc-group-label { color: #707078; }
html.dark-mode .toc-item { color: #888892; }
html.dark-mode .toc-item:hover,
html.dark-mode .toc-item.active { color: #f0f0f2; }
html.dark-mode .toc-item.active { border-left-color: #f0f0f2; }

html.dark-mode .project-card {
  border-color: rgba(255,255,255,0.08);
  background: #111114;
}
html.dark-mode .project-card:hover {
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
html.dark-mode .project-card.article-card { background: #0f0f12; }
html.dark-mode .project-type { color: #707078; }
html.dark-mode .project-company { color: #a0a0a8; }
html.dark-mode .project-title { color: #f0f0f2; }
html.dark-mode .project-desc { color: #a0a0a8; }
html.dark-mode .project-cta {
  border-color: rgba(255,255,255,0.2);
  color: #e8e8ea;
}
html.dark-mode .project-cta:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.3);
}
html.dark-mode .project-badge {
  background: rgba(255,255,255,0.08);
  color: #a0a0a8;
}
html.dark-mode .project-visual { background: #0a0a0c; }
html.dark-mode .visual-number { color: rgba(255,255,255,0.06); }
html.dark-mode .project-card:hover .visual-number { opacity: 0.1; }

html.dark-mode .contact-section { border-top-color: rgba(255,255,255,0.08); }
html.dark-mode .contact-title { color: #f0f0f2; }
html.dark-mode .contact-sub { color: #a0a0a8; }
html.dark-mode .form-field label { color: #a0a0a8; }
html.dark-mode .form-field input,
html.dark-mode .form-field textarea {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: #e8e8ea;
}
html.dark-mode .form-field input::placeholder,
html.dark-mode .form-field textarea::placeholder { color: #606068; }
html.dark-mode .form-field input:focus,
html.dark-mode .form-field textarea:focus { border-color: rgba(255,255,255,0.25); }
html.dark-mode .form-btn {
  background: #e8e8ea;
  color: #0c0c0e;
}
html.dark-mode .form-btn:hover { background: #f0f0f2; }

html.dark-mode footer { border-top-color: rgba(255,255,255,0.08); }
html.dark-mode .footer-left,
html.dark-mode .footer-socials a { color: #707078; }
html.dark-mode .footer-socials a:hover { color: #e8e8ea; }

html.dark-mode .theme-toggle:focus-visible { outline-color: #e8e8ea; }
