@import url("https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400..700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
  background: var(--bg-1);
  color: var(--text-1);
  font-family: "Archivo Black", sans-serif;
}
:root {
  color-scheme: light dark;
  --nbrofpragraphs: 3;
  --border-radius: 3rem;
  --bg-1: #f6f5f2;
  --bg-2: #fbfbf9;
  --surface-1: #ffffff;
  --surface-2: #f1f3f5;
  --surface-3: #e7ebef;
  --text-1: #23262b;
  --text-2: #5d6672;
  --border-1: #d9dde3;
  --focus-ring: #9aa4b0;
  --overlay: rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 6px 14px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 10px 24px rgba(15, 23, 42, 0.12);
  --button-bg: var(--surface-2);
  --button-border: var(--border-1);
  --button-text: var(--text-1);
  --button-hover-bg: var(--surface-3);
  --button-shadow: var(--shadow-soft);
  --button-radius: 0.65rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-1: #12141a;
    --bg-2: #181c24;
    --surface-1: #1a202b;
    --surface-2: #212938;
    --surface-3: #2a3345;
    --text-1: #e7eaee;
    --text-2: #c6ccd6;
    --border-1: #2f394b;
    --focus-ring: #8a96aa;
    --overlay: rgba(0, 0, 0, 0.55);
    --shadow-soft: 0 6px 14px rgba(0, 0, 0, 0.45);
    --shadow-strong: 0 12px 28px rgba(0, 0, 0, 0.5);
  }
}

.cover-section {
  display: grid;
  position: relative;
  width: 100%;
  height: clamp(14rem, 35vw, 22rem);
  overflow: hidden;

  img {
    object-fit: cover;
    width: 100%;
    display: block;
    height: 100%;
    position: relative;
    z-index: 0;
  }

  .cover-text {
    justify-self: end;
    align-self: center;
    position: absolute;
    inset: 1rem 0;
    padding: 0 6rem;
    color: #fff;
    z-index: 2;
  }

  &::after {
    content: "";
    background: var(--overlay);
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
  }
  h1 {
    font-size: 4rem;
    font-family: "Archivo Black", sans-serif;
    font-weight: 400;
    font-style: normal;
    max-inline-size: 6ch;
    word-break: keep-all;
    line-height: 3.6rem;
  }

  p {
    font-family: "Dancing Script", cursive;
    font-size: 30px;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
  }
}

nav {
  position: relative;
  padding-bottom: 2.5rem;
}

.profile {
  object-fit: cover;
  width: 96px;
  height: 96px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  /* border: 2px solid black; */
  box-shadow: var(--shadow-strong);
  position: absolute;
  z-index: 3;
  left: 1.5rem;
  bottom: 0;
  transform: translateY(10%);
}

article {
  margin: 5rem 1rem;
  display: flex;

  h2 {
    width: fit-content;
    margin-bottom: 0.9rem;
  }
  p {
    max-inline-size: 90ch;
    line-height: 1.4rem;
    font-family: sans-serif;
  }
}

input[type="checkbox"] {
  appearance: none;
  align-self: flex-end;
  display: none;
}

input[type="checkbox"]::after {
  content: "readmore";
  text-decoration: underline;
  color: var(--text-2);
  cursor: pointer;
}

input[type="checkbox"]:checked::after {
  content: "hide";
}

input[type="checkbox"],
:active {
  color: var(--text-2);
}
article:has(:checked) {
  --nbrofpragraphs: 0;
  display: grid;
  gap: 0.9rem;
}

.collapse-lines {
  display: -webkit-box;
  -webkit-line-clamp: var(--nbrofpragraphs);
  -webkit-box-orient: vertical;
  overflow: hidden;
}

main {
  display: block;
  padding-inline: 4rem;
  overflow-x: hidden;

  section {
    display: grid;
    gap: 2.5rem;
  }
}

