.about-section {
  /* font-families kept exactly as before, only the color system moved to base.css */
  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  padding: clamp(2.75rem, 8vw, 5rem) clamp(1rem, 4vw, 1.5rem) clamp(3.5rem, 10vw, 6rem);
  overflow-x: hidden;
  width: 100%;
}

.about-section h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 5vw, 2.2rem);
  font-weight: 600;
  text-align: center;
  color: var(--color-primary);
  word-break: break-word;
}

.about-section h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin: 0.7rem auto 0;
  background: var(--color-accent);
  border-radius: 2px;
}

.about-section h3 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.5vw, 1.5rem);
  font-weight: 600;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: clamp(1.5rem, 4vw, 2.2rem);
  padding: 0 1rem;
}

.about-block {
  max-width: 1080px;
  margin: clamp(3rem, 8vw, 5.5rem) auto 0;
  width: 100%;
}

/* the shared .eyebrow component uses a system monospace font by default;
   this page keeps its original JetBrains Mono */
.about-section .eyebrow {
  font-family: var(--font-mono);
}

/* ---------- Intro ---------- */

.about-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(2rem, 5vw, 3.5rem);
  max-width: 1080px;
  margin: clamp(2rem, 6vw, 3rem) auto 0;
  flex-wrap: wrap;
  width: 100%;
}

/* the photo lives inside a small "editor window", nodding to the dev theme */
.editor-frame {
  width: 100%;
  max-width: 280px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  box-shadow: 0 20px 40px -12px rgba(10, 37, 64, 0.22);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  flex-shrink: 0;
}

.editor-frame:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 50px -12px rgba(10, 37, 64, 0.28);
}

.editor-frame .editor-titlebar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  background: var(--color-primary);
}

.editor-frame .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

/* dots stay monochrome (shades of white on navy) to keep the palette to two colors */
.editor-frame .dot.active {
  background: var(--color-accent);
}

.editor-frame .editor-filename {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
}

.editor-frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* text panel: a code-style object literal, then plain prose */
.about-text {
  width: 100%;
  max-width: 560px;
  text-align: left;
  min-width: 0;
}

.about-object {
  font-family: var(--font-mono);
  font-size: clamp(0.78rem, 2vw, 0.92rem);
  line-height: 1.9;
  background: var(--color-primary);
  color: #d7e6f0;
  border-radius: 10px;
  padding: clamp(1rem, 3vw, 1.4rem) clamp(1rem, 3vw, 1.6rem);
  margin-bottom: 1.6rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

/* two shades of the accent stand in for a syntax-highlight palette */
.about-object .kw { color: #7fb8ff; }
.about-object .key { color: #9db3c6; }
.about-object .str { color: #6bd6ec; }
.about-object .punc { color: #5b7791; }

.about-text p {
  font-size: clamp(0.92rem, 2.2vw, 1.02rem);
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.about-text .highlight {
  color: var(--color-primary);
  font-weight: 600;
  background: var(--color-accent-soft);
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
}

/* ---------- Academics: git-commit-style timeline ---------- */

.commit-graph {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding-left: clamp(1.5rem, 5vw, 2.2rem);
  padding-right: 0.25rem;
  width: 100%;
}

.commit-graph::before {
  content: "";
  position: absolute;
  left: clamp(6px, 2vw, 9px);
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    var(--color-accent) 0,
    var(--color-accent) 6px,
    transparent 6px,
    transparent 12px
  );
}

.commit {
  position: relative;
  margin-bottom: 1.8rem;
}

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

.commit-node {
  position: absolute;
  left: clamp(-2.2rem, -5vw, -1.5rem);
  top: 0.35rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 3px solid var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-bg-soft);
}

.commit.is-current .commit-node {
  background: var(--color-accent);
}

.commit-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 10px;
  padding: clamp(0.9rem, 3vw, 1.2rem) clamp(1rem, 3.5vw, 1.5rem);
  box-shadow: 0 6px 16px rgba(10, 37, 64, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  max-width: 100%;
}

.commit-card:hover {
  transform: translateX(6px);
  box-shadow: 0 10px 22px rgba(10, 37, 64, 0.1);
}

.commit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.3rem;
}

.commit-card h4 {
  font-family: var(--font-display);
  font-size: clamp(0.98rem, 2.8vw, 1.1rem);
  font-weight: 600;
  color: var(--color-primary);
}

.commit-tag {
  font-family: var(--font-mono);
  font-size: clamp(0.68rem, 2vw, 0.75rem);
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  white-space: nowrap;
}

.commit-card span {
  font-size: clamp(0.85rem, 2.2vw, 0.92rem);
  color: var(--color-text-muted);
  display: block;
}

/* ---------- Skills: rendered like a JSON object ---------- */

.skills-json {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 12px;
  padding: clamp(1.2rem, 4vw, 2rem) clamp(1.1rem, 4vw, 2.2rem);
  box-shadow: 0 10px 24px rgba(10, 37, 64, 0.08);
  font-family: var(--font-mono);
}

.skills-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--color-line);
}

.skills-row:last-child {
  border-bottom: none;
}

.skills-key {
  color: var(--color-primary);
  font-size: clamp(0.85rem, 2.3vw, 0.95rem);
  font-weight: 600;
  min-width: 130px;
  flex-shrink: 0;
}

.skills-key::after {
  content: ":";
  color: var(--color-text-muted);
}

.skills-values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

.skill-pill {
  font-size: clamp(0.76rem, 2vw, 0.85rem);
  color: var(--color-primary);
  background: var(--color-bg-soft);
  border: 1px solid var(--color-line);
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}

.skill-pill:hover {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

/* ---------- Certificates ---------- */

.certificates-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: clamp(1rem, 3vw, 1.8rem);
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
}

.certificate-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(10, 37, 64, 0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.certificate-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 30px rgba(10, 37, 64, 0.15);
}

.cert-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.9rem;
  background: var(--color-bg-soft);
  border-bottom: 1px solid var(--color-line);
}

