/* --------------------------------- */
/* ----- Basic Setup -----*/
/* --------------------------------- */

@font-face {
  font-family: "Mona Sans";
  src: url("assets/fonts/Mona-Sans.woff2") format("woff2 supports variations"),
    url("assets/fonts/Mona-Sans.woff2") format("woff2-variations");
  font-display: swap;
  font-weight: 200 900;
  font-stretch: 75% 125%;
}

:root {
  --h1: 3.5rem;
  --h2: 3rem;
  --h3: 2.145rem;
  --h4: 1.5rem;
  --text-large: 1.6rem;
  --text-medium: 1.275rem;
  --text-small: 1.125rem;

  --gradient-brand: radial-gradient(at 60% 31%,
      rgb(255, 131, 139) 0px,
      transparent 50%),
    radial-gradient(at 48% 98%, rgba(0, 255, 166, 0.707) 0px, transparent 50%),
    radial-gradient(at 84% 67%, rgb(255, 129, 125) 0px, transparent 50%),
    radial-gradient(at 16% 47%, rgb(255, 90, 112) 0px, transparent 50%),
    radial-gradient(at 73% 11%, rgb(115, 255, 225) 0px, transparent 50%),
    radial-gradient(at 49% 37%, rgba(255, 249, 89, 0.695) 0px, transparent 50%),
    radial-gradient(at 70% 21%, rgba(58, 255, 186, 0.715) 0px, transparent 50%);
  --easing: cubic-bezier(0.86, 0, 0.07, 1);

  --site-max-width: 1280px;
  --gutter-nano: 0.5rem;
  --gutter-micro: 1rem;
  --gutter-x-small: 1.5rem;
  --gutter-small: 2rem;
  --gutter-medium: 2.5rem;
  --gutter-large: 3rem;
  --gutter-x-large: 6rem;
  --gutter-huge: 12rem;

  --scroll-padding: 4.375rem;
  --radius: 85px;
  /* Accent used for experience path and neon borders */
  --neon: #ff5e99;
  --timeline-stroke: var(--neon);
}

