/* STYLE SHEET */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700&display=swap');

/* CUSTOM PROPERTIES ----------------------------------- */
:root {
  --color-bg: #02191d;
  --color-surface: rgba(5, 54, 60, 0.78);
  --color-surface-strong: rgba(12, 76, 83, 0.9);
  --color-accent: #f29f8d;
  --color-accent-dark: #d97663;
  --color-text: #f7fbff;
  --color-text-muted: #cfe5ec;
  --color-border: rgba(242, 159, 141, 0.25);

  --shadow-elevated: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --container-max: min(1080px, 90vw);
  --transition-base: 220ms ease;
}

/* BASE STYLES ------------------------------------------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, rgba(2, 36, 38, 0.84), rgba(1, 18, 20, 0.94)),
    url('Assets/BackgroundImage.jpeg') center/cover fixed;
  color: var(--color-text);
  line-height: 1.65;
  min-height: 100vh;
}

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

a:hover,
a:focus-visible {
  color: var(--color-accent);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  object-fit: cover;
  background-color: rgba(4, 32, 36, 0.65);
}

.hero__media img,
.skills__portrait img {
  border-width: 4px;
}

.split__media-img,
img[data-selfie] {
  border: 2px solid var(--color-accent);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.3);
  background-color: rgba(7, 45, 50, 0.72);
}

.split__media-img {
  border-width: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: var(--container-max);
  margin: 0 auto;
}

.section {
  padding: clamp(72px, 13vw, 120px) 0;
}

@media (min-width: 768px) {
  html {
    scroll-snap-type: y mandatory;
    scroll-padding-top: clamp(72px, 12vh, 120px);
  }

  .section {
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
}

.section--accent {
  background: var(--color-surface);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.section__header {
  text-align: center;
  margin-bottom: clamp(36px, 6vw, 48px);
}

.section__title {
  font-size: clamp(32px, 5vw, 44px);
  margin: 0 0 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: inline-block;
  padding-bottom: 0.35rem;
  position: relative;
}

.section__intro {
  max-width: 640px;
  margin: 0 auto;
  color: var(--color-text-muted);
}

.section__title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(242, 159, 141, 0.88), transparent);
  background-size: 220% 100%;
  background-position: -40% 50%;
  animation: line-glide-underline 10s linear infinite;
  opacity: 0.9;
}


.eyebrow {
  --eyebrow-letter-spacing: 0.12em;
  --eyebrow-gap: 0.08em;
  text-transform: uppercase;
  letter-spacing: var(--eyebrow-letter-spacing);
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 600;
  color: var(--color-accent);
  display: inline-flex;
  gap: var(--eyebrow-gap);
  position: relative;
  justify-content: flex-start;
  width: 100%;
  max-width: min(520px, 100%);
  margin-inline: 0;
}

.eyebrow.is-animating {
  animation: eyebrow-drop 0.9s cubic-bezier(0.16, 0.85, 0.36, 1) forwards;
}

.eyebrow__letter {
  display: inline-block;
  opacity: 0;
  transform: translate(var(--float-x, 0), var(--float-y, 18px)) scale(1.2);
}

.eyebrow.is-animating .eyebrow__letter {
  animation: eyebrow-float-in 0.95s var(--float-delay, 0s) ease-out forwards;
}

@keyframes eyebrow-float-in {
  0% {
    opacity: 0;
    transform: translate(var(--float-x, 0), var(--float-y, 18px)) scale(1.35);
  }
  55% {
    opacity: 1;
    transform: translate(calc(var(--float-x, 0) * 0.1), calc(var(--float-y, 18px) * 0.1)) scale(1.05);
  }
  75% {
    transform: translate(calc(var(--float-x, 0) * -0.04), calc(var(--float-y, 18px) * -0.04)) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
}

@keyframes eyebrow-drop {
  0% {
    transform: translateY(-32px) scale(1.06);
    opacity: 0;
    letter-spacing: calc(var(--eyebrow-letter-spacing) + 0.24em);
    gap: calc(var(--eyebrow-gap) + 0.1em);
  }
  45% {
    transform: translateY(6px) scale(0.99);
    opacity: 1;
    letter-spacing: calc(var(--eyebrow-letter-spacing) + 0.12em);
    gap: calc(var(--eyebrow-gap) + 0.06em);
  }
  72% {
    transform: translateY(-2px) scale(1.01);
    letter-spacing: calc(var(--eyebrow-letter-spacing) + 0.04em);
    gap: calc(var(--eyebrow-gap) + 0.02em);
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
    letter-spacing: var(--eyebrow-letter-spacing);
    gap: var(--eyebrow-gap);
  }
}

@media (prefers-reduced-motion: reduce) {
  .eyebrow__letter {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .eyebrow.is-animating .eyebrow__letter {
    animation: none;
  }

  .eyebrow.is-animating {
    animation: none;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: #032224;
  font-weight: 600;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
  border: none;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  background: var(--color-accent-dark);
  box-shadow: 0 10px 24px rgba(242, 159, 141, 0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-shadow: none;
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: rgba(242, 159, 141, 0.12);
  color: var(--color-accent);
}

/* NAVIGATION -------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(1, 21, 24, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.site-header--scrolled {
  background: rgba(1, 21, 24, 0.92);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1.5rem;
  position: relative;
}

.nav__brand {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 1rem;
}

.nav__brand span {
  color: var(--color-accent);
}

.nav__toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
}

.nav__toggle-line {
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 99px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.nav__menu {
  display: none;
}

.nav__list {
  list-style: none;
  display: flex;
  gap: clamp(1.25rem, 4vw, 2rem);
  margin: 0;
  padding: 0;
}

.nav__link {
  font-weight: 500;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: -6px;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.nav__link:hover::after,
.nav__link:focus-visible::after {
  transform: scaleX(1);
}

.nav--open .nav__menu {
  display: block;
  position: absolute;
  inset: calc(100% + 12px) 0 auto;
  background: rgba(1, 24, 27, 0.98);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  width: min(260px, calc(100vw - 2rem));
}

.nav--open .nav__list {
  flex-direction: column;
  gap: 1rem;
}

.nav--open .nav__toggle-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav--open .nav__toggle-line:nth-child(2) {
  opacity: 0;
}

.nav--open .nav__toggle-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (min-width: 768px) {
  .nav__toggle {
    display: none;
  }
  .nav__menu {
    display: block;
  }
}

/* HERO SECTION ------------------------------------------- */
.hero {
  padding-top: clamp(48px, 9vw, 96px);
  padding-bottom: clamp(64px, 10vw, 108px);
  overflow-x: clip;
}

