@import url("https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&family=Cormorant+Garamond:wght@400;500;600;700&display=swap");

:root {
  --purple: #7b4bb7;
  --gold: #d4af37;
  --midnight: #0b1120;
  --lavender: #d8c8f0;
  --light-black: #151515;
  --soft-black: #1e1e1e;
  --card-bg: rgba(11, 17, 32, 0.88);
  --glass: rgba(255, 255, 255, 0.06);
  --border: rgba(212, 175, 55, 0.35);
  --text: #f4ebff;
  --muted: #e3d8f4;
  --shadow: 0 14px 35px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 18px 45px rgba(123, 75, 183, 0.28);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-pill: 999px;
  --transition: 0.35s ease;
}

html {
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(123, 75, 183, 0.25), transparent 28%),
    linear-gradient(180deg, var(--midnight), var(--light-black));
  min-height: 100vh;
  line-height: 1.7;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
button,
nav a,
label {
  font-family: "Cinzel Decorative", serif;
  letter-spacing: 0.5px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
li,
label {
  font-size: 1.15rem;
  color: var(--muted);
}

/* Background variations per page */
#Index-Body,
#About-Body {
  background:
    radial-gradient(
      circle at top left,
      rgba(212, 175, 55, 0.14),
      transparent 26%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(123, 75, 183, 0.22),
      transparent 30%
    ),
    linear-gradient(180deg, var(--midnight), var(--light-black));
}

#Projects-Page,
#Contact-Form {
  background:
    radial-gradient(circle at top, rgba(216, 200, 240, 0.12), transparent 30%),
    linear-gradient(180deg, #100c1c, #151515);
}

/* Shared main containers */
#Home-Page,
#Projects-Page,
.About-Content,
#Contact-Form {
  width: min(1180px, calc(100% - 32px));
  margin: 20px auto;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(12, 12, 16, 0.45);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

/* NAVIGATION */
.Navbar {
  width: 100%;
  padding: 1.5rem 1rem;
}

.Navbar-Content {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 0;
  margin: 0;
}

.Navbar-Content a {
  display: inline-block;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(255, 255, 255, 0.04);
  transition:
    transform var(--transition),
    background var(--transition),
    box-shadow var(--transition),
    color var(--transition);
}

.Navbar-Content a:hover,
.Navbar-Content a:focus-visible {
  transform: translateY(-3px) scale(1.03);
  background: rgba(212, 175, 55, 0.14);
  box-shadow: var(--shadow-hover);
  color: #fff;
}

/* HOME PAGE */
.Main-Section {
  display: grid;
  gap: 20px;
  justify-items: center;
  text-align: center;
  padding: 28px 20px 14px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(123, 75, 183, 0.22), rgba(11, 17, 32, 0.72)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 175, 55, 0.22);
}

.Main-Title,
#Projects-Page h2,
.Header-Section h1,
.Contact-Title,
.Welcome-Section h2,
.Featured-Section h3,
.Skills h3 {
  color: var(--gold);
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.14);
}

.Main-Title {
  font-size: clamp(2.2rem, 4vw, 4rem);
  margin: 0;
}

.Main-Text p {
  margin-top: 8px;
  font-size: 1.35rem;
  color: var(--lavender);
}

.Welcome-Section,
.Featured-Section {
  margin-top: 22px;
  padding: 28px 24px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  text-align: center;
}

.Welcome-Section {
  background: linear-gradient(
    135deg,
    rgba(123, 75, 183, 0.18),
    rgba(11, 17, 32, 0.72)
  );
}

.Featured-Section {
  background: linear-gradient(
    135deg,
    rgba(212, 175, 55, 0.12),
    rgba(21, 21, 21, 0.78)
  );
}

.Welcome-Section p,
.Featured-Section p,
.Header-Section p {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.2rem;
}

/* ABOUT PAGE */
.About-Content {
  display: grid;
  gap: 22px;
}

.Header-Section,
.Image-Portion,
.Skills {
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.Header-Section {
  text-align: center;
  background: linear-gradient(
    135deg,
    rgba(11, 17, 32, 0.88),
    rgba(123, 75, 183, 0.2)
  );
}

.Image-Portion {
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(
    135deg,
    rgba(212, 175, 55, 0.08),
    rgba(255, 255, 255, 0.03)
  );
}

.Image-Portion img {
  width: min(100%, 420px);
  border-radius: 50%;
  border: 5px solid rgba(212, 175, 55, 0.5);
  box-shadow: var(--shadow);
  object-fit: cover;
  aspect-ratio: 1 / 1;
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.Image-Portion img:hover {
  transform: scale(1.03) rotate(-1deg);
  box-shadow: var(--shadow-hover);
}

.Skills {
  background: linear-gradient(
    135deg,
    rgba(21, 21, 21, 0.88),
    rgba(123, 75, 183, 0.14)
  );
}

.Skills ul {
  margin: 12px 0 0;
  padding-left: 1.25rem;
}

.Skills li {
  margin: 10px 0;
}

/* PROJECTS PAGE */
#Projects-Page h2 {
  text-align: center;
  margin-top: 10px;
  font-size: clamp(2rem, 3vw, 3rem);
}

.Projects-Content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.Projects-Content > div {
  position: relative;
  padding: 18px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(212, 175, 55, 0.18);
  background: linear-gradient(
    180deg,
    rgba(11, 17, 32, 0.92),
    rgba(21, 21, 21, 0.88)
  );
  box-shadow: var(--shadow);
  min-height: 440px;
  perspective: 1400px;
  overflow: hidden;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
}

.Projects-Content > div:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(212, 175, 55, 0.4);
}

