/* ==========================================================================
   Page sections: services, toolkit, experience, education, credentials,
   contact, footer. Builds on the tokens from styles.css.
   ========================================================================== */

:root {
  --mint: #33fff5;
  --mint-deep: #33fff5;
  --ink: #0a0a0b;
  --line: rgba(255, 255, 255, 0.09);
  --panel: rgba(255, 255, 255, 0.035);
  --muted: #9b9b9b;
  --wrap: min(1180px, calc(100% - 14rem));
}

/* ---------- Shared section shell ---------- */
.pg {
  display: block;
  min-height: 0;
  padding: 10rem 0 8rem;
  position: relative;
  overflow: hidden;
}

.wrap {
  width: var(--wrap);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.pg p {
  font-family: "Cabin", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
}

.pg h2,
.pg h3 {
  font-family: "Cabin", sans-serif;
  font-weight: 700;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 1.4rem;
}

.eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: var(--mint);
}

.sec-head {
  max-width: 52rem;
  margin-bottom: 4rem;
}

.sec-title {
  font-size: clamp(2.3rem, 5vw, 4.4rem);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sec-title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--mint) 10%, #7ab8ff 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pg .sec-lead {
  margin-top: 1.5rem;
  font-size: 1.15rem;
  max-width: 40rem;
}

/* Section backdrops */
.services {
  background:
    radial-gradient(60rem 40rem at 90% 0%, rgba(51, 255, 245, 0.07), transparent 60%),
    #0d0d0e;
}

.skills.pg {
  background:
    radial-gradient(50rem 30rem at 0% 100%, rgba(122, 184, 255, 0.07), transparent 60%),
    #131314;
}

.experience.pg {
  height: auto;
  scroll-margin-top: 0;
  background:
    radial-gradient(50rem 40rem at 100% 30%, rgba(51, 255, 245, 0.06), transparent 60%),
    #0d0d0e;
}

.education {
  background: #121213;
}

.certs.pg {
  background: #181819;
}

.contact {
  background:
    radial-gradient(70rem 40rem at 50% 110%, rgba(51, 255, 245, 0.14), transparent 60%),
    #09090a;
  padding-bottom: 4rem;
}

/* ---------- Reveal on scroll ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0s);
}

html.js [data-reveal].in {
  opacity: 1;
  transform: none;
}

/* ---------- Spotlight cards ---------- */
.spot {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.4s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.spot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    28rem circle at var(--mx, 50%) var(--my, 0%),
    rgba(51, 255, 245, 0.13),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}

.spot:hover {
  border-color: rgba(51, 255, 245, 0.35);
}

.spot:hover::before {
  opacity: 1;
}

/* ---------- Services ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}

.bento .card {
  padding: 2.4rem;
  display: flex;
  flex-direction: column;
  min-height: 21rem;
}

.span-7 { grid-column: span 7; }
.span-5 { grid-column: span 5; }

.card-index {
  position: absolute;
  top: 1.6rem;
  right: 2rem;
  font-family: "Anton", sans-serif;
  font-size: 3.4rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.18);
  transition: -webkit-text-stroke-color 0.4s ease;
}

.card:hover .card-index {
  -webkit-text-stroke-color: var(--mint);
}

.card-icon {
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  font-size: 1.3rem;
  color: var(--ink);
  background: var(--mint);
  margin-bottom: auto;
}

.bento .card h3 {
  font-size: 1.9rem;
  letter-spacing: -0.01em;
  margin: 3rem 0 0.8rem;
}

.bento .card p {
  max-width: 34rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.tags li,
.chip {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: #cfcfcf;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 100vw;
  background: rgba(255, 255, 255, 0.03);
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease,
    transform 0.3s ease;
}

.chip:hover {
  color: var(--ink);
  background: var(--mint);
  border-color: var(--mint);
  transform: translateY(-3px);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  padding: 2.2rem 1.5rem;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.stat:last-child {
  border-right: 0;
}

.stat-num {
  font-family: "Anton", sans-serif;
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1;
  color: #fff;
}

.stat-num small {
  font-size: 0.55em;
  color: var(--mint);
}

.stat-text {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  padding-top: 0.6rem;
  color: var(--mint);
}

.pg .stat-label {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--muted);
}

/* ---------- Toolkit ---------- */
.marquee {
  overflow: hidden;
  margin: 0 0 1rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 55s linear infinite;
}