.hero__grid {
  display: grid;
  gap: clamp(32px, 6vw, 64px);
  align-items: center;
}

.hero__media {
  position: relative;
}

.hero__media img {
  width: min(320px, 60vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  box-shadow: var(--shadow-elevated);
}

.hero__content {
  display: grid;
  gap: clamp(18px, 4vw, 28px);
}

.hero__title {
  font-size: clamp(36px, 6vw, 50px);
  margin: 0;
  font-weight: 700;
}

.hero__text {
  color: var(--color-text-muted);
  margin: 0;
  max-width: 520px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 599px) {
  .hero {
    padding-top: clamp(64px, 18vw, 96px);
  }

  .hero__media img {
    width: min(220px, 70vw);
  }

  .hero__title {
    font-size: clamp(24px, 7.5vw, 30px);
    line-height: 1.2;
  }

  .hero__text {
    font-size: clamp(0.9rem, 4vw, 1rem);
    text-wrap: balance;
  }

  .hero__actions {
    gap: 0.75rem;
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }

  .hero__actions .btn {
    padding: 0.48rem 1rem;
    font-size: 0.82rem;
    width: auto;
    min-width: min(180px, 72%);
    align-self: center;
  }

  .hero__actions .btn.btn--ghost {
    border-width: 1px;
  }

  .contact__form .btn {
    padding: 0.55rem 1.2rem;
    font-size: 0.85rem;
    width: min(220px, 80%);
    align-self: center;
    justify-self: center;
    margin-inline: auto;
  }

  .hero__content {
    text-align: center;
    align-items: center;
  }

  .eyebrow {
    --eyebrow-letter-spacing: 0.11em;
    --eyebrow-gap: 0.065em;
    font-size: clamp(22px, 6vw, 26px);
    justify-content: center;
    margin-inline: auto;
  }
}

@media (max-width: 360px) {
  .hero__title {
    font-size: clamp(22px, 9vw, 26px);
  }

  .hero__text {
    font-size: clamp(0.85rem, 4.8vw, 0.95rem);
  }

  .hero__actions .btn {
    font-size: 0.76rem;
    padding: 0.46rem 0.9rem;
    min-width: min(170px, 80%);
  }

  .contact__form .btn {
    font-size: 0.82rem;
    padding: 0.5rem 1.05rem;
    justify-self: center;
    margin-inline: auto;
  }
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.2fr);
  }
}

