/* About page only. The top bar and side menu styles come from style.css. */

:root { --gold-deep: #8a6a22; --green-deep: #1f3328; }

body.about-page {
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
}

/* ---------- Top bar: dark green on the cream page ---------- */
.about-page .topbar {
  background: linear-gradient(var(--cream) 55%, rgba(246, 239, 224, 0));
  padding-bottom: 22px;
}
.about-page .topbar a { color: var(--green-deep); }
.about-page .menu-btn span { background: var(--green-deep); }
/* when the dark side menu is open, the bar goes back to cream so it can be seen */
.about-page.menu-open .topbar { background: none; }
.about-page.menu-open .topbar a { color: var(--cream); }
.about-page.menu-open .menu-btn span { background: var(--cream); }

/* ---------- Background kolam ---------- */
.kolam-bg {
  position: fixed; z-index: 0; pointer-events: none;
  right: -14vmin; bottom: -14vmin;
  width: min(78vmin, 620px); height: auto;
  opacity: 0.3;
  /* fades out towards the text, so the lines never sit behind the words */
  -webkit-mask-image: linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 85%);
  mask-image: linear-gradient(to left, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 85%);
}
.kolam-bg path, .seal path {
  fill: none; stroke: var(--gold-deep);
  stroke-linecap: round; stroke-linejoin: round;
}
.kolam-bg path { stroke-width: 2.2; }
.seal path { stroke-width: 3.4; }
.kolam-bg circle, .seal circle { fill: var(--gold-deep); }

/* Lines draw themselves once, dots fade in (about.js sets --d for each) */
.kolam-bg path, .seal path {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw 2.6s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
.kolam-bg circle, .seal circle {
  opacity: 0;
  animation: dotin 0.8s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes dotin { to { opacity: 1; } }

.seal { display: block; width: 64px; height: 64px; margin: 0 auto 18px; overflow: visible; }

/* ---------- Page ---------- */
.about {
  position: relative; z-index: 1;
  max-width: 720px; margin: 0 auto;
  padding: 118px 24px 72px;
}

.about-head { text-align: center; margin-bottom: 56px; }
.about-head .eyebrow { margin-bottom: 0.9rem; color: var(--gold-deep); }
.about-head h1 {
  margin: 0 auto;
  max-width: 18ch;
  font-family: "Fraunces", serif; font-weight: 600; line-height: 1.15;
  font-size: clamp(2rem, 5.2vw, 3.1rem);
  color: var(--green-deep);
}
.intro {
  margin: 1.2rem auto 0; max-width: 44ch;
  font-size: 1.05rem; line-height: 1.6;
  color: #3a463e;
}

/* ---------- Sections ---------- */
.block h2 {
  margin: 0 0 1rem;
  font-family: "Fraunces", serif; font-weight: 600;
  font-size: 1.6rem; line-height: 1.2;
  color: var(--green-deep);
}
.block > p {
  margin: 0; max-width: 62ch;
  font-size: 1.02rem; line-height: 1.75;
  color: var(--ink);
}

.divider {
  display: block; width: 240px; height: 24px;
  margin: 44px auto;
}

/* ---------- Background: text on the left, your photo on the right ---------- */
.bg-row {
  display: grid; grid-template-columns: 1fr 230px;
  gap: 36px; align-items: start;
}
.bg-row p {
  margin: 0;
  font-size: 1.02rem; line-height: 1.75;
  color: var(--ink);
}

/* your photo: a simple rectangle with a gold frame */
.portrait {
  position: relative; overflow: hidden;
  width: 100%; aspect-ratio: 4 / 5;
  margin: 0;
  border: 2px solid var(--gold-deep);
  border-radius: 6px;
  box-shadow: 0 0 0 6px var(--cream), 0 0 0 7.5px rgba(138, 106, 34, 0.45), 0 18px 36px rgba(31, 51, 40, 0.16);
  background: repeating-linear-gradient(45deg, rgba(138, 106, 34, 0.09) 0 10px, transparent 10px 20px), #f3ecdf;
}
/* the dashed "add your photo" box, shown until the real photo loads */
.portrait::before {
  content: "Add your photo\A" attr(data-ph); white-space: pre;
  position: absolute; inset: 10px; display: grid; place-content: center; text-align: center;
  padding: 10px; border: 1.5px dashed rgba(138, 106, 34, 0.55); border-radius: 3px;
  font-size: 0.78rem; line-height: 1.7; color: var(--gold-deep);
}
.portrait img {
  position: absolute; inset: 0; z-index: 1; display: block;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 20%; /* keeps your face in frame */
}
.portrait.loaded::before { display: none; }

/* ---------- Timelines ---------- */
.timeline-item {
  display: grid; grid-template-columns: 150px 1fr; gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(138, 106, 34, 0.3);
}
.timeline-item:first-child { padding-top: 4px; }
.timeline-item:last-child { border-bottom: 0; padding-bottom: 0; }
.when {
  padding-top: 3px;
  font-size: 0.85rem; font-weight: 500; letter-spacing: 0.04em;
  color: var(--gold-deep);
}
.timeline-item h3 {
  margin: 0 0 6px;
  font-family: "Fraunces", serif; font-weight: 600;
  font-size: 1.15rem; line-height: 1.3;
  color: var(--green-deep);
}
.timeline-item p {
  margin: 0;
  font-size: 0.95rem; line-height: 1.65;
  color: #3a463e;
}

/* ---------- View certificate button ---------- */
.view-btn {
  display: inline-block; margin-top: 10px; padding: 6px 16px;
  border: 1px solid var(--gold-deep); border-radius: 999px;
  color: var(--green-deep); font-size: 0.82rem; font-weight: 500; text-decoration: none;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
.view-btn:hover, .view-btn:focus-visible { background: var(--green-deep); color: var(--cream); }

/* ---------- Skills ---------- */
.skills {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.skills li {
  padding: 8px 16px;
  background: var(--green-deep); color: var(--cream);
  border: 1px solid rgba(201, 162, 75, 0.75);
  border-radius: 999px;
  font-size: 0.85rem; font-weight: 500;
}

/* ---------- Closing line ---------- */
.talk {
  margin: 64px 0 0; text-align: center;
  font-family: "Fraunces", serif; font-style: italic;
  font-size: 1.15rem; color: #3a463e;
}
.talk a {
  color: var(--gold-deep); text-decoration: none; font-style: normal;
  font-family: "Inter", sans-serif; font-size: 1rem; font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.5s var(--ease);
}
.talk a:hover, .talk a:focus-visible { border-bottom-color: var(--gold-deep); }

/* ---------- Reveal on scroll (same as the case studies) ---------- */
/* Named scroll-reveal on purpose: style.css already has a .reveal that plays on load */
.scroll-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--d, 0s);
}
.scroll-reveal.in-view { opacity: 1; transform: none; }

/* ---------- Small screens ---------- */
@media (max-width: 700px) {
  .about { padding-top: 104px; }
  .kolam-bg { opacity: 0.18; right: -34vmin; bottom: -30vmin; width: 100vmin; }
  .timeline-item { grid-template-columns: 1fr; gap: 4px; }
  .divider { margin: 36px auto; }

  /* Background: photo comes first, then the text */
  .bg-row { grid-template-columns: 1fr; gap: 28px; }
  .portrait { order: -1; max-width: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  .kolam-bg path, .seal path { animation: none; stroke-dashoffset: 0; }
  .kolam-bg circle, .seal circle { animation: none; opacity: 1; }
  .scroll-reveal { opacity: 1; transform: none; transition: none; }
  .talk a, .view-btn { transition: none; }
}