.marquee.rev .marquee-track {
  animation-direction: reverse;
  animation-duration: 65s;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-group {
  display: flex;
  align-items: center;
}

.marquee-group span {
  font-family: "Anton", sans-serif;
  font-size: clamp(2.8rem, 6.5vw, 5.6rem);
  line-height: 1.25;
  text-transform: uppercase;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.42);
  transition: color 0.3s ease;
}

.marquee-group span:nth-child(3n) {
  color: #fff;
  -webkit-text-stroke: 0;
}

.marquee-group span:hover {
  color: var(--mint);
  -webkit-text-stroke: 0;
}

.marquee-group span::after {
  content: "\2726";
  font-family: "Cabin", sans-serif;
  font-size: 0.32em;
  color: var(--mint);
  -webkit-text-stroke: 0;
  margin: 0 2.4rem;
  vertical-align: middle;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

.board {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.25rem;
  margin-top: 5rem;
}

.board .card {
  padding: 2.2rem;
}

.board .tall {
  grid-row: span 2;
}

.board h3 {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 1.4rem;
  margin-bottom: 1.8rem;
}

.board h3 i {
  color: var(--mint);
  font-size: 1.1rem;
}

.group + .group {
  margin-top: 1.6rem;
}

.group-label {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6f6f6f;
  margin-bottom: 0.8rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---------- Experience ---------- */
.exp-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 5rem;
  align-items: start;
}

.exp-side {
  position: sticky;
  top: 7rem;
}

.exp-side .sec-head {
  margin-bottom: 2.5rem;
}

.exp-side .sec-title {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
}

.tl {
  position: relative;
  padding-left: 2.6rem;
  list-style: none;
}

.tl::before,
.tl-fill {
  content: "";
  position: absolute;
  left: 0.45rem;
  top: 0.6rem;
  width: 2px;
  border-radius: 2px;
}

.tl::before {
  bottom: 0.6rem;
  background: var(--line);
}

.tl-fill {
  height: calc((100% - 1.2rem) * var(--p, 0));
  background: linear-gradient(var(--mint), #7ab8ff);
  box-shadow: 0 0 14px rgba(51, 255, 245, 0.6);
}

.tl-item {
  position: relative;
  padding: 0 0 3.6rem;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: -2.6rem;
  top: 0.55rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #0d0d0e;
  border: 2px solid #4a4a4a;
  transition: border-color 0.5s ease, background 0.5s ease, box-shadow 0.5s ease;
}

.tl-item.in::before {
  border-color: var(--mint);
  background: var(--mint);
  box-shadow: 0 0 0 6px rgba(51, 255, 245, 0.15);
}

.tl-year {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-family: "Anton", sans-serif;
  font-size: 2.6rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.35);
  transition: color 0.6s ease;
}

.tl-item.in .tl-year {
  color: #fff;
  -webkit-text-stroke: 0;
}

.badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--mint);
  padding: 0.3rem 0.7rem;
  border-radius: 100vw;
  -webkit-text-stroke: 0;
}

.tl-item h3 {
  font-size: 1.7rem;
  margin-top: 1rem;
  letter-spacing: -0.01em;
}

.pg .tl-org {
  color: var(--mint);
  font-weight: 700;
  margin-top: 0.2rem;
}

.pg .tl-desc {
  margin-top: 0.7rem;
  max-width: 32rem;
}

/* ---------- Education ---------- */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.edu-card {
  padding: 2.6rem;
  min-height: 19rem;
  display: flex;
  flex-direction: column;
}

.edu-card > i {
  position: absolute;
  right: -1.5rem;
  bottom: -2rem;
  font-size: 11rem;
  color: rgba(255, 255, 255, 0.035);
  transition: color 0.5s ease, transform 0.6s ease;
}

.edu-card:hover > i {
  color: rgba(51, 255, 245, 0.09);
  transform: rotate(-8deg) scale(1.06);
}

.edu-level {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mint);
}

.edu-card h3 {
  font-size: 2.1rem;
  line-height: 1.15;
  margin: 3.2rem 0 0.6rem;
  letter-spacing: -0.01em;
}

.pg .edu-school {
  color: #d8d8d8;
  font-size: 1.1rem;
}

.edu-card .badge {
  align-self: flex-start;
  margin-top: auto;
}

.story {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4rem;
  margin-top: 5rem;
  padding-top: 4rem;
  border-top: 1px solid var(--line);
}

.pg .story-quote {
  font-family: "Cabin", sans-serif;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #fff;
}

.story-quote span {
  color: var(--mint);
}

