/* CSS RESET */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  font-family: "Montserrat", sans-serif;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}
body {
  background-color: #303030;
  line-height: 1;
}
ol,
ul {
  list-style: none;
}
blockquote,
q {
  quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
  content: "";
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}
/* CSS RESET LIMIT */

:root {
  --text-highlight: #fff; /* change to your theme color */
  --cycle: 7.5s; /* 3 words × 2.5s each */
}

.words-rotator {
  font-weight: 600;
  font-style: italic;
  color: var(--text-highlight);
  position: relative;
  display: inline-block;
  width: 300px; /* base width like your styled component */
  text-align: left;
  margin-left: 8px;
  letter-spacing: 1px;
  /* text-align: center; */
  transition: color 0.2s ease-out;
  line-height: 1.2;
}

/* keep height stable (like the hidden <i> in your React) */
.words-rotator .measure {
  visibility: hidden; /* takes up space */
  white-space: nowrap;
  display: block;
}

.words-rotator span {
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  display: block;
  width: 100%;
  opacity: 0;
  text-align: left;
  letter-spacing: 1px;
  transform: translateY(10px);
  animation: fadeUp var(--cycle) ease-out infinite both;
  /* prevent selection highlight during transitions */
  user-select: none;
}

/* 3 words, staggered within the full cycle (7.5s) */
.words-rotator span:nth-child(2) {
  animation-delay: 0s;
} /* self-taught */
.words-rotator span:nth-child(3) {
  animation-delay: 2.5s;
} /* committed   */
.words-rotator span:nth-child(4) {
  animation-delay: 5s;
} /* passionate  */

/* One word’s timeline within the 7.5s cycle:
     - 0%..6%   : fade in & slide up
     - 6%..28%  : fully visible (hold)
     - 28%..34% : fade out & slide up
     - 34%..100%: hidden
     These percentages map roughly to a 2.5s “slot”
  */
@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  6% {
    opacity: 1;
    transform: translateY(0);
  }
  28% {
    opacity: 1;
    transform: translateY(0);
  }
  34% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* Rough equivalents to your theme media queries */
/* @media (max-width: 1200px) {
  .words-rotator {
    width: 105px;
  }
}
@media (max-width: 992px) {
  .words-rotator {
    width: 100px;
  }
} */
/* @media (max-width: 768px) {
  .words-rotator {
    width: 150px;
  }
} */
/* @media (max-width: 576px) {
  .words-rotator {
    width: 90px;
  }
} */

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .words-rotator span {
    animation: none;
    opacity: 1;
    transform: none;
  }
  /* show the first word only in reduced motion */
  .words-rotator span:not(:nth-child(2)) {
    display: none;
  }
}

.name {
  color: var(--text-highlight);
  font-size: 32px;
  font-weight: 700;
  padding-top: 16px;
  margin-bottom: 16px;
}

.container {
  width: 50%;
  margin: auto;
  padding: 8px 0;
}

@media screen and (max-width: 768px) {
  .container {
    width: 90%;
  }
}

.description {
  color: #f0f0f0;
  font-size: 14px;
  text-align: justify;
  margin-top: 20px;
  line-height: 2;
  letter-spacing: 1.5px;
}

.links {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.link {
  color: var(--text-highlight);
  text-decoration: none;
  font-size: 14px;
  border: 1px solid var(--text-highlight);
  padding: 8px 16px;
  border-radius: 4px;
  line-height: 2;
  letter-spacing: 1.5px;
  transition: background-color 0.3s, color 0.3s;
}