body.dark {
  --bg-color-primary: #0c0a0a;
  --bg-color-secondary: #161211;
  --important: #fff;
  --sub: #c3c3c3;
  --body: #989898;
  --border: #c0c0c015;
  --border-dark: #c0c0c02f;
  --gradient-border: linear-gradient(to left bottom, #777, #0e0d0d);
  --shadow: 0 1rem 1rem #00000040;
}

body.light {
  --bg-color-primary: #fbfbfb;
  --bg-color-secondary: #ffffff;
  --important: #000;
  --sub: #111;
  --body: #585b63;
  --border: #62626234;
  --border-dark: #5e5e5e1f;
  --gradient-border: linear-gradient(to left bottom, #000000c6, #0e0d0d00);
  --shadow: 0 1rem 1rem rgba(0, 0, 0, 0.25);
}

*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
}

html {
  font-family: "Mona Sans", sans-serif;
  box-sizing: border-box;
  scroll-padding-top: var(--scroll-padding);
}

@media (max-width: 1200px) {
  html {
    font-size: 90%;
  }
}

@media (max-width: 645px) {
  html {
    font-size: 80%;
  }
}

body {
  font-size: var(--text-medium);
  color: var(--body);
  background-color: var(--bg-color-primary);
  line-height: 1.4;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Improve media defaults */

picture,
svg,
img {
  display: block;
  max-inline-size: 100%;
  object-fit: contain;
}

textarea {
  resize: none;
}

/* --------------------------------- */
/* ----- Typography -----*/
/* --------------------------------- */

input,
textarea,
button {
  font: inherit;
}

p,
h1,
h2,
h3,
.h4 {
  overflow-wrap: break-word;
}

h1,
h2,
h3,
.h4 {
  font-stretch: 125%;
  line-height: 1.2;
  color: var(--important);
}

.h1 {
  font-size: var(--h1);
}

.h2 {
  font-size: var(--h2);
  text-align: center;
}

.h3 {
  font-size: var(--h3);
}

.h4 {
  font-size: var(--h4);
}

@media (max-width: 845px) {
  :root {
    --h1: 2.845rem;
    --h2: 2.45rem;
    --h3: 1.85rem;
  }
}

@media (max-width: 700px) {
  :root {
    --h1: 2.545rem;
  }
}

@media (max-width: 545px) {
  :root {
    --h1: 2.4rem;
    --text-large: 1.5rem;
  }
}

@media (max-width: 485px) {
  :root {
    --h1: 2.145rem;
    --h2: 1.875rem;
    --h3: 1.6rem;
    --text-large: 1.345rem;
  }
}

/* --------------------------------- */
/* ----- Utilities -----*/
/* --------------------------------- */

/* Center and constrain the width of page sections */

.container {
  max-inline-size: var(--site-max-width);
  margin-inline: auto;
}

@media (max-width: 1375px) {
  :root {
    --site-max-width: 1160px;
  }
}

@media (max-width: 1275px) {
  .container {
    padding-inline: var(--gutter-small);
  }
}

@media (max-width: 1200px) {
  .container {
    padding-inline: var(--gutter-medium);
  }
}

@media (max-width: 575px) {
  .container {
    padding-inline: var(--gutter-small);
  }
}

/* disable scroll when menu is opened */

.lock-screen {
  overflow-y: hidden;
}

/* hides visually and removes from accessibility tree  */

.hidden {
  visibility: hidden;
  transform: translateX(-100%);
}

.transform {
  transform: translateY(6rem);
  opacity: 0;
}

.shown {
  transition: 0.1s;
  color: lightgrey;
}

/* --------------------------------- */
/* ----- Components -----*/
/* --------------------------------- */

.btn {
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  padding: 18px 60px;
  border-radius: var(--gutter-nano);
  transition: 0.3s all ease-in-out;
  cursor: pointer;
}

@media (max-width: 700px) {
  .btn {
    padding: 16px 48px;
  }
}

@media (max-width: 485px) {
  .btn {
    font-size: 1.2rem;
    padding: 14px 38px;
  }
}

.btn-cta {
  color: var(--bg-color-primary);
  background-color: var(--important);
}

body.dark .btn-cta:hover,
body.dark .btn-cta:focus {
  box-shadow: #ffffff40 0 0 0 var(--gutter-nano);
}

body.light .btn-cta:hover,
body.light .btn-cta:focus {
  box-shadow: #07070733 0 0 0 var(--gutter-nano);
}

.btn-secondary {
  border: 1px solid var(--border-dark);
  color: var(--important);
}

.btn-secondary:hover,
.btn-secondary:focus {
  border-color: var(--important);
}

.link {
  display: inline-block;
  font-weight: 600;
  font-size: var(--text-small);
  padding: var(--gutter-nano) 0;
  text-decoration: none;
  color: var(--important);
  position: relative;
}

.link::after,
.link::before {
  content: "";
  width: 100%;
  height: 1px;
  margin-block-start: var(--gutter-nano);
  position: absolute;
  bottom: -1px;
  left: 0;
  transition: 300ms;
}

body.dark .link::before {
  background-color: #d3d3d357;
}

body.dark .link::after {
  background-color: white;
}

body.light .link::before {
  background-color: lightgray;
}

body.light .link::after {
  background-color: black;
}

.link::after {
  background-color: white;
  transform-origin: left;
  transform: scaleX(0);
}

.link:hover::after,
.link:focus::after {
  transform: scaleX(1);
}

/* --------------------------------- */
/* ----- Layout -----*/
/* --------------------------------- */

section:not(:first-child) {
  padding-block-start: var(--gutter-huge);
}

section:first-child {
  padding-block-start: 7rem;
}

@media (max-width: 885px) {
  :root {
    --gutter-huge: 8rem;
    --gutter-x-large: 4rem;
  }
}

main {
  border-top: 1px solid var(--border);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  background-color: var(--bg-color-primary);
  transform: translateY(calc(-1 * var(--radius)));
}

@media (max-width: 1185px) {
  :root {
    --radius: 45px;
  }
}

/* --------------------------------- */
/* ----- Menu Button -----*/
/* --------------------------------- */

.menu-btn-container {
  position: fixed;
  width: 100%;
  top: var(--gutter-x-small);
  left: 0;
  z-index: 4;
}

.menu-btn {
  display: block;
  margin-inline-start: auto;
  border: 1px solid var(--border-dark);
  inline-size: 132px;
  padding-block: var(--gutter-nano);
  border-radius: var(--gutter-large);
  text-decoration: none;
  background-color: var(--bg-color-secondary);
  color: var(--important);
  cursor: pointer;
}

.menu-btn,
.nav-items a {
  font-stretch: 125%;
  font-weight: 900;
}

/* --------------------------------- */
/* ----- Navigation -----*/
/* --------------------------------- */

.nav {
  min-block-size: 100vh;
  position: fixed;
  width: 100%;
  background-color: #ff5e99;
  background-image: var(--gradient-brand);
  transition: 450ms var(--easing);
  z-index: 3;
}

.nav-items {
  position: absolute;
  top: 50%;
  left: 15%;
  transform: translateY(-50%) translateX(-15%);
  list-style-type: none;
}

.nav-item {
  margin-block-end: var(--gutter-x-small);
}

.nav-item a {
  display: inline-block;
  font-size: var(--h2);
  text-decoration: none;
  color: #fff;
}

.nav-item a::after {
  content: "";
  display: block;
  block-size: var(--gutter-nano);
  width: 100%;
  transform: scale(0);
  transform-origin: left;
  background-color: white;
  transition: transform 250ms var(--easing);
}

.nav-item a:hover::after,
.nav-item a:focus::after {
  transform: scale(1);
}

/* Desktop: show header navigation horizontally */
@media (min-width: 992px) {
  .menu-btn-container {
    display: none;
  }

  .nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-block-size: auto;
    background: transparent;
    backdrop-filter: none;
    visibility: visible !important;
    transition: transform 300ms var(--easing), opacity 300ms var(--easing);
    z-index: 1000;
  }

  .nav.hidden {
    visibility: visible;
    transform: none;
  }

  .nav-items {
    position: static;
    transform: none;
    display: flex;
    gap: var(--gutter-medium);
    align-items: center;
    justify-content: flex-end;
    list-style: none;
    margin: 0;
    padding: var(--gutter-x-small) var(--gutter-small);
    /* background handled by nav overlay; avoid inner background here */
    background: none;
  }

  /* Ensure each item aligns vertically like the others */
  .nav-item {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
  }

  .nav-item a {
    color: var(--important);
    font-size: 1rem;
    font-weight: 800;
    /* Ensure perfect vertical alignment across items */
    display: inline-flex;
    align-items: center;
    line-height: 1;
    white-space: nowrap;
    /* Pill styling for all items (like Contact) */
    border: 1px solid var(--border-dark);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    background-color: var(--bg-color-secondary);
    transition: background-color 200ms var(--easing), color 200ms var(--easing), border-color 200ms var(--easing), box-shadow 200ms var(--easing), transform 150ms var(--easing);
  }

  /* Remove underline effect for desktop pills */
  .nav-item a::after {
    display: none;
  }

  .nav-item a:hover,
  .nav-item a:focus-visible {
    border-color: var(--important);
    transform: translateY(-1px);
  }

  body.light .nav-item a {
    box-shadow: var(--shadow);
  }

  /* Active section highlight: white pill */
  .nav-item a.is-active {
    background-color: #fff;
    color: #000;
    border-color: transparent;
  }
  body.dark .nav-item a.is-active {
    background-color: #fff;
    color: #000;
  }
  body.light .nav-item a.is-active {
    background-color: #fff;
    color: #000;
  }

  /* Sticky auto-hide/show on desktop */
  .nav.sticky-hidden {
    transform: translateY(-120%);
    opacity: 0.2;
    pointer-events: none;
  }

  .nav.sticky-active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

/* --------------------------------- */
/* ----- Header -----*/
/* --------------------------------- */

.header {
  min-block-size: calc(100vh + var(--radius));
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

body.dark .header {
  background-image: linear-gradient(#0000008b, #000000e6),
    url("assets/images/hero-bg.webp");
}

body.light .header {
  background-image: linear-gradient(#ffffffa2, #ffffffe6),
    url("assets/images/hero-bg-light.webp");
}

.header-textbox {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: var(--gutter-large);
  z-index: 2;
}

.h1 span {
  display: block;
}

.header-text {
  font-size: var(--text-large);
  font-weight: 400;
  max-inline-size: 745px;
  margin-block-start: var(--gutter-micro);
  margin-block-end: var(--gutter-medium);
}

@media (max-width: 1200px) {
  .header-text {
    max-inline-size: 685px;
  }
}

@media (max-width: 845px) {
  .header-text {
    max-inline-size: 585px;
  }
}

.header-btns {
  display: inline-flex;
  gap: var(--gutter-x-small);
}

/* Right-aligned circular portrait with gradient border */
.header-portrait {
  position: absolute;
  top: 50%;
  right: var(--gutter-x-large);
  transform: translateY(-50%);
  inline-size: 360px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  padding: 6px;
  /* visual border thickness */
  background: var(--gradient-brand);
  box-shadow: var(--shadow);
  z-index: 1;
}

.header-portrait img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: var(--bg-color-secondary);
  display: block;
}

@media (max-width: 1200px) {
  .header-portrait {
    inline-size: 300px;
  }
}

@media (max-width: 845px) {
  .header-portrait {
    inline-size: 240px;
    right: var(--gutter-medium);
  }
}

@media (max-width: 700px) {

  /* Stack portrait above text on small screens */
  .header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }

  .header-portrait {
    position: static;
    transform: none;
    right: auto;
    inline-size: 200px;
    order: 0;
    margin-block-start: var(--gutter-large);
    margin-block-end: var(--gutter-small);
  }

  .header-textbox {
    position: static;
    transform: none;
    left: auto;
    text-align: center;
    order: 1;
    padding-inline: var(--gutter-small);
  }

  .header-btns {
    justify-content: center;
  }
}

@media (max-width: 400px) {
  .header-textbox {
    left: 0;
    text-align: center;
    padding-inline: 0.6rem;
  }

  .header-btns {
    flex-direction: column;
    width: 80%;
  }
}

/* --------------------------------- */
/* ----- Clients -----*/
/* --------------------------------- */

.logos {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding-block-start: var(--gutter-x-large);
}

@media (max-width: 885px) {
  .logos {
    padding-block-start: calc(var(--gutter-x-large) + var(--gutter-x-large) - 2rem);
  }
}

.logo-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.logo {
  position: absolute;
  top: 0;
  max-block-size: 60px;
  max-inline-size: 150px;
  transition: all 2.4s cubic-bezier(0.25, 1, 0.5, 1);
}

@media (max-width: 845px) {
  .logo {
    max-inline-size: 100px;
  }

  .logo-group:last-child {
    display: none;
  }
}

@media (max-width: 400px) {
  .logo {
    max-inline-size: 85px;
  }
}

.logo.hide {
  opacity: 0;
}

.logo.to-top {
  transform: scale(0.4) translateY(-150px);
}

.logo.to-bottom {
  transform: scale(0.4) translateY(150px);
}

body.dark .logo {
  filter: invert(97%) grayscale(100%) opacity(0.6);
}

body.light .logo {
  filter: grayscale(100%) opacity(0.6);
}

/* --------------------------------- */
/* ----- Experience / Timeline -----*/
/* --------------------------------- */

.experience .h2 {
  text-align: center;
}

.timeline {
  position: relative;
  margin-block: var(--gutter-x-large);
  /* connector default length (desktop) */
  --connector-len: 140px;
}

.timeline-items {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  /* single row per item */
  row-gap: var(--gutter-x-large);
}

.timeline-path {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  height: 100%;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.timeline-path path {
  stroke: var(--timeline-stroke);
  stroke-width: 4;
  stroke-linecap: round;
  fill: none;
  /* prepared for draw-in animation */
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

/* Make the path pop in dark mode */
body.dark .timeline-path path {
  stroke: #4de0c2;
  /* teal glow */
  filter: drop-shadow(0 0 6px rgba(77, 224, 194, 0.6));
}

/* Slightly stronger in light too */
body.light .timeline-path path {
  stroke: #8a8a8a;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.2));
}

.timeline-item {
  position: relative;
}

/* Positions */
.timeline-item.left,
.timeline-item.right {
  /* span the full row so only one card per row */
  grid-column: 1 / -1;
}

/* Curved connectors from center line to card */
.timeline-item.left::before,
.timeline-item.right::before {
  content: "";
  position: absolute;
  top: 1.2rem;
  /* aligns roughly with card title */
  height: 28px;
  border-top: 2px solid var(--border-dark);
  width: 0;
  /* animate from center to card */
  transition: width 500ms var(--easing);
}

/* Brighter connector + dot in dark mode */
body.dark .timeline-item.left::before,
body.dark .timeline-item.right::before {
  border-color: #3bd8b8;
}

.timeline-item.left::before {
  right: calc(50% + 30px);
  /* start just right of center line */
  width: 0;
  border-right: 2px solid var(--border-dark);
  border-top-right-radius: 28px;
}

.timeline-item.right::before {
  left: calc(50% + 30px);
  width: 0;
  border-left: 2px solid var(--border-dark);
  border-top-left-radius: 28px;
}

/* expand connectors when item is visible */
.timeline-item.in-view.left::before {
  width: var(--connector-len);
}

.timeline-item.in-view.right::before {
  width: var(--connector-len);
}

/* Center dot at the timeline */
.timeline-item::after {
  content: "";
  position: absolute;
  top: 1.2rem;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.4);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--bg-color-primary);
  border: 3px solid var(--border-dark);
  z-index: 1;
  opacity: 0;
  transition: transform 400ms var(--easing), opacity 400ms var(--easing);
}

body.dark .timeline-item::after {
  border-color: #3bd8b8;
}

.timeline-item.in-view::after {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.timeline-card {
  border: 1px solid var(--border);
  border-radius: var(--gutter-nano);
  background-color: var(--bg-color-secondary);
  padding: var(--gutter-large) var(--gutter-medium);
  box-shadow: none;
  transition: box-shadow 0.2s var(--easing);
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  filter: blur(6px);
  display: grid;
  row-gap: 0.25rem;
  width: min(560px, calc(50% - 180px));
  /* ensure space from center and match connector length */
}

.timeline-item.left .timeline-card {
  margin-left: 0;
  margin-right: auto;
}

.timeline-item.right .timeline-card {
  margin-left: auto;
  margin-right: 0;
}

body.light .timeline-card {
  box-shadow: var(--shadow);
}

.timeline-card:hover,
.timeline-card:focus-within {
  transform: translateY(20px);
}

/* Expand description and brighten skills on hover/focus */
.timeline-card:hover .desc,
.timeline-card:focus-within .desc {
  max-height: 800px;
  opacity: 1;
  margin-bottom: var(--gutter-micro);
}

.timeline-card:hover .desc li:nth-child(n+4),
.timeline-card:focus-within .desc li:nth-child(n+4) {
  display: list-item;
}

.timeline-card:hover .skills,
.timeline-card:focus-within .skills {
  color: var(--sub);
}

/* In-view animation */
.timeline-item.in-view .timeline-card {
  animation: card-reveal 650ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* subtle stagger so it feels smooth */
.timeline-items>li.in-view:nth-child(odd) .timeline-card {
  animation-delay: 60ms;
}

.timeline-items>li.in-view:nth-child(even) .timeline-card {
  animation-delay: 120ms;
}

@keyframes card-reveal {
  0% {
    opacity: 0;
    transform: translateY(28px) scale(0.985);
    filter: blur(6px);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.timeline-card .role {
  margin-bottom: 0.25rem;
}

.timeline-card .company {
  color: var(--sub);
  margin-bottom: 0.15rem;
  font-size: 0.95em;
}

.timeline-card .role {
  font-weight: 800;
  font-size: var(--h3);
}

.timeline-card .period {
  color: var(--body);
  margin-bottom: var(--gutter-micro);
  font-size: 0.9em;
  letter-spacing: 0.3px;
}

.timeline-card .desc {
  margin-left: 1rem;
  /* Start collapsed: hide description until hover */
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-bottom: 0;
  transition: max-height 350ms var(--easing), opacity 250ms var(--easing), margin 250ms var(--easing);
}

.timeline-card .desc li {
  margin-block: 0.15rem;
}

.timeline-card .desc li:nth-child(n+4) {
  display: none;
}

.timeline-card .skills {
  font-size: 0.95em;
  color: var(--body);
  transition: color 200ms var(--easing);
}

/* Visual order */
.timeline-card .company {
  order: 1;
}

.timeline-card .role {
  order: 2;
}

.timeline-card .period {
  order: 3;
}

.timeline-card .desc {
  order: 4;
}

.timeline-card .skills,
.timeline-card .skill-badges {
  order: 5;
}

/* Skill badges */
.skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gutter-nano);
}

.skill-badge {
  display: inline-block;
  font-size: 0.85em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  color: var(--important);
  position: relative;
}

.skill-badge::before,
.skill-badge::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.skill-badge::after {
  background-image: var(--gradient-border);
  z-index: -2;
}

.skill-badge::before {
  background-color: var(--bg-color-primary);
  inset: 1px;
  z-index: -1;
}

@media (max-width: 900px) {
  .experience .timeline {
    --connector-len: 60px;
  }

  .timeline-item,
  .timeline-item.left,
  .timeline-item.right {
    grid-column: 1 / -1;
  }

  .timeline-card {
    width: 100%;
    margin: 0;
  }

  .timeline-item.left::before,
  .timeline-item.right::before {
    left: auto;
    right: 20px;
    /* just left of the line */
    width: 0;
    /* start hidden */
    border-left: none;
    border-right: 2px solid var(--border-dark);
    border-top-left-radius: 0;
    border-top-right-radius: 28px;
  }

  .timeline-item.in-view.left::before,
  .timeline-item.in-view.right::before {
    width: var(--connector-len);
  }

  .timeline-item::after {
    left: calc(100% - 20px);
    /* dot on the small right rail */
  }

  .timeline-path {
    left: auto;
    right: 0;
    transform: none;
    width: 40px;
  }
}

/* Previously hid 4th and 5th items; removed to show all experience cards */

/* --------------------------------- */
/* ----- Education -----*/
/* --------------------------------- */

.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gutter-large);
  padding-block-start: var(--gutter-x-large);
}

.education-card {
  border: 1px solid var(--border);
  border-radius: var(--gutter-nano);
  background-color: var(--bg-color-secondary);
  padding: var(--gutter-large) var(--gutter-medium);
  transition: transform 0.2s var(--easing), box-shadow 0.2s var(--easing);
}

body.light .education-card {
  box-shadow: var(--shadow);
}

.education-card:hover,
.education-card:focus-within {
  transform: translateY(-4px);
}

.edu-degree {
  margin-block-end: 0.35rem;
}

.edu-institution {
  color: var(--sub);
  margin-block-end: var(--gutter-small);
}

.edu-meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--gutter-small);
}

.edu-meta li {
  display: inline-flex;
  align-items: center;
  gap: var(--gutter-nano);
}

.edu-badge {
  font-size: 0.9em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background-image: var(--gradient-border);
  color: var(--important);
}

/* --------------------------------- */
/* ----- Work -----*/
/* --------------------------------- */

.work-boxes {
  padding-block-start: var(--gutter-x-large);
}

.work-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 1045px) {
  .work-boxes {
    max-inline-size: fit-content;
    margin-inline: auto;
  }

  .work-box {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .work-img {
    margin-block-end: var(--gutter-medium);
  }
}

.work-box:not(:last-child) {
  margin-block-end: var(--gutter-huge);
}

@media (max-width: 1285px) {
  .work-box:not(:last-child) {
    margin-block-end: 8rem;
  }
}

.work-img,
.work-textbox {
  flex-basis: 49%;
}

.work-img {
  max-inline-size: 785px;
  transition: 0.6s all;
}

body.light .work-img {
  box-shadow: var(--shadow);
}

.work-textbox {
  max-inline-size: 445px;
}

@media (max-width: 885px) {
  .work h2 {
    margin-block-start: 45px;
  }
}

@media (max-width: 485px) {
  .work h2 {
    margin-block-start: 0;
  }
}

.work-text {
  margin-block: var(--gutter-micro);
}

.work-technologies {
  list-style-position: inside;
  list-style-type: disc;
  margin-block-end: var(--gutter-x-small);
}

.work-links {
  display: inline-flex;
  align-items: center;
  gap: var(--gutter-x-small);
}

.work-links img {
  block-size: 28px;
  inline-size: 28px;
}

body.dark .work-links img {
  filter: invert(1);
}

.work-links>a:last-child {
  transition: 0.3s transform ease-in;
}

.work-links>a:last-child:hover,
.work-links>a:last-child:focus {
  transform: scale(1.1);

}

/* GitHub icon: add smooth gradient ring on hover (matches hero image) */
.work-links a[href*="github.com"] {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 6px;
}

.work-links a[href*="github.com"]::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--gradient-brand);
  opacity: 0;
  /* hidden by default */
  transition: opacity 250ms var(--easing);
}