/* ABOUT SECTION SPLIT LAYOUT --------------------- */
.split {
  display: grid;
  gap: clamp(32px, 6vw, 48px);
}

.split__content {
  background: linear-gradient(135deg, rgba(2, 36, 38, 0.84), rgba(1, 18, 20, 0.94)),
    url('Assets/BackgroundImage.jpeg') center/cover fixed;
  padding: clamp(24px, 5vw, 36px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated);
  border: 2px solid var(--color-accent);
  display: grid;
  gap: clamp(18px, 3vw, 24px);
  align-content: start;
}

.split__content p {
  color: var(--color-text-muted);
  margin: 0;
}

.split__media {
  display: grid;
  gap: clamp(16px, 2.5vw, 20px);
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.split__media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1.3fr 1fr;
    align-items: stretch;
  }

  .split__content,
  .split__media {
    height: 100%;
  }

  .split__content {
    align-content: stretch;
  }

  .split__media {
    align-content: stretch;
    grid-auto-rows: minmax(0, clamp(150px, 18vw, 210px));
  }
}

@media (max-width: 599px) {
  body {
    background-attachment: scroll, scroll;
    background-position: center, 48%;
    background-size: cover, clamp(380px, 120vw, 520px);
    background-repeat: no-repeat, no-repeat;
  }

  .hero__grid {
    justify-items: center;
  }

  .hero__media {
    justify-self: center;
  }

  .split__media {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(12px, 4vw, 18px);
    justify-items: center;
    align-items: start;
    margin-inline: auto;
    width: min(320px, 100%);
  }

  .split__media img {
    height: auto;
  }

  .split__media-img {
    width: min(132px, 42vw);
    max-width: 132px;
  }

  .split__content,
  .skills__group {
    background-attachment: scroll, scroll;
    background-position: center, center;
    background-size: auto, cover;
    background-repeat: no-repeat;
  }

  .contact {
    background-attachment: scroll, scroll;
    background-position: center, 52% 48%;
    background-size: cover, clamp(420px, 130vw, 560px);
    background-repeat: no-repeat, no-repeat;
  }
}

@media (max-width: 430px) {
  body {
    background-position: center, 52%;
    background-size: cover, clamp(400px, 140vw, 520px);
  }

  .contact {
    background-position: center, 50% 50%;
    background-size: cover, clamp(440px, 155vw, 600px);
  }
}

/* PROJECTS SECTION ------------------------------- */
.projects {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.projects__viewport {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-block: 0.5rem;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  scroll-padding-inline: clamp(8px, 3vw, 24px);
}

.projects__viewport::-webkit-scrollbar {
  height: 6px;
}

.projects__viewport::-webkit-scrollbar-track,
.projects__viewport::-webkit-scrollbar-thumb {
  background: transparent;
}

.projects__viewport:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

.projects__track {
  display: flex;
  justify-content: center;
  gap: clamp(24px, 3vw, 32px);
  padding-inline: clamp(8px, 3vw, 24px);
  position: relative;
  z-index: 1;
}

.projects__track > .card {
  flex: 0 0 clamp(260px, 30vw, 320px);
  max-width: clamp(260px, 30vw, 320px);
  scroll-snap-align: start;
  background: transparent !important;
  border: 2px solid var(--color-accent);
  box-shadow: none !important;
  position: relative;
}

.projects__track > .card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(1, 28, 31, 0.88);
  border-radius: var(--radius-lg);
  z-index: 0;
}

