@import url("https://fonts.googleapis.com/css2?family=Caveat&family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&family=Manrope:wght@200..800&family=Redacted+Script:wght@300;400;700&family=Space+Grotesk:wght@300..700&display=swap");

:root {
  --bg-color: #393559;
  --text-color: #fbf6f5;
  --secondary-color: #ffbc99;
  --accent-color: #6495ed;

  --Manrope: "Manrope", sans-serif;
  --Fraunces: "Fraunces", serif;
  --Grotesk: "Space Grotesk", sans-serif;
  --Redacted: "Redacted Script", sans-serif;

  --card-bg: linear-gradient(142deg, var(--secondary-color) 0%, #f2d5cf 100%);
  --card-hover: linear-gradient(142deg, #e98c93 0%, var(--secondary-color) 74%, #f2d5cf 100%);
  --tag-hobby: linear-gradient(232deg, #2dc3ff, #b277ff);
  --tag-project: linear-gradient(112deg, #00ff37, #00ff90);
}

/* ---------- Reset / base ---------- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--Manrope);
  overflow-x: hidden; /* the rotated watermark is bigger than the screen */
}

h1,
h2,
h3,
p {
  margin: 0;
}

.highlight {
  font-family: var(--Fraunces);
  font-weight: 600;
  color: var(--secondary-color);
}

/* ---------- Top bar + nav (Notebook Navbar, Concept C) ---------- */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 140px;
  padding: 0 100px;
  position: relative;
}

.theme-toggle {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background-color: var(--secondary-color);
  cursor: pointer;
}

.nav-social {
  display: flex;
  gap: 20px;
  font-family: var(--Fraunces);
  font-size: 24px;
}

.nav-links {
  display: flex;
  gap: 30px;
  font-family: var(--Fraunces);
  font-size: 20px;
}

.nav-social a,
.nav-links a {
  color: var(--text-color);
  text-decoration: none;
}

.nav-social a:hover,
.nav-links a:hover {
  color: var(--secondary-color);
}

.nav-links a.active {
  font-weight: 700;
  color: var(--secondary-color);
}

@media (max-width: 700px) {
  .top-bar {
    height: auto;
    flex-direction: column;
    gap: 16px;
    padding: 24px 20px;
  }

  .nav-social {
    font-size: 20px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    font-size: 18px;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  padding: 120px 100px;
  min-height: 651px;
}

/* Top and bottom fades sit above the watermark but below the text and stickers */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  pointer-events: none;
}

.hero::before {
  top: 0;
  height: 129px;
  background: linear-gradient(to bottom, var(--bg-color), transparent);
}

.hero::after {
  bottom: 0;
  height: 182px;
  background: linear-gradient(to top, var(--bg-color), transparent);
}

.bg-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1560px;
  transform: translate(-50%, -50%) rotate(-20deg);
  opacity: 0.05;
  text-align: center;
  font-family: var(--Fraunces);
  font-size: 48px;
  letter-spacing: 2.4px;
  line-height: 0.9;
  pointer-events: none;
}

/* ---------- Text column ---------- */
.hero-copy {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 655px;
  padding-top: 75px;
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.hero-copy h1 {
  font-family: var(--Manrope);
  font-size: 96px;
  font-weight: 500;
  line-height: normal;
}

.hero-name {
  display: block;
  font-family: var(--Fraunces);
  font-weight: 600;
  color: var(--secondary-color);
}

.hero-blurb {
  font-family: var(--Fraunces);
  font-size: 33px;
  font-weight: 400;
  line-height: normal;
  white-space: nowrap;
}

.hero-blurb s {
  text-decoration-color: var(--secondary-color);
  text-decoration-thickness: 3px;
}

/* Handwritten annotations: positioned by their centre, then rotated */
.hero-welcome,
.hero-squiggle,
.hero-more {
  position: absolute;
  margin: 0;
  white-space: nowrap;
  line-height: normal;
  transform: translate(-50%, -50%) rotate(-10deg);
}

.hero-welcome {
  left: 235px;
  top: 15px;
  font-family: var(--Fraunces);
  font-size: 44px;
  font-weight: 600;
  font-style: italic;
  color: var(--accent-color);
}

.hero-squiggle {
  left: 183px;
  top: -31px;
  font-family: var(--Redacted);
  font-size: 80px;
  color: var(--accent-color);
  pointer-events: none;
}

.hero-more {
  left: 422px;
  top: 438px;
  font-family: var(--Fraunces);
  font-size: 33px;
  font-style: italic;
  color: var(--secondary-color);
}

/* ---------- Sticker cluster ---------- */
.hero-stickers {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 577px;
  height: 504px;
  margin-top: -30px;
}

.hero-stickers img {
  position: absolute;
  display: block;
  max-width: none;
}

/* Portrait: photo, then its hand-cut outline on top */
.portrait {
  left: 43px;
  top: 0;
  width: 470px;
  height: 470px;
}

.portrait-outline {
  left: 86px;
  top: 54px;
  width: 407px;
  height: 429px;
}

/* Laptop: photo, then outline on top */
.laptop {
  left: 239px;
  top: 254px;
  width: 338px;
  height: 232px;
}

.laptop-outline {
  left: 261.7px;
  top: 261.9px;
  width: 283px;
  height: 220px;
}

/* Racket: outline sits BEHIND the photo (opposite of the other two) */
.racket-outline {
  left: 38.5px;
  top: 156.4px;
  width: 222px;
  height: 322px;
}

.racket {
  left: 5.5px;
  top: 138.4px;
  width: 304.5px;
  height: 364.5px;
}

/* ---------- Smaller screens ---------- */
@media (max-width: 1250px) {
  .hero {
    flex-direction: column;
    align-items: center;
    gap: 60px;
    padding: 100px 40px 140px;
  }

  .hero-stickers {
    margin-top: 0;
  }
}

@media (max-width: 700px) {
  .hero {
    padding: 80px 16px 120px;
  }

  .hero-copy {
    width: 100%;
    max-width: 655px;
  }

  .hero-copy h1 {
    font-size: 56px;
  }

  .hero-blurb {
    font-size: 22px;
    white-space: normal;
  }

  .hero-welcome {
    left: 50%;
    font-size: 30px;
  }

  .hero-squiggle {
    left: 40%;
    font-size: 56px;
  }

  .hero-more {
    left: 70%;
    top: 300px;
    font-size: 22px;
  }

  .hero-stickers {
    transform: scale(0.6);
    transform-origin: top center;
    margin-bottom: -200px;
  }
}

/* ---------- About ---------- */
.about {
  display: flex;
  align-items: center;
  gap: 80px;
  padding: 80px 100px;
}

.about-image {
  flex-shrink: 0;
  width: 460px;
  height: 540px;
  border: 1.5px dashed rgba(255, 188, 153, 0.6);
  border-radius: 16px;
  background-color: rgba(255, 188, 153, 0.08);
}

.about-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.about-text h2 {
  font-size: 64px;
  font-weight: 500;
  color: var(--text-color);
}

.about-text p {
  font-size: 22px;
  line-height: 1.5;
  color: var(--text-color);
}

/* ---------- Polaroid board ---------- */
.board {
  max-width: 1420px;
  margin: 0 auto;
  padding: 20px 40px 80px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 20px;
}

article {
  padding: 0 0 0 0;
}

.polaroid {
  --tilt: 0deg;
  position: relative;
  display: block;
  height: 420px;
  color: var(--bg-color);
  text-decoration: none;
  font-family: var(--Manrope);
  background: var(--text-color);
  border: 1px solid rgba(57, 53, 89, 0.08);
  border-radius: 2px;
  box-shadow:
    0 18px 28px rgba(255, 194, 148, 0.14),
    0 4px 8px rgba(57, 53, 89, 0.14),
    0 1px 2px #8d86a5;
  transform: rotate(var(--tilt));
  padding: 16px 16px 20px;
}

.polaroid--wide {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.polaroid:hover {
  rotate: 2deg;
}

/* washi tape */
.polaroid::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  width: 84px;
  height: 24px;
  background: rgba(255, 194, 148, 0.7);
  border-radius: 1px;
  box-shadow: 0 1px 2px rgba(57, 53, 89, 0.14);
  transform: translateX(-50%) rotate(3deg);
}

.polaroid--wide::before {
  top: -12px;
}

.photo {
  position: relative;
  height: 264px;
  overflow: hidden;
  background: #ffe3d1;
}

.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 1px 6px rgba(57, 53, 89, 0.22);
  pointer-events: none;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo img.contain {
  object-fit: contain;
  padding: 16px;
}

.caption {
  padding-top: 14px;
}

.caption-title {
  margin: 0px;
  font-size: 28px;
  font-weight: 400;
  line-height: normal;
}

.caption-note {
  margin: 0;
  padding-top: 4px;
  font-family: "Caveat", cursive;
  font-size: 24px;
  line-height: normal;
  color: #5a527c;
  transform: rotate(1.5deg);
  transform-origin: left center;
}

.print-category,
.print-date {
  margin: 0;
  font-weight: 700;
  line-height: normal;
  white-space: nowrap;
}

.print-category {
  font-size: 10px;
  letter-spacing: 0.8px;
  color: #8d86a5;
}

.print-date {
  font-size: 11px;
  letter-spacing: 1px;
  color: rgba(232, 120, 77, 0.9);
}

/* Footer line of the portrait card is pinned to the bottom */
.polaroid:not(.polaroid--wide) .print-category {
  position: absolute;
  left: 21px;
  bottom: 17px;
}

.polaroid:not(.polaroid--wide) .print-date {
  position: absolute;
  right: 22px;
  bottom: 16px;
}

.polaroid-footer {
  display: flex;
  justify-content: space-between;
  padding: 0 6px;
}

@media (max-width: 1100px) {
  .board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .board {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    padding: 20px 20px 60px;
  }

  .polaroid {
    width: 100%;
    max-width: 320px;
  }

  .polaroid--wide {
    grid-column: span 1;
    max-width: 100%;
  }
}

/* Hover gradient lives on a pseudo-element so it can fade with opacity */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--card-hover);
  opacity: 0;
  transition: opacity 0.3s ease-out;
  z-index: 0;
}