.work-links a[href*="github.com"]:hover::before,
.work-links a[href*="github.com"]:focus-visible::before {
  opacity: 0.7;
  /* light ring */
}

.work-links a[href*="github.com"] img {
  border-radius: 50%;
  position: relative;
  z-index: 1;
}

/* Ensure the same ring effect even if href isn't GitHub but icon is GitHub */
.work-links a:has(img[src$="social-links/github.svg"]) {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 1px;
}

.work-links a:has(img[src$="social-links/github.svg"])::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity 250ms var(--easing);
}

.work-links a:has(img[src$="social-links/github.svg"]):hover::before,
.work-links a:has(img[src$="social-links/github.svg"]):focus-visible::before {
  opacity: 0.7;
}

.work-links a:has(img[src$="social-links/github.svg"]) img {
  border-radius: 50%;
  position: relative;
  z-index: 1;
}

.work-text,
.contact-text,
.work-technologies {
  font-weight: 300;
}

.work-textbox h3,
.work-text,
.work-technologies,
.work-links {
  --delay: 0.2s;
  animation: slide-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-play-state: paused;
}

.work-text {
  animation-delay: var(--delay);
}

.work-technologies {
  animation-delay: calc(var(--delay) * 1.5);
}

.work-links {
  animation-delay: calc(var(--delay) * 2);
}