.projects__track > .card .card__body {
  background: rgba(1, 28, 31, 0.88);
  border-radius: var(--radius-md);
  padding: clamp(18px, 4vw, 24px);
  display: grid;
  gap: clamp(10px, 3vw, 14px);
  position: relative;
  z-index: 1;
}

.projects__track > .card img {
  width: 100%;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative;
  z-index: 1;
}

.projects__nav {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(3, 29, 33, 0.85);
  color: var(--color-accent);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform var(--transition-base), opacity var(--transition-base);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
  z-index: 2;
}

.projects__nav:hover,
.projects__nav:focus-visible {
  transform: translateY(-3px);
}

.projects__nav[disabled] {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.projects__nav i {
  font-size: 1rem;
  color: inherit;
}

@media (max-width: 767px) {
  .projects {
    gap: 0.5rem;
  }

  .projects__nav {
    width: 40px;
    height: 40px;
  }

  .projects__track {
    gap: clamp(18px, 6vw, 24px);
  }

  .projects__track > .card {
    flex: 0 0 clamp(300px, 94vw, 380px);
    max-width: clamp(300px, 94vw, 380px);
    background: transparent !important;
    border: 2px solid var(--color-accent);
    box-shadow: none !important;
    border-radius: 28px;
    overflow: hidden;
  }

  .projects__track > .card img {
    width: 110%;
    max-width: none;
    transform: translateX(-5%);
    aspect-ratio: 16 / 9;
    border-radius: 28px 28px 0 0;
  }

  .projects__track > .card .card__body {
    padding: clamp(12px, 5vw, 18px) clamp(16px, 6vw, 22px);
    font-size: 0.92em;
    gap: 0.85rem;
    text-align: center;
    justify-items: center;
    border-radius: 0 0 28px 28px;
    padding-bottom: clamp(22px, 8vw, 34px);
  }

  .projects__track > .card::before {
    background: rgba(1, 28, 31, 0.9);
    border-radius: 28px;
  }

  .projects__track > .card .card__title {
    font-size: 1.08em;
    margin-bottom: 0.4rem;
  }

  .projects__track > .card .card__text {
    font-size: 0.82em;
    line-height: 1.45;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-inline: clamp(12px, 6vw, 20px);
    max-width: 30ch;
    margin: 0 auto;
  }

  .projects__track > .card .card__link {
    font-size: 0.65em;
    justify-content: center;
    margin-bottom: clamp(6px, 4vw, 14px);
  }
}

@media (max-width: 640px) {
  .projects {
    flex-direction: column;
    align-items: center;
    gap: clamp(24px, 6vw, 32px);
    min-height: clamp(520px, 90vh, 640px);
  }

  .projects__nav {
    display: grid;
    width: clamp(44px, 14vw, 56px);
    height: clamp(44px, 14vw, 56px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
    position: relative;
    z-index: 3;
  }

  .projects__nav.projects__nav--prev {
    order: -1;
    margin-top: clamp(16px, 5vw, 22px);
  }

  .projects__nav.projects__nav--next {
    order: 1;
    margin-bottom: clamp(16px, 5vw, 22px);
  }

  .projects__nav.projects__nav--prev:hover,
  .projects__nav.projects__nav--prev:focus-visible,
  .projects__nav.projects__nav--next:hover,
  .projects__nav.projects__nav--next:focus-visible {
    transform: translateY(0);
  }

  /* One card visible: height is set via JS to exactly the card height */
  .projects__viewport {
    flex: none;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    padding-block: 0;
    width: min(360px, 95vw);
  }

  .projects__track {
    flex-direction: column;
    align-items: center;
    gap: clamp(16px, 4vw, 24px);
    transition: transform var(--transition-slower);
  }

  .projects__track > .card {
    width: clamp(260px, 90vw, 320px);
    scroll-snap-align: start;
  }

  .projects__track > .card img {
    width: 100%;
    transform: none;
    border-radius: 28px 28px 0 0;
    aspect-ratio: 16 / 9;
  }

  .projects__track > .card::before {
    border-radius: 28px;
  }

  .projects__track > .card .card__body {
    padding: clamp(16px, 4.5vw, 22px) clamp(20px, 7vw, 26px);
    gap: clamp(10px, 3.5vw, 14px);
    font-size: 1em;
    padding-bottom: clamp(26px, 8vw, 36px);
  }

  .projects__track > .card .card__title {
    font-size: 1.1em;
  }

  .projects__track > .card .card__text {
    font-size: 0.88em;
    max-width: 32ch;
    padding-inline: clamp(14px, 6vw, 22px);
  }

  .projects__track > .card .card__link {
    font-size: 0.7em;
    margin-bottom: clamp(12px, 5vw, 18px);
  }
}

.projects__ambient {
  position: absolute;
  top: -22%;
  bottom: -22%;
  left: 50%;
  width: min(1200px, 100vw);
  transform: translateX(-50%);
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.projects__ambient-line {
  position: absolute;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(242, 159, 141, 0.85), transparent);
  opacity: 0.65;
  filter: drop-shadow(0 0 6px rgba(242, 159, 141, 0.32));
}

@media (min-width: 1024px) {
  .projects__track {
    --projects-card-gap: clamp(24px, 2.5vw, 28px);
    gap: var(--projects-card-gap);
    padding-inline: clamp(12px, 2vw, 20px);
  }

  .projects__track > .card {
    flex: 0 0 clamp(260px, calc((100% - 2 * var(--projects-card-gap)) / 3), 296px);
    max-width: clamp(260px, calc((100% - 2 * var(--projects-card-gap)) / 3), 296px);
  }
}

.card {
  background: rgba(1, 28, 31, 0.88);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated);
  overflow: hidden;
  border: 2px solid var(--color-accent);
  display: grid;
}

.card img {
  width: 100%;
  aspect-ratio: 16 / 10;
}

.card__body {
  padding: clamp(20px, 4vw, 28px);
  display: grid;
  gap: clamp(12px, 3vw, 16px);
}

.card__title {
  margin: 0;
  font-size: clamp(1.28rem, 1.4vw + 1.05rem, 1.48rem);
  letter-spacing: 0.03em;
}

.card__text {
  margin: 0;
  color: var(--color-text-muted);
  font-size: clamp(0.9rem, 1vw + 0.75rem, 1.05rem);
}

.card__link {
  font-weight: 600;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75em;
}

.card__link::after {
  content: '\f061';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.8rem;
  transition: transform var(--transition-base);
}

.card__link:hover::after,
.card__link:focus-visible::after {
  transform: translateX(4px);
}

/* SKILLS ------------------------------------ */
.skills__grid {
  display: grid;
  gap: clamp(24px, 4vw, 36px);
  position: relative;
}

@media (min-width: 768px) {
  .skills__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 1;
  }
}