aside {
  display: block;
  position: sticky;
  top: 0;
  width: auto;
  max-inline-size: none;
  margin: 0 4rem 1.5rem;
  padding: 0 0.25rem;
  border-radius: 0;
  background: color-mix(in oklab, var(--bg-1) 96%, transparent);
  border: none;
  border-bottom: 1px solid var(--border-1);
  box-shadow: none;
  backdrop-filter: none;
  z-index: 120;

  ul {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1.4rem;
    overflow-x: auto;
    scrollbar-width: thin;
    list-style: none;
    margin: 0;
    padding: 0;

    li {
      list-style: none;
    }

    a {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      text-decoration: none;
      color: var(--text-2);
      text-transform: capitalize;
      line-height: 1.2;
      white-space: nowrap;
      font-size: clamp(0.84rem, 1.05vw, 0.95rem);
      font-weight: 600;
      letter-spacing: 0.01em;
      padding: 0.95rem 0;
      border: none;
      border-bottom: 3px solid transparent;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
      transition: all 300ms linear;
    }
    & a:hover {
      color: var(--text-1);
      border-bottom-color: color-mix(in oklab, var(--text-1) 60%, transparent);
      text-decoration: none;
    }

    & a.is-active {
      color: var(--text-1);
      border-bottom-color: var(--text-1);
    }

    & a:focus-visible {
      outline: 2px solid var(--focus-ring);
      outline-offset: 2px;
    }
  }
}

#blogs,
#projects,
#platforms {
  scroll-margin-top: 4.5rem;
}

.scoller-element {
  display: grid;
  gap: 2rem;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 4rem) / 3);
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  padding-bottom: 0.65rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-1) transparent;

  > * {
    scroll-snap-align: center;
    animation: scoroller linear both;
    animation-timeline: view(x);
    min-width: 0;
  }
}

.carousel-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
}

.carousel-nav {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid var(--button-border);
  background: var(--button-bg);
  color: var(--button-text);
  box-shadow: var(--button-shadow);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition:
    transform 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.carousel-nav:hover {
  transform: translateY(-1px);
  background: var(--button-hover-bg);
}

.carousel-nav:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.scoller-element::-webkit-scrollbar {
  height: 10px;
}

.scoller-element::-webkit-scrollbar-track {
  background: transparent;
}

.scoller-element::-webkit-scrollbar-thumb {
  background: var(--border-1);
  border-radius: 999px;
}

@keyframes scoroller {
  0%,
  100% {
    opacity: 0.5;
    scale: 0.5;
  }
  35%,
  65% {
    opacity: 1;
    scale: 1;
  }
}
img {
  max-width: 100%;
  object-fit: cover;
}
.blog-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  display: block;
}
.blog-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  display: block;
  background: var(--surface-2);
}
.description {
  display: grid;
  gap: 0.6rem;
}

.blog-card {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.75rem;
}

.blog-card h4 {
  font-size: clamp(1rem, 1.2vw, 1.25rem);
  line-height: 1.2;
}

.blog-card p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.detailed-section {
  display: grid;
  gap: 0.75rem;
}

.btn-link {
  text-decoration: none;
  justify-self: start;
  align-self: start;
  padding: 0.6rem 0.9rem;
  border-radius: var(--button-radius);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-transform: capitalize;
  white-space: nowrap;
  line-height: 1;
  background: var(--button-bg);
  border: 1px solid var(--button-border);
  color: var(--button-text);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  box-shadow: var(--button-shadow);
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background 150ms ease,
    border-color 150ms ease;
}

.btn-link svg {
  width: 14px;
  height: 14px;
  opacity: 0.65;
  fill: currentColor;
  color: var(--button-text);
  flex-shrink: 0;
  transition:
    transform 150ms ease,
    opacity 150ms ease;
}

.btn-link:hover {
  background: var(--button-hover-bg);
  transform: translateY(-1px);
}

.btn-link:hover svg {
  opacity: 1;
  transform: translateX(1px);
}

.btn-link:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.detailed-section:has(:hover) .btn-link svg {
  opacity: 1;
}

.scoller-element {
  max-inline-size: 90ch;
}

