/* ===== Global Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  background: linear-gradient(135deg, #d4fc79, #96e6a1);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
  color: #333;
}

/* ===== Flip Card Container ===== */
.card {
  width: 100%;
  max-width: 650px;
  perspective: 1200px;
  position: relative;
}

.card-side {
  width: 100%;
  min-height: 700px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0px 8px 24px rgba(0,0,0,0.15);
  backface-visibility: hidden;
  transition: transform 0.8s ease-in-out;
  position: absolute;
  top: 0;
  left: 0;
}

.card-front {
  transform: rotateY(0deg);
  z-index: 2;
}

.card-back {
  transform: rotateY(180deg);
  z-index: 1;
}

.card.flip .card-front {
  transform: rotateY(-180deg);
}

.card.flip .card-back {
  transform: rotateY(0deg);
  z-index: 3;
}

/* ===== Form Styling ===== */
h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #2c3e50;
  font-size: 1.8em;
}

form {
  display: flex;
  flex-direction: column;
}

label {
  margin: 10px 0 6px;
  font-weight: 600;
  font-size: 0.95em;
  color: #34495e;
}

input, textarea {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1em;
  margin-bottom: 6px;
  transition: 0.3s;
}

input:focus, textarea:focus {
  border-color: #42a5f5;
  outline: none;
  box-shadow: 0px 0px 6px rgba(66, 165, 245, 0.4);
}

.error {
  color: red;
  font-size: 0.8em;
  margin-bottom: 8px;
  display: none;
}

button {
  margin-top: 15px;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #42a5f5, #478ed1);
  color: #fff;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  background: linear-gradient(135deg, #1e88e5, #1565c0);
  transform: translateY(-2px);
}

/* ===== CV Section Styling ===== */
#cvSection {
  overflow-y: auto;
}

#cvSection h1 {
  text-align: center;
  margin-bottom: 15px;
  color: #0d47a1;
  font-size: 1.7em;
}

#cvSection p {
  margin: 6px 0;
  font-size: 1em;
  color: #444;
}

#cvSection h2 {
  margin: 18px 0 8px;
  color: #1565c0;
  font-size: 1.2em;
  border-left: 4px solid #42a5f5;
  padding-left: 8px;
}

#cvSection button {
  display: block;
  margin: 15px auto 0;
  background: #00c853;
}

#cvSection button:hover {
  background: #009624;
}

#cvSection button:last-of-type {
  background: #ff9800;
}

#cvSection button:last-of-type:hover {
  background: #e65100;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .card {
    padding: 20px;
  }
}

@media (max-width: 650px) {
  .card-side {
    padding: 20px;
    min-height: 600px;
  }
  input, textarea {
    font-size: 0.9em;
  }
  h1 {
    font-size: 1.5em;
  }
}

@media (max-width: 480px) {
  body {
    padding: 20px 10px;
  }
  .card-side {
    padding: 15px;
  }
  h1 {
    font-size: 1.3em;
  }
  input, textarea {
    padding: 10px;
    font-size: 0.85em;
  }
  button {
    padding: 10px;
    font-size: 0.9em;
  }
  #cvSection h1 {
    font-size: 1.4em;
  }
  #cvSection h2 {
    font-size: 1.1em;
  }
  #cvSection p {
    font-size: 0.9em;
  }
}

/* ===== Print Styling ===== */
@media print {
  body {
    background: #fff;
    padding: 0;
  }
  .card, .card-side {
    box-shadow: none;
    background: #fff;
  }
  .card-front, .card button {
    display: none !important;
  }
  .card-back {
    transform: rotateY(0deg) !important;
    position: relative;
  }
}