.skills__group {
  border-radius: var(--radius-md);
  padding: clamp(24px, 4vw, 28px);
  border: 2px solid var(--color-accent);
  background: linear-gradient(135deg, rgba(2, 36, 38, 0.84), rgba(1, 18, 20, 0.94)),
    url('Assets/BackgroundImage.jpeg') center/cover fixed;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.25);
}

.skills__group h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.skills__group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  color: var(--color-text-muted);
}

.skills__group--right {
  text-align: right;
}

.skills__group--right ul {
  justify-items: end;
}

.skills__portrait {
  display: none;
  position: absolute;
  top: 50%;
  left: 46%;
  transform: translate(-50%, -50%);
  width: clamp(140px, 18vw, 200px);
  z-index: 2;
  pointer-events: none;
}

.skills__portrait img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-elevated);
}

@media (min-width: 768px) {
  .skills__portrait {
    display: block;
  }
}

/* CONTACT ------------------------------------- */
.contact {
  display: grid;
  gap: clamp(32px, 6vw, 48px);
  background: linear-gradient(135deg, rgba(2, 36, 38, 0.84), rgba(1, 18, 20, 0.94)),
    url('Assets/BackgroundImage.jpeg') center/cover fixed;
  padding: clamp(32px, 6vw, 48px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elevated);
  border: 2px solid var(--color-accent);
}