@keyframes slide-up {
  from {
    transform: translateY(45px);
    opacity: 0;
  }

  to {
    transform: none;
    opacity: 1;
  }
}

/* --------------------------------- */
/* ----- Achievements -----*/
/* --------------------------------- */

.achievements .h2 {
  text-align: center;
}

.achievements-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter-large);
  margin-block: var(--gutter-x-large);
}

@media (max-width: 980px) {
  .achievements-grid {
    grid-template-columns: 1fr;
  }
}

.ach-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--gutter-medium);
  padding: var(--gutter-large) var(--gutter-medium);
  background-color: var(--bg-color-secondary);
  border: 1px solid var(--border);
  border-radius: var(--gutter-nano);
  overflow: hidden;
  transform: translateY(28px) scale(0.985);
  opacity: 0;
  filter: blur(6px);
}

.ach-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(1200px 200px at 85% 50%, #00ffd51a, transparent 60%),
    radial-gradient(800px 150px at 15% 20%, #ff7ab31a, transparent 60%);
}

body.light .ach-card {
  box-shadow: var(--shadow);
}

.ach-card.in-view {
  animation: ach-reveal 650ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ach-card:hover {
  transform: translateY(-2px);
  transition: transform 180ms var(--easing);
}

@keyframes ach-reveal {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.985);
    filter: blur(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.ach-content {}

.ach-org {
  color: var(--sub);
  margin-bottom: 0.2rem;
  font-size: 0.95em;
}

.ach-title {
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.ach-desc {
  margin-bottom: 0.5rem;
}

.ach-year {
  font-size: 0.95em;
  color: var(--body);
}

.ach-logo {
  inline-size: 72px;
  block-size: 72px;
  border-radius: 16px;
  background-image: var(--gradient-border);
  display: grid;
  place-items: center;
}

.ach-logo img {
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  object-fit: contain;
  padding: 8px;
  border-radius: 15px;
  background-color: var(--bg-color-primary);
}

.logo-fallback {
  inline-size: calc(100% - 2px);
  block-size: calc(100% - 2px);
  border-radius: 15px;
  display: grid;
  place-items: center;
  background-color: var(--bg-color-primary);
  color: var(--important);
  font-weight: 800;
}

@media (max-width: 560px) {
  .ach-card {
    grid-template-columns: 1fr;
  }

  .ach-logo {
    justify-self: end;
  }
}

/* Stagger for Achievements */
.achievements-grid>.ach-card:nth-child(odd).in-view {
  animation-delay: 60ms;
}

.achievements-grid>.ach-card:nth-child(even).in-view {
  animation-delay: 120ms;
}

/* --------------------------------- */
/* ----- Articles -----*/
/* --------------------------------- */

.article-boxes {
  display: flex;
  flex-flow: row wrap;
  gap: 3.5%;
  margin-block-start: var(--gutter-x-large);
}

.article-box {
  flex-basis: 31%;
  border: 1px solid var(--border);
  padding: var(--gutter-medium) var(--gutter-small);
  border-radius: var(--gutter-nano);
  background-color: var(--bg-color-secondary);
}

.article-textbox {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.article-text {
  font-size: var(--text-small);
  margin-block: var(--gutter-x-small);
}

.article-info {
  display: flex;
  justify-content: space-between;
  margin-block-start: auto;
}

.reaction-count {
  display: inline-flex;
  align-items: center;
  gap: var(--gutter-nano);
  font-size: initial;
}

@media (max-width: 985px) {
  .article-boxes {
    max-inline-size: 685px;
    margin-inline: auto;
    justify-content: center;
    gap: 4%;
  }

  .article-box:nth-of-type(2),
  .article-box:nth-of-type(3) {
    flex-basis: 48%;
  }

  .article-box:last-child {
    display: none;
  }
}

@media (max-width: 650px) {

  .article-box:nth-child(2),
  .article-box:nth-child(3),
  .article-box:last-child {
    flex-basis: 100%;
  }

  .featured-article {
    margin-block-end: 0;
  }

  .article-box:not(:last-child) {
    margin-block-end: var(--gutter-x-small);
  }

  .article-box:last-child {
    display: block;
  }
}

/* --------------------------------- */
/* ----- Featured article -----*/
/* --------------------------------- */

.featured-article {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-end: 44.8px;
}

@media (max-width: 985px) {
  .featured-article {
    margin-block-end: 24.4px;
    flex-direction: column-reverse;
  }
}

.featured-article .article-textbox {
  flex-basis: 44%;
}

.featured-article h3 {
  margin-block-start: var(--gutter-x-small);
}

.featured-article .article-illustration {
  flex-basis: 50%;
}

.article-illustration img {
  border-radius: var(--gutter-nano);
}

.featured-article .article-text {
  font-size: var(--text-medium);
}

.featured-article .article-info {
  justify-content: flex-start;
  gap: var(--gutter-medium);
}

/* --------------------------------- */
/* ----- Testimonials -----*/
/* --------------------------------- */

.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-block-start: var(--gutter-x-large);
  list-style-type: none;
  background-image: linear-gradient(rgba(88, 88, 88, 0.297),
      rgba(214, 214, 214, 0.082));
}

@media (max-width: 1100px) {
  .testimonials {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 645px) {
  .testimonials {
    grid-template-columns: 1fr;
  }
}

.testimonial {
  display: flex;
  flex-direction: column;
  padding: var(--gutter-small);
  background-color: var(--bg-color-primary);
  position: relative;
  overflow: hidden;
}

/* Mild diagonal shine on hover (left-bottom → right-top) */
.testimonial::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: var(--gradient-brand);
  opacity: 0;
  transform: translate(-35%, 35%) rotate(15deg) scale(0.9);
  filter: blur(24px);
  transition: transform 600ms var(--easing), opacity 600ms var(--easing);
  pointer-events: none;
}

.testimonial:hover::after,
.testimonial:focus-within::after {
  opacity: 0.18;
  /* keep it mild */
  transform: translate(35%, -35%) rotate(15deg) scale(0.9);
}

.testimonial-text {
  font-size: var(--text-small);
  margin-block-end: var(--gutter-x-small);
}

.testimonial-author {
  margin-block-start: auto;
  display: flex;
  align-items: center;
  gap: var(--gutter-micro);
}

.testimonial-author-name {
  margin-block-end: 0.3rem;
}

.testimonial-author-name,
.testimonial-author-job {
  font-size: initial;
}

.testimonial-author>img {
  block-size: 52px;
  inline-size: 52px;
  border-radius: 50%;
  background-color: var(--bg-color-secondary);
}

/* --------------------------------- */
/* ----- Skills -----*/
/* --------------------------------- */

.skills-imgs {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  gap: var(--gutter-large);
  padding-block-start: var(--gutter-x-large);
}

/* Skill icon wrapper to enable border + hover effects */
.skill-icon {
  position: relative;
  inline-size: 110px;
  block-size: 110px;
  border-radius: 50%;
  background-color: var(--bg-color-secondary);
  display: grid;
  place-items: center;
  /* allow label to render outside the circle */
  overflow: visible;
  z-index: 0;
  /* subtle base border for structure */
  border: 1px solid rgba(255, 255, 255, 0.06);
  /* soft base glow */
  box-shadow: 0 0 0 rgba(0, 0, 0, 0.0);
  animation: neonPulse 6s ease-in-out infinite;
  transition: transform 0.25s var(--easing), box-shadow 0.25s var(--easing);
}

.skill-icon:hover,
.skill-icon:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 0 14px rgba(255, 94, 153, 0.25), 0 0 28px rgba(255, 94, 153, 0.18);
  z-index: 5;
}

/* Glowing conic ring around the circle on hover */
.skill-icon::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: conic-gradient(from 0deg, transparent 0 310deg, var(--neon) 330deg, transparent 360deg);
  filter: saturate(1.2);
  opacity: 0;
  /* ring cutout: keep only the border */
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 0);
  z-index: 1;
  pointer-events: none;
}

.skill-icon:hover::before,
.skill-icon:focus-within::before {
  opacity: 1;
  animation: spin 2.4s linear infinite;
}

/* Outer glow duplicate for stronger neon presence */
.skill-icon::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  background: conic-gradient(from 0deg, transparent 0 310deg, var(--neon) 330deg, transparent 360deg);
  filter: blur(10px);
  opacity: 0;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 0);
  z-index: 0;
  pointer-events: none;
}