@media (width < 800px) {
  main {
    padding-inline: 1.5rem;
  }
  aside {
    top: 0;
    margin: 0 1.5rem 1rem;
    padding: 0;
  }

  article {
    margin: 3rem 1rem;
  }
  aside ul {
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0;
    scrollbar-width: thin;
  }

  aside ul a {
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 0.85rem 0;
  }
}
@media (width < 720px) {
  :root {
    --nbrofpragraphs: 2;
  }

  input[type="checkbox"] {
    display: block;
  }

  .scoller-element {
    max-inline-size: 100%;
    grid-auto-columns: 100%;
  }

  .carousel-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .carousel-nav {
    display: none;
  }

  h1 {
    font-size: 2rem;
  }

  .cover-text {
    display: grid;
    place-items: center;
    padding: 0 1.5rem;
    text-align: center;
    /* background-color:black; */
  }

  nav {
    padding-bottom: 4rem;
  }

  .profile {
    left: 0.4rem;
  }
}

@media (width < 1024px) {
  .scoller-element {
    grid-auto-columns: calc((100% - 2rem) / 2);
  }
}

#platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

#platforms .platform-card {
  border: 1px solid var(--border-1);
  margin: 0;
  padding: 0;
  border-radius: 0.35rem;
  overflow: hidden;
  background: var(--surface-1);
  max-inline-size: 220px;
  max-width: 100%;
  --platform-color: #1d4ed8;
}

#platforms .platform-card:nth-child(1) {
  --platform-color: #0a66c2;
}

#platforms .platform-card:nth-child(2) {
  --platform-color: #2b3447;
}

#platforms .platform-card:nth-child(3) {
  --platform-color: #2f3140;
}

#platforms .platform {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 120px;
}

#platforms .platform .bg-img {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.12)),
    var(--platform-color);
  z-index: 0;
}

#platforms .platform svg {
  position: absolute;
  z-index: 1;
  width: 64px;
  height: 64px;
  left: 50%;
  bottom: -32px;
  transform: translateX(-50%);
  background: var(--surface-2);
  border-radius: 50%;
  padding: 12px;
  border: none;
  box-shadow: var(--shadow-soft);
  color: var(--platform-color);
}

#platforms .platform svg path {
  fill: currentColor;
}

#platforms .platform-card:nth-child(1) .platform svg path:first-child,
#platforms .platform-card:nth-child(3) .platform svg path:first-child {
  display: none;
}

#platforms .description {
  padding: 3rem 1.2rem 1.2rem;
  gap: 0.4rem;
  display: grid;
  place-items: center;
}

#platforms .btn-link {
  justify-self: center;
}

#platforms .link {
  justify-self: center;
}
#platform strong {
  text-align: center;
  text-transform: capitalize;
  text-wrap: pretty;
}

footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  padding: 2.5rem 4rem;
  background: linear-gradient(
    180deg,
    var(--surface-1) 0%,
    var(--surface-2) 100%
  );
  border-top: 1px solid var(--border-1);
  margin-top: 4rem;
}

footer section {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  min-width: 0;
}

footer h2 {
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 0.28rem;
  text-decoration-thickness: 2px;
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-auto-flow: row;
  gap: 0.5rem;
}

footer a {
  color: inherit;
  text-decoration: none;
}

footer .contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

footer .contact-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  fill: currentColor;
  opacity: 0.9;
}

footer a:hover,
footer a:focus-visible {
  text-decoration: underline;
}

footer address {
  font-style: normal;
  line-height: 1.5;
}

footer li,
footer a,
footer address {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 500;
}

@media (width < 600px) {
  main {
    padding-inline: 1rem;
  }

  footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 1.5rem 1rem;
    gap: 1rem;
  }

  footer section {
    gap: 0.5rem;
  }

  footer h2 {
    font-size: 0.75rem;
  }

  footer ul {
    gap: 0.35rem;
  }

  footer .contact-link {
    max-inline-size: 100%;
    min-width: 0;
  }

  footer .contact-link span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  footer li,
  footer a,
  footer address {
    font-size: 0.9rem;
  }
  #platforms {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
  }
}
.copyright {
  grid-column: 1 / -1;
  text-align: center;
  align-self: center;
  margin-top: 1rem;
}