.contact__content p {
  margin: 0 0 1.25rem;
  color: var(--color-text-muted);
}

.contact__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.contact__links a {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--color-text-muted);
  transition: color var(--transition-base);
}

.contact__links i {
  font-size: 0.95rem;
  color: var(--color-accent);
}

.contact__links a:hover,
.contact__links a:focus-visible {
  color: var(--color-accent);
}

.contact__form {
  display: grid;
  gap: 4rem;
}

.form__field {
  display: grid;
  gap: 0.45rem;
  font-size: 0.9rem;
}

.honeyfield {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.form__field span {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-accent);
  background: rgba(3, 26, 29, 0.72);
  padding: 0.85rem 1rem;
  color: var(--color-text);
  font: inherit;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-accent-dark);
  box-shadow: 0 0 0 2px rgba(242, 159, 141, 0.16);
}

textarea {
  resize: vertical;
}

.form__note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* Center the captcha row */
#contact-form .g-recaptcha {
  transform: scale(0.98); /* tiny shrink if needed */
  transform-origin: center;
}


@media (min-width: 900px) {
  .contact {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* FOOTER SECTION ----------------------------------- */
.footer {
  background: rgba(0, 14, 17, 0.92);
  padding: 32px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer__content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
}

.footer__brand {
  margin: 0;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-align: center;
}

.footer__social {
  display: flex;
  gap: 1rem;
  font-size: 1.25rem;
}

.footer__social a {
  transition: color var(--transition-base), transform var(--transition-base);
}

.footer__social a:hover,
.footer__social a:focus-visible {
  color: var(--color-accent);
  transform: translateY(-2px);
}

.wip__panel {
  text-align: center;
  background: var(--color-surface-strong);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 6vw, 48px);
  box-shadow: var(--shadow-elevated);
  border: 1px solid var(--color-border);
  display: grid;
  gap: clamp(20px, 3vw, 28px);
}

@media (min-width: 768px) {
  .footer__content {
    flex-direction: row;
    align-items: center;
    text-align: center;
  }

  .footer__brand {
    margin-left: clamp(1.5rem, 8vw, 4rem);
    margin-right: auto;
  }
}

/* BACK-TO-TOP BUTTON ----------------------------- */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(3, 29, 33, 0.9);
  color: var(--color-accent);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform var(--transition-base);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45);
}

.back-to-top i {
  color: var(--color-accent);
  font-size: 1rem;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  transform: translateY(-3px);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top--pulse {
  animation: back-to-top-glow 1.6s ease-out 5;
}

@keyframes line-glide-border {
  from {
    background-position: 0 0, -40% 50%;
  }
  to {
    background-position: 0 0, 160% 50%;
  }
}

@keyframes line-glide-underline {
  from {
    background-position: -40% 50%;
  }
  to {
    background-position: 160% 50%;
  }
}

@keyframes back-to-top-glow {
  0% {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45);
  }
  40% {
    box-shadow: 0 0 0 10px rgba(242, 159, 141, 0.28), 0 12px 24px rgba(0, 0, 0, 0.45);
  }
  100% {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45);
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top--pulse {
    animation: none;
  }

  img,
  .section__title::after,
  .skills__group {
    animation: none !important;
  }

  img {
    background-position: 0 0, 50% 50% !important;
  }

  .section__title::after {
    background-position: 50% 50% !important;
  }

  .skills__group {
    background-position: 0 0, 50% 50% !important;
  }

  html {
    scroll-snap-type: none;
  }

  .section {
    scroll-snap-align: unset;
    scroll-snap-stop: normal;
  }
}

/* ADDITIONAL RESPONSIVENESS ------------------------ */
@media (max-width: 767px) {
  .container {
    width: min(92vw, 640px);
  }
}