.cert-tab span {
  font-family: var(--font-mono);
  font-size: clamp(0.65rem, 2vw, 0.72rem);
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cert-tab .cert-badge {
  font-family: var(--font-mono);
  font-size: clamp(0.6rem, 1.8vw, 0.68rem);
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.certificate-card img {
  width: 100%;
  height: clamp(140px, 28vw, 180px);
  object-fit: contain;
  background: #fff;
  padding: clamp(0.6rem, 2vw, 1rem);
  display: block;
}

.card-overlay {
  position: absolute;
  inset: 0;
  top: 33px;
  background: rgba(10, 37, 64, 0.92);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.35s ease;
  text-align: center;
}

.certificate-card:hover .card-overlay {
  opacity: 1;
}

.card-overlay h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.card-overlay p {
  font-size: 0.9rem;
  margin: 0;
  color: var(--color-accent);
  font-family: var(--font-mono);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .about-container {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
  }

  .editor-frame {
    max-width: 260px;
  }

  .about-text {
    text-align: left;
  }
}

@media (max-width: 700px) {
  .skills-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.85rem 0;
  }

  .skills-key {
    min-width: 0;
  }

  .commit-graph {
    padding-left: 1.6rem;
  }

  .commit-node {
    left: -1.6rem;
    width: 14px;
    height: 14px;
  }

  .commit-card:hover {
    transform: none;
  }
}

@media (max-width: 480px) {
  .about-block {
    margin-top: clamp(2.25rem, 9vw, 3rem);
  }

  .editor-frame {
    max-width: 220px;
  }

  .editor-frame .editor-filename {
    font-size: 0.62rem;
  }

  .about-object {
    padding: 1rem 1.1rem;
    white-space: pre-wrap;
    word-break: break-word;
  }

  .commit-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .certificates-container {
    grid-template-columns: 1fr;
    max-width: 340px;
  }

  .certificate-card:hover {
    transform: none;
  }
}

@media (max-width: 360px) {
  .about-section {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .commit-graph {
    padding-left: 1.3rem;
  }

  .commit-node {
    left: -1.3rem;
  }

  .skills-json {
    padding: 1rem 0.9rem;
  }
}

@media (hover: none) {
  .editor-frame:hover,
  .commit-card:hover,
  .skill-pill:hover,
  .certificate-card:hover {
    transform: none;
  }
}

@media (min-width: 1400px) {
  .about-block,
  .about-container {
    max-width: 1200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .editor-frame,
  .commit-card,
  .skill-pill,
  .certificate-card,
  .card-overlay {
    transition: none !important;
  }

  .editor-frame:hover,
  .commit-card:hover,
  .skill-pill:hover,
  .certificate-card:hover {
    transform: none !important;
  }
}