.skill-icon:hover::after,
.skill-icon:focus-within::after {
  opacity: 0.6;
  animation: spin 2.4s linear infinite;
}

/* Image inside wrapper */
.skill-icon>.skills-img {
  display: block;
  inline-size: 76%;
  block-size: 76%;
  border-radius: 50%;
  object-fit: contain;
  position: relative;
  z-index: 2;
}

/* curved label under icon */
.skill-label {
  position: absolute;
  left: 50%;
  top: calc(100% + 4px);
  transform: translate(-50%, 8px);
  width: 150%;
  height: 42px;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.35s var(--easing), transform 0.35s var(--easing);
  pointer-events: none;
  color: var(--neon);
}

.skill-label text {
  fill: currentColor;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.4px;
  filter: drop-shadow(0 0 6px rgba(255, 94, 153, 0.35));
}

/* Fallback straight label */
.skill-name {
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translate(-50%, 8px);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--neon);
  text-shadow: 0 0 6px rgba(255, 94, 153, 0.35);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.35s var(--easing), transform 0.35s var(--easing);
  pointer-events: none;
  z-index: 3;
}

.skill-icon:hover .skill-name,
.skill-icon:focus-within .skill-name {
  opacity: 1;
  transform: translate(-50%, 0);
}

.skill-icon:hover .skill-label,
.skill-icon:focus-within .skill-label {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1100px) {
  .skill-icon {
    inline-size: 95px;
    block-size: 95px;
  }
}

