@import url("https://fonts.googleapis.com/css2?family=Fraunces:wght@300..900&family=Onest:wght@300..800&display=swap");

:root {
  --bg: #f7f4ef;
  --bg-2: #f0f6f4;
  --surface: #ffffff;
  --ink: #1b2b34;
  --muted: #5b6b73;
  --accent: #ff6b4a;
  --accent-2: #0ea5a6;
  --accent-3: #f2c94c;
  --shadow: 0 12px 30px rgba(13, 31, 45, 0.12);
  --shadow-soft: 0 8px 20px rgba(13, 31, 45, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Onest", sans-serif;
  color: var(--ink);
  background: radial-gradient(60% 60% at 10% 10%, #fff7ec 0%, transparent 60%),
    radial-gradient(50% 50% at 90% 20%, #e8fbfb 0%, transparent 55%),
    linear-gradient(160deg, var(--bg), var(--bg-2));
  scroll-behavior: smooth;
}

h1,
h2,
h3 {
  font-family: "Fraunces", serif;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

img {
  max-width: 100%;
  display: block;
}

.shadow {
  box-shadow: var(--shadow);
}

/* Header */
header {
  height: 70px;
  align-content: center;
}

nav {
  margin: 0 10%;
  height: 70%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo > img {
  height: 30px;
}

.menus-container {
  position: relative;
  display: flex;
  align-items: center;
}

ul {
  margin: 0;
  padding: 0;
  display: flex;
}

li {
  list-style: none;
  text-align: center;
}

a {
  position: relative;
  border-radius: 10px;
  display: block;
  margin: 0 10px;
  padding: 5px 10px;
  color: #333;
  text-decoration: none;
  text-transform: uppercase;
  transition: 0.5s;
  overflow: hidden;
}

a:before {
  content: "";
  position: absolute;
  width: 100%;
  height: 4px;
  top: 50%;
  transform: translateY(-50%);
  left: -100%;
  background-color: blueviolet;
  transition: 0.5s;
}

a:hover:before {
  animation: line 0.5s linear forwards;
}

@keyframes line {
  0% {
    left: -100%;
    height: 4px;
  }
  50% {
    left: 0;
    height: 4px;
  }
  100% {
    left: 0;
    height: 100%;
    z-index: -1;
  }
}

a:hover {
  color: white;
}

.container {
  display: none;
  align-items: center;
  justify-content: center;
  margin-left: 12px;
  cursor: pointer;
}

/* Hero */
.hero-container {
  min-height: calc(100vh - 70px);
  margin: 0 10%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  align-items: center;
  padding: 4rem 0 6rem;
}

.text-container {
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: 1.25rem;
}

.text-container > h1 {
  margin: 0;
  font-size: clamp(2.6rem, 4vw, 4rem);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--accent-2);
  font-weight: 700;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.hero-stats span {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
}

.hero-stats p {
  font-size: 0.85rem;
}

.animation-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.animation {
  position: relative;
  width: 380px;
  height: 380px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.animation > span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(14, 165, 166, 0.5);
  animation: rotate 6s linear infinite;
}

.animation span:nth-child(1) {
  border-radius: 32% 68% 59% 41% / 52% 33% 67% 48%;
}

.animation span:nth-child(2) {
  border-radius: 64% 36% 43% 57% / 68% 66% 34% 32%;
  animation-direction: reverse;
  border-color: rgba(255, 107, 74, 0.5);
}

.animation span:nth-child(3) {
  border-radius: 42% 58% 52% 48% / 72% 31% 69% 28%;
  animation-duration: 11s;
  border-color: rgba(242, 201, 76, 0.5);
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.animation-container > img {
  position: absolute;
  z-index: 1;
  height: 300px;
  width: 300px;
  border-radius: 40%;
  box-shadow: var(--shadow-soft);
}

/* Buttons */
.btn {
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all 0.3s ease;
  background: transparent;
  color: var(--ink);
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), #ff9678);
  color: white;
  box-shadow: 0 12px 24px rgba(255, 107, 74, 0.25);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(255, 107, 74, 0.35);
}

.btn.ghost {
  border-color: rgba(27, 43, 52, 0.2);
  background: rgba(255, 255, 255, 0.6);
}

.btn.ghost:hover {
  border-color: rgba(27, 43, 52, 0.45);
  transform: translateY(-2px);
}

/* Projects */
.project-container {
  padding: 5rem 0 6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2rem;
}

.project-container > h1 {
  margin: 0;
}

.project-wrapper {
  margin: 0 10%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(27, 43, 52, 0.08);
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.project-card > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.card-text-wrapper {
  margin: 0 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 1rem;
}

.card-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
}

/* Services */
.services-container {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.services-wrapper {
  margin: 5% 10%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5rem;
}

.service-card {
  width: 250px;
  height: 250px;
  border: blueviolet 1px solid;
  border-radius: 5px;
  padding: 10px;
  text-align: center;
  align-content: center;
  z-index: 1;
  cursor: pointer;
  position: relative;
}

.service-card p {
  content: "Frontend";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 50px;
  width: 100%;
  background-color: blueviolet;
  align-content: center;
  color: white;
  opacity: 0;
  transform: translateY(-100%);
  transition: all 1s;
}

.service-card:hover p {
  transform: translate(0);
  opacity: 1;
}

.service-card > img {
  transition: all 1s;
}

.service-card:hover img {
  transform: translate(100px, -90px) scale(1.2);
}

.service-card ul {
  display: flex;
  align-items: start;
  flex-direction: column;
  gap: 1px;
  position: absolute;
  top: 15%;
  left: 25%;
  transform: translate(50%);
  transition: all 1s;
}

.service-card ul li {
  opacity: 0;
  transform: translateX(-50px);
}

.service-card:hover ul {
  transform: translate(-50%);
}

.service-card:hover ul li {
  animation-name: slideIn;
  animation: slideIn 0.5s forwards;
  animation-delay: var(--delay);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.service-card ul li:nth-child(1) {
  --delay: 0.1s;
}

.service-card ul li:nth-child(2) {
  --delay: 0.2s;
}

.service-card ul li:nth-child(3) {
  --delay: 0.3s;
}

.service-card ul li:nth-child(4) {
  --delay: 0.4s;
}

.service-card ul li:nth-child(5) {
  --delay: 0.5s;
}

.service-card ul li:nth-child(6) {
  --delay: 0.6s;
}

.service-card ul li:nth-child(7) {
  --delay: 0.7s;
}

/* Contact Me */
.contact-container {
  padding: 6rem 0 7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: min(420px, 90vw);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.form-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-weight: 600;
  color: var(--ink);
}

.contact-wrapper input,
textarea {
  outline: none;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(27, 43, 52, 0.12);
  padding: 10px 12px;
  font-family: inherit;
}

.contact-wrapper input:focus,
textarea:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(14, 165, 166, 0.15);
}

/* Footer */
footer {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 1024px) {
  .project-wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  ul {
    display: none;
  }

  .container {
    display: inline-flex;
  }

  .bar1,
  .bar2,
  .bar3 {
    width: 32px;
    height: 4px;
    background-color: var(--ink);
    margin: 6px 0;
    transition: 0.4s;
  }

  .hero-container {
    grid-template-columns: 1fr;
    padding: 3rem 0 4rem;
  }

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

  .hero-cta {
    justify-content: center;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .animation {
    width: 260px;
    height: 260px;
  }

  .animation-container > img {
    height: 220px;
    width: 220px;
  }

  .project-wrapper {
    grid-template-columns: 1fr;
  }

  .services-container {
    height: auto;
  }

  .services-wrapper {
    flex-direction: column;
  }

  .service-card > img {
    transform: translate(100px, -90px);
  }

  .service-card ul {
    transform: translate(0);
  }

  .service-card ul li {
    opacity: 1;
  }

  .service-card p {
    opacity: 1;
    transform: translate(0);
  }
}