.Projects-Content h3 {
  font-size: 1.15rem;
  text-align: center;
  color: var(--lavender);
  min-height: 80px;
  margin: 0 0 12px;
}

/* Flip controls */
.Card-Toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.Flip-Btn {
  position: relative;
  z-index: 3;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
  margin: 0 auto 14px;
  padding: 11px 20px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: var(--radius-pill);
  background: linear-gradient(
    135deg,
    rgba(123, 75, 183, 0.95),
    rgba(11, 17, 32, 0.95)
  );
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition),
    letter-spacing var(--transition);
}

.Flip-Btn:hover,
.Flip-Btn:focus-visible {
  transform: translateY(-3px) scale(1.03);
  box-shadow: var(--shadow-hover);
  background: linear-gradient(
    135deg,
    rgba(212, 175, 55, 0.95),
    rgba(123, 75, 183, 0.95)
  );
  letter-spacing: 1px;
}

/* Card flip */
.Card-Inner {
  position: relative;
  width: 100%;
  min-height: 330px;
  transform-style: preserve-3d;
  transition: transform 0.85s cubic-bezier(0.2, 0.7, 0.15, 1);
}

.Card-Face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  display: grid;
  place-items: center;
  gap: 14px;
  border-radius: var(--radius-lg);
}

.Card-Front {
  z-index: 2;
}

.Card-Back {
  transform: rotateY(180deg);
}

.Card-Toggle:checked ~ .Card-Inner {
  transform: rotateY(180deg);
}

.Front,
.Back {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.12);
}

/* CONTACT PAGE */
.Contact-Content {
  display: grid;
  gap: 14px;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(212, 175, 55, 0.2);
  background: linear-gradient(
    135deg,
    rgba(11, 17, 32, 0.88),
    rgba(123, 75, 183, 0.12)
  );
}

.Contact-Content label {
  color: var(--gold);
  margin-top: 4px;
}

.Contact-Content input,
.Contact-Content select,
.Contact-Content textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
  outline: none;
  transition:
    border-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition);
}

.Contact-Content input:focus,
.Contact-Content select:focus,
.Contact-Content textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.Contact-Content textarea {
  min-height: 140px;
  resize: vertical;
}

button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
  margin: 16px auto 0;
  padding: 11px 20px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: var(--radius-pill);
  background: linear-gradient(
    135deg,
    rgba(123, 75, 183, 0.95),
    rgba(11, 17, 32, 0.95)
  );
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition),
    letter-spacing var(--transition);
}

button:hover,
button:focus-visible {
  transform: translateY(-3px) scale(1.03);
  box-shadow: var(--shadow-hover);
  background: linear-gradient(
    135deg,
    rgba(212, 175, 55, 0.95),
    rgba(123, 75, 183, 0.95)
  );
  letter-spacing: 1px;
}

/* FOOTER */
.Footer-Content {
  margin-top: 22px;
  padding: 24px;
  text-align: center;
  border-radius: var(--radius-xl);
  background: linear-gradient(
    135deg,
    rgba(21, 21, 21, 0.95),
    rgba(123, 75, 183, 0.12)
  );
  border: 1px solid rgba(212, 175, 55, 0.16);
}

.Footer-Content a {
  color: var(--gold);
}

.Footer-Content a:hover {
  text-decoration: underline;
}

/* Hover animation accents */
@keyframes floatSoft {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.Welcome-Section:hover,
.Featured-Section:hover,
.Header-Section:hover,
.Skills:hover,
.Contact-Content:hover {
  animation: floatSoft 2.5s ease-in-out infinite;
}

/* RESPONSIVE DESIGN */
@media (max-width: 900px) {
  #Home-Page,
  #Projects-Page,
  .About-Content,
  #Contact-Form {
    width: min(100% - 20px, 1180px);
    padding: 18px;
  }

  .Main-Section {
    padding: 22px 16px 12px;
  }

  .Projects-Content {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 640px) {
  .Navbar {
    padding: 1rem 0.75rem;
  }

  .Navbar-Content {
    flex-direction: column;
    align-items: stretch;
  }

  .Navbar-Content a {
    width: 100%;
    text-align: center;
  }

  .Welcome-Section,
  .Featured-Section,
  .Header-Section,
  .Skills,
  .Contact-Content,
  .Footer-Content {
    padding: 20px 16px;
  }

  .Projects-Content > div {
    min-height: 410px;
  }

  .Front,
  .Back {
    height: 230px;
  }

  .Main-Title {
    font-size: 2rem;
  }
}