@media (max-width: 810px) {
  .skill-icon {
    inline-size: 80px;
    block-size: 80px;
  }
}

@media (max-width: 675px) {
  .skills-imgs {
    gap: var(--gutter-large);
  }

  .skill-icon {
    inline-size: 68px;
    block-size: 68px;
  }
}

@media (max-width: 340px) {
  .skill-icon {
    inline-size: 56px;
    block-size: 56px;
  }
}

/* Neon glow pulse and sheen animations */
@keyframes neonPulse {
  0% {
    box-shadow: 0 0 0 rgba(255, 94, 153, 0.0), 0 0 4px rgba(255, 94, 153, 0.10);
  }

  50% {
    box-shadow: 0 0 8px rgba(255, 94, 153, 0.22), 0 0 16px rgba(255, 94, 153, 0.16);
  }

  100% {
    box-shadow: 0 0 0 rgba(255, 94, 153, 0.0), 0 0 4px rgba(255, 94, 153, 0.10);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --------------------------------- */
/* ----- Contact -----*/
/* --------------------------------- */

.contact-content {
  display: grid;
  grid-template-columns: minmax(245px, 35%) 1fr;
  margin-block: var(--gutter-x-large);
  border: 1px solid var(--border);
  border-radius: var(--gutter-nano);
}

@media (max-width: 1032px) {
  .contact-content {
    display: flex;
    flex-direction: column-reverse;
    max-inline-size: 845px;
    margin-inline: auto;
  }
}

.contact-textbox,
.contact-form {
  padding: var(--gutter-large) var(--gutter-small);
}

.hire-alert {
  display: inline-flex;
  align-items: center;
  gap: var(--gutter-nano);
  font-size: initial;
  padding: var(--gutter-nano) var(--gutter-micro);
  border-radius: var(--gutter-small);
  position: relative;
  z-index: 1;
  margin-block-end: var(--gutter-small);
  color: var(--important);
}

.hire-alert::before,
.hire-alert::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.hire-alert::after {
  background-image: var(--gradient-border);
  z-index: -2;
}

.hire-alert::before {
  background-color: var(--bg-color-primary);
  inset: 1px;
  z-index: -1;
}

.indicator {
  display: inline-block;
  block-size: var(--gutter-nano);
  inline-size: var(--gutter-nano);
  border-radius: 50%;
  background-color: red;
  animation: blink 550ms alternate infinite var(--easing);
}

@keyframes blink {
  100% {
    opacity: 0;
  }
}

.contact-text {
  margin-block-end: var(--gutter-small);
}

.signatures {
  inline-size: 150px;
}

body.light .signatures {
  filter: invert(1);
}

.contact-form {
  background-color: var(--bg-color-secondary);
  border-top-right-radius: var(--gutter-nano);
  border-bottom-right-radius: var(--gutter-nano);
}

.form-field label,
.form-field input,
.form-field textarea {
  display: block;
  width: 100%;
}

.form-field label {
  color: var(--important);
}

.form-field input,
.form-field textarea {
  font-size: var(--text-small);
  color: var(--sub);
  border: none;
  outline: none;
  border-bottom: 1px solid var(--border);
  background-color: transparent;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: #888;
}

.form-field input,
.form-field textarea {
  margin-block-end: var(--gutter-small);
  padding: var(--gutter-nano);
  margin-inline: var(--gutter-nano);
}

.form-field label {
  font-size: var(--text-small);
  margin-block-end: var(--gutter-nano);
  margin-inline-start: var(--gutter-nano);
}

.contact-form button[type="submit"] {
  border: none;
}

/* --------------------------------- */
/* ----- Footer -----*/
/* --------------------------------- */

.footer {
  border-top: 1px solid var(--border);
  padding-block: var(--gutter-x-large);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 875px) {
  .footer-content {
    flex-direction: column-reverse;
    gap: var(--gutter-small);
  }

  .footer-text {
    text-align: center;
  }
}

.footer-text {
  font-size: var(--text-small);
}

.footer-text a {
  color: var(--sub);
}

.footer-links {
  display: flex;
  gap: var(--gutter-small);
  list-style-type: none;
}

@media (max-width: 1040px) {
  .footer-links {
    gap: var(--gutter-micro);
  }
}

.footer-link img {
  block-size: 32px;
  inline-size: 32px;
}

/* Make footer icons circular with the same hover ring as GitHub in Work */
.footer-link a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 6px;
  opacity: 0.875;
  transition: 225ms ease-in opacity;
}

.footer-link a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity 250ms var(--easing);
}