.card:hover {
  transform: translate(-4px, -4px) rotate(-1deg);
  box-shadow: 8px 8px 0 var(--accent-color);
}

.card:hover::before {
  opacity: 1;
}

.card > * {
  position: relative;
  z-index: 1;
}

/* ---------- Projects / Hobbies pages ---------- */

.gallery-page {
  padding: 0 40px;
}

.page-heading {
  font-family: var(--Manrope);
  font-size: 64px;
  font-weight: 500;
  margin-bottom: 40px;
}

/* ---------- Contact Page --------- */
#contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;

  width: 100%;
  max-width: 800px;
  margin: 30px auto 0;
  padding: 40px;

  background-image: var(--card-bg);
  border: 2px solid var(--bg-color);
  border-radius: 28px;
  box-shadow: 0 0 15px var(--secondary-color);
}

.name-email {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.form-group label {
  font-family: var(--Manrope);
  font-size: 18px;
  font-weight: 800;
  color: var(--bg-color);
}

.form-input {
  width: 100%;
  padding: 14px 18px;

  border: 2px solid var(--bg-color);
  border-radius: 12px;
  background-color: #fff;
  color: var(--bg-color);

  font-family: var(--Manrope);
  font-size: 16px;
}

.form-input:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

#message {
  min-height: 150px;
  resize: vertical;
}

