/* reset base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

body {
  background: #fff;
  color: #111;
  line-height: 1.6;
}

html {
  scroll-behavior: smooth;
}

h1, h2 {
  margin-bottom: 16px;
}

p {
  max-width: 600px;
  margin-bottom: 24px;
}

/* typography */
h2 {
  font-family: impact, sans-serif;
  font-weight: normal;
  letter-spacing: 2px;
  transform: scaleX(0.92);
  transform-origin: left center;
}

/* navigation */
nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #f4f4f4;
  border: 2px solid #000;
  border-radius: 40px;
  padding: 12px 32px;
  display: flex;
  gap: 24px;
  z-index: 1000;
}

nav a {
  text-decoration: none;
  color: #000;
  font-weight: bold;
}

/* home button circle */
.home-button {
  position: fixed;
  top: 24px;
  left: 24px;
  width: 64px;
  height: 64px;
  z-index: 2000;
  cursor: pointer;
  border-radius: 50%;
  background: linear-gradient(135deg, #c5adc6, #ffecf5);
  transition: transform 0.6s ease;
}

.home-button.spin {
  animation: spin 0.8s ease-in-out;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* buttons */
.button {
  display: inline-block;
  padding: 12px 20px;
  border: 2px solid #000;
  text-decoration: none;
  color: #000;
  font-weight: bold;
  margin-top: 16px;
}

/* form inputs */
form {
  max-width: 400px;
}

input, textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 16px;
  border: 2px solid #000;
}

/* works grid */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 800px;
}

.card {
  border: 5px solid #000;
  padding: 60px;
  text-align: center;
  font-weight: bold;
  color: #000;
  text-decoration: none;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  display: block;
}

.card:hover {
  background: #c5adc6;
  border-color: #000;
  color: #000;
  cursor: pointer;
}

.grid .card:nth-child(1),
.grid .card:nth-child(4) {
  border-color: #c5adc6;
}

/* stars */
.stars {
  position: absolute;
  right: 100px;
  top: 100px;
  height: 100%;
  display: flex;
  flex-direction: row;
  gap: 30px;
  padding: 40px 30px;
}

.star {
  width: 50px;
  height: 50px;
  background: #c5adc6;
  clip-path: polygon(
    50% 0%,
    61% 35%,
    100% 50%,
    61% 65%,
    50% 100%,
    39% 65%,
    0% 50%,
    39% 35%
  );
}

/* sections */
section {
  padding: 120px 40px;
  min-height: 100vh;
  position: relative;
}

/* section borders */
#home { border: 6px dashed #000; overflow: hidden; }
#works { border: 6px solid #000; border-left-width: 12px; overflow: hidden; }
#profile { border: 6px dotted #000; }
#contact { border: 12px double #000; }

/* windows home and profile */
.windows-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1300px;
  height: 440px;
  z-index: 1;
}

.window {
  position: absolute;
  background: #fff;
  border: 2px solid #000;
  border-radius: 6px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
  overflow: hidden;
}

.titlebar {
  height: 28px;
  padding: 6px 10px;
  font-size: 12px;
  border-bottom: 2px solid #000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #eee;
}

.content {
  height: calc(100% - 28px);
  display: grid;
  place-items: center;
}

.content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* home windows positions */
.w-large { width: 950px; height: 650px; top: -60px; left: 200px; z-index: 1; }
.w-left  { width: 360px; height: 420px; top: 140px; left: 0; z-index: 2; }
.w-mid   { width: 320px; height: 320px; top: 80px; left: 1000px; z-index: 3; }

/* home highlights */
.highlight {
  position: absolute;
  border: 15px solid;
  border-image: linear-gradient(135deg, #c5adc6, #ffecf5) 1;
  z-index: 5;
}

.h-left { width: 120px; height: 180px; top: 30px; left: 110px; }
.h-large { width: 350px; height: 200px; top: -120px; left: 480px; }
.h-mid { width: 120px; height: 150px; top: 300px; left: 950px; }

/* home text */
#home h2, #home b { position: relative; z-index: 1; }

/* home decorations */
.home-decoration {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30vw;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  pointer-events: none;
  z-index: 0;
}

.home-decoration.left { left: 0; background-image: url("images/starsleft.png"); }
.home-decoration.right { right: 0; background-image: url("images/starsright.png"); }

/* profile section */
#profile {
  background: linear-gradient(135deg, #ffffff 40%, #c5adc6 100%);
  position: relative;
  overflow: hidden;
}

.profile-decoration.right {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 70vw;
  background-image: url("images/starsrightpro.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  pointer-events: none;
  z-index: 0;
}

/* profile windows */
.profile-windows {
  position: relative;
  width: 700px;
  height: 420px;
  margin-top: 60px;
}

.pw-back { width: 420px; height: 400px; top: 60px; left: 0; z-index: 1; }
.pw-front { width: 300px; height: 400px; top: 0; left: 180px; z-index: 2; }

/* contact social buttons */
.contact-social-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.contact-social-buttons .social-btn {
  padding: 10px 20px;
  border: 2px solid #000;
  color: #000;
  text-decoration: none;
  font-weight: bold;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.contact-social-buttons .social-btn:hover {
  background: #c5adc6;
  color: #fff;
}

/* contact stars top-right */
#contact {
  position: relative;
  overflow: hidden;
}

.contact-stars {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 40px;
  z-index: 0;
}

.contact-stars .star {
  width: 70px;
  height: 70px;
  background: #c5adc6;
  clip-path: polygon(
    50% 0%,
    61% 35%,
    100% 50%,
    61% 65%,
    50% 100%,
    39% 65%,
    0% 50%,
    39% 35%
  );
}

/* gradient overlay on contact */
#contact::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 150px;
  background: linear-gradient(to top, #c5adc6, rgba(197, 173, 198, 0));
  pointer-events: none;
  z-index: 0;
}