.footer-link a:hover,
.footer-link a:focus-visible {
  opacity: 1;
}

.footer-link a:hover::before,
.footer-link a:focus-visible::before {
  opacity: 0.7;
}

.footer-link img {
  border-radius: 50%;
  position: relative;
  z-index: 1;
}

body.dark .footer-link img {
  filter: invert(1);
}

.theme-switch {
  /* Track */

  --track-size: calc(var(--thumb-size) * 2);
  --track-padding: 0.225rem;
  --track-inactive: hsl(80 0% 80%);
  --track-active: #d7aefb;

  --track-color-inactive: var(--track-inactive);
  --track-color-active: var(--track-active);

  /* Thumb */

  --thumb-position: 0%;
  --thumb-size: 1.2rem;
  --thumb: hsl(0 0% 100%);
  --thumb-highlight: hsla(0, 0%, 0%, 0.056);

  --thumb-color: var(--thumb);
  --thumb-color-highlight: var(--thumb-highlight);
}

.theme-switch {
  display: flex;
  align-items: center;
  gap: 2ch;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.theme-switch>span,
.theme-switch>input {
  cursor: pointer;
}

.theme-switch span {
  font-size: 1rem;
  color: var(--sub);
}

.theme-switch>input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-sizing: content-box;
  inline-size: var(--track-size);
  block-size: var(--thumb-size);
  padding: var(--track-padding);
  background-color: var(--track-color-inactive);
  border-radius: var(--track-size);
}

.theme-switch>input::after {
  display: block;
  content: "";
  inline-size: var(--thumb-size);
  block-size: var(--thumb-size);
  background-color: var(--thumb-color);
  border-radius: 50%;
  transform: translateX(var(--thumb-position));
  transition: 500ms all cubic-bezier(0.45, 0.05, 0.22, 1.3);
}

input:checked {
  --thumb-position: 100%;
  background-color: var(--track-active);
}