/* Submit button */
.contact-button {
  display: flex;
  justify-content: center;
}

.contact-button button {
  padding: 14px 36px;
  background-color: var(--bg-color);
  color: var(--text-color);

  border: none;
  border-radius: 999px;
  font-family: var(--Manrope);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;

  transition:
    transform 0.2s,
    opacity 0.2s;
}

.contact-button button:hover {
  transform: translateY(-2px);
  opacity: 0.85;
}

.contact-button button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#form-status {
  font-family: var(--Manrope);
  color: var(--bg-color);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  margin-top: 10px;
}

/* Mobile layout */
@media (max-width: 650px) {
  #contact-form {
    padding: 24px;
  }

  .name-email {
    grid-template-columns: 1fr;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .page-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
  }

  .page-showcase .card-wide {
    grid-column: span 2;
  }
}

@media (max-width: 650px) {
  .gallery-page {
    padding: 0 20px;
  }

  .page-heading {
    font-size: 48px;
  }

  .page-showcase {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-showcase .card-wide {
    grid-column: span 1;
  }
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 50px 20px;
}

.footer img {
  width: 289px;
}

.created-by {
  font-size: 18px;
  background-image: linear-gradient(239deg, #2dc3ff, #b277ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* delete */
.nav-social a,
.nav-links a {
  position: relative; /* so the svg can be positioned against the link */
}

.nav-social a svg,
.nav-links a svg {
  position: absolute;
  left: -14px;
  top: -8px;
  width: calc(100% + 28px); /* a bit bigger than the text */
  height: calc(100% + 16px);
  pointer-events: none; /* never blocks clicks */
  overflow: visible;
}

.marker-circle {
  fill: none;
  stroke: var(--secondary-color);
  stroke-width: 2.5;
  stroke-dasharray: 1;
  stroke-dashoffset: 1; /* hidden */
  transition: stroke-dashoffset 0.5s ease-out;
}

.nav-social a:hover .marker-circle,
.nav-links a:hover .marker-circle {
  stroke-dashoffset: 0; /* drawn */
}