.story-body p + p {
  margin-top: 1.1rem;
}

/* ---------- Buttons ---------- */
.btn-mint {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.5rem 0.5rem 0.5rem 1.7rem;
  border-radius: 100vw;
  background: var(--mint);
  color: var(--ink);
  font-family: "Cabin", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.4s ease, transform 0.2s ease-out;
}

.btn-mint .arrow {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--mint);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.btn-mint:hover {
  box-shadow: 0 0 0 8px rgba(51, 255, 245, 0.14), 0 12px 40px rgba(51, 255, 245, 0.25);
}

.btn-mint:hover .arrow {
  transform: rotate(-45deg);
}

.btn-mint[disabled] {
  opacity: 0.6;
  pointer-events: none;
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-ghost .arrow {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-ghost:hover {
  background: var(--mint);
  color: var(--ink);
  border-color: var(--mint);
}

.btn-ghost:hover .arrow {
  background: var(--ink);
  color: var(--mint);
}

/* ---------- Contact ---------- */
.pg h2.contact-title {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: clamp(3.4rem, 10vw, 9rem);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.005em;
}

.contact-title span {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.5);
}

.contact-title em {
  font-style: normal;
  color: var(--mint);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 5rem;
  margin-top: 5rem;
}

.contact-list {
  list-style: none;
}

.contact-list a,
.contact-list .loc {
  display: flex;
  align-items: center;
  gap: 1.3rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  color: #fff;
  text-decoration: none;
  font-size: clamp(1.05rem, 1.7vw, 1.4rem);
  font-weight: 700;
  transition: color 0.3s ease, padding 0.4s ease;
}

.contact-list li:first-child a {
  border-top: 1px solid var(--line);
}

.contact-list i.lead {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1rem;
  border: 1px solid var(--line);
  color: var(--mint);
  flex-shrink: 0;
  transition: background 0.3s ease, color 0.3s ease;
}

.contact-list a:hover {
  color: var(--mint);
  padding-left: 0.8rem;
}

.contact-list a:hover i.lead {
  background: var(--mint);
  color: var(--ink);
}

.contact-list .go {
  margin-left: auto;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.contact-list a:hover .go {
  opacity: 1;
  transform: none;
}

.socials {
  display: flex;
  gap: 0.8rem;
  margin-top: 2rem;
}

.socials a {
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.socials a:hover {
  background: var(--mint);
  color: var(--ink);
  transform: translateY(-4px);
}

.form-card {
  padding: 2.6rem;
}

.form-card h3 {
  font-size: 1.6rem;
  margin-bottom: 2rem;
}

.field {
  position: relative;
  margin-bottom: 1.6rem;
}

.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-family: "Cabin", sans-serif;
  font-size: 1.1rem;
  padding: 1.4rem 0 0.6rem;
  outline: none;
  resize: none;
  transition: border-color 0.3s ease;
}

.field textarea {
  min-height: 7.5rem;
}

.field label {
  position: absolute;
  left: 0;
  top: 1.35rem;
  font-size: 1.05rem;
  color: #7d7d7d;
  pointer-events: none;
  transition: all 0.25s ease;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--mint);
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  top: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mint);
}

.field.invalid input,
.field.invalid textarea {
  border-color: #ff6b6b;
}

.field-error {
  display: block;
  min-height: 1.1rem;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: #ff8a8a;
}

.form-foot {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.pg .form-status {
  font-size: 0.9rem;
  color: var(--muted);
}

.pg .form-status.ok {
  color: var(--mint);
}

/* ---------- Footer ---------- */
.foot {
  margin-top: 7rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.pg .foot p {
  font-size: 0.85rem;
  color: #6f6f6f;
}

.foot a {
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: color 0.3s ease;
}

.foot a:hover {
  color: var(--mint);
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .exp-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .exp-side {
    position: static;
  }

  .story,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 900px) {
  .bento .span-7,
  .bento .span-5 {
    grid-column: span 12;
  }

  .board,
  .edu-grid {
    grid-template-columns: 1fr;
  }

  .board .tall {
    grid-row: auto;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat:nth-child(2) {
    border-right: 0;
  }

  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 768px) {
  :root {
    --wrap: calc(100% - 6rem);
  }

  .pg {
    padding: 8rem 0 5rem;
  }

  .bento .card,
  .board .card,
  .edu-card,
  .form-card {
    padding: 1.6rem;
  }

  .tl-year {
    font-size: 2.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }

  html.js